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 .
20 module com
{ module sun
{ module star
{ module accessibility
{
22 /** These constants identify the type of AccessibleEventObject
25 <p>The AccessibleEventObject::OldValue and
26 AccessibleEventObject::NewValue fields contain, where
27 applicable and not otherwise stated, the old and new value of the
28 property in question.</p>
30 @see AccessibleEventObject
31 @see XAccessibleEventListener
35 constants AccessibleEventId
37 /** Use this event type to indicate a change of the name string
38 of an accessible object. The
39 AccessibleEventObject::OldValue and
40 AccessibleEventObject::NewValue fields contain the
41 name before and after the change.
43 const short NAME_CHANGED
= 1;
45 /** Use this event type to indicate a change of the description string
46 of an accessible object. The
47 AccessibleEventObject::OldValue and
48 AccessibleEventObject::NewValue fields contain the
49 description before and after the change.
51 const short DESCRIPTION_CHANGED
= 2;
53 /** The change of the number or attributes of actions of an accessible
54 object is signaled by events of this type.
55 <p>The AccessibleEventObject::OldValue and
56 AccessibleEventObject::NewValue fields contain the
57 old and new number of actions.
59 const short ACTION_CHANGED
= 3;
61 /** State changes are signaled with this event type. Use one event for
62 every state that is set or reset. The
63 AccessibleEventObject::OldValue and
64 AccessibleEventObject::NewValue fields contain the
65 old and new value respectively. To set a state put the state id
66 into the AccessibleEventObject::NewValue field and
67 leave AccessibleEventObject::OldValue empty. To
68 reset a state put the state id into the
69 AccessibleEventObject::OldValue field and leave
70 AccessibleEventObject::NewValue empty.
72 const short STATE_CHANGED
= 4;
74 /** Constant used to determine when the active descendant of a component
75 has changed. The active descendant is used in objects with
76 transient children. The AccessibleEventObject::NewValue
77 contains the now active object. The
78 AccessibleEventObject::OldValue contains the
79 previously active child. Empty references indicate that no child
80 has been respectively is currently active.
82 const short ACTIVE_DESCENDANT_CHANGED
= 5;
84 /** This event indicates a change of the bounding rectangle of an
85 accessible object with respect only to its size or relative
86 position. If the absolute position changes but not the relative
87 position then it is not necessary to send an event.
89 <p>Use this event rather than the
90 VISIBLE_DATA_EVENT when really only the
91 (relative) bounding box of an accessible object has changed. It is
92 much more specific than the later one and reduces the number of
93 calls an AT-Tool has to make to retrieve all affected data.</p>
95 <p>The AccessibleEventObject::OldValue and
96 AccessibleEventObject::NewValue remain empty. Use
97 a call to the XAccessibleComponent::getBounds()
98 method to determine the new bounding box.</p>
100 const short BOUNDRECT_CHANGED
= 6;
102 /** A child event indicates the addition of a new or the removal of an
103 existing child. The contents of the
104 AccessibleEventObject::OldValue and
105 AccessibleEventObject::NewValue fields determines
106 which of both has taken place.
108 <p>If a new child has been added then
109 the AccessibleEventObject::NewValue contains a
110 reference to this new object and
111 AccessibleEventObject::OldValue remains empty.</p>
113 <p>If a child has been removed then the
114 AccessibleEventObject::OldValue contains a
115 reference to this object and
116 AccessibleEventObject::NewValue remains empty.</p>
118 <p>If a child has been added and another one has been removed
119 don't set both fields at the same. Send separate events
122 <p>Note that a child event is sent after a child has been added or
123 removed. Especially in the case of a removal this means that the
124 removed object does not have a parent anymore.</p>
126 const short CHILD
= 7;
128 /** Use this event to tell the listeners to re-retrieve the whole set of
129 children. This should be used by a parent object which exchanges all
130 or most of its children. It is a short form of first sending one
131 CHILD event for every old child indicating that
132 this child is about to be removed and then sending one
133 CHILD for every new child indicating that this
134 child has been added to the list of children.
136 <p>When this API is used by Java or Gnome AT-Tools then a bridge can
137 generate the events described above automatically.</p>
139 const short INVALIDATE_ALL_CHILDREN
= 8;
141 /** Events of this type indicate changes of the selection. The
142 AccessibleEventObject::OldValue and
143 AccessibleEventObject::NewValue fields remain empty.
145 const short SELECTION_CHANGED
= 9;
147 /** A visible data event indicates the change of the visual appearance
148 of an accessible object. This includes for example most of the
149 attributes available over the XAccessibleComponent and
150 XAccessibleExtendedComponent interfaces. The
151 AccessibleEventObject::OldValue and
152 AccessibleEventObject::NewValue fields are left empty.
154 const short VISIBLE_DATA_CHANGED
= 10;
156 /** This constant indicates changes of the value of an
157 XAccessibleValue interface. The
158 AccessibleEventObject::OldValue and
159 AccessibleEventObject::NewValue field contain the
160 old and new value as a number. Its exact type is implementation
161 dependent but has to be the same as is returned by the
162 XAccessibleValue::getCurrentValue() function.
165 const short VALUE_CHANGED
= 11;
167 /** Identifies the change of a relation set: The content flow has
170 <p>Not used: The AccessibleEventObject::OldValue and
171 AccessibleEventObject::NewValue fields contain
172 references to the old and new predecessor. Note that both references
173 my be `NULL` to indicate that a flow to the sending object has not
174 existed or does not exist anymore.</p>
176 const short CONTENT_FLOWS_FROM_RELATION_CHANGED
= 12;
178 /** Identifies the change of a relation set: The content flow has
181 <p>Not used: The AccessibleEventObject::OldValue and
182 AccessibleEventObject::NewValue fields contain
183 references to the old and new successor. Note that both references
184 my be `NULL` to indicate that a flow from the sending object has not
185 existed or does not exist anymore.</p>
187 const short CONTENT_FLOWS_TO_RELATION_CHANGED
= 13;
189 /** Identifies the change of a relation set: The target object that is
190 doing the controlling has changed. The
191 AccessibleEventObject::OldValue and
192 AccessibleEventObject::NewValue fields contain the
193 old and new controlling objects.
195 const short CONTROLLED_BY_RELATION_CHANGED
= 14;
197 /** Identifies the change of a relation set: The controller for the
198 target object has changed. The
199 AccessibleEventObject::OldValue and
200 AccessibleEventObject::NewValue fields contain the
201 old and new number of controlled objects.
203 const short CONTROLLER_FOR_RELATION_CHANGED
= 15;
205 /** Identifies the change of a relation set: The target group for a
206 label has changed. The
207 AccessibleEventObject::OldValue and
208 AccessibleEventObject::NewValue fields contain the
209 old and new number labeled objects.
211 const short LABEL_FOR_RELATION_CHANGED
= 16;
213 /** Identifies the change of a relation set: The objects that are doing
214 the labeling have changed. The
215 AccessibleEventObject::OldValue and
216 AccessibleEventObject::NewValue fields contain the
217 old and new accessible label.
219 const short LABELED_BY_RELATION_CHANGED
= 17;
221 /** Identifies the change of a relation set: The group membership has
223 AccessibleEventObject::OldValue and
224 AccessibleEventObject::NewValue fields contain the
225 old and new number of members.
227 const short MEMBER_OF_RELATION_CHANGED
= 18;
229 /** Identifies the change of a relation set: The sub-window-of relation
231 AccessibleEventObject::OldValue and
232 AccessibleEventObject::NewValue fields contain the
233 old and new accessible parent window objects.
235 const short SUB_WINDOW_OF_RELATION_CHANGED
= 19;
237 /** Events of this type are sent when the caret has moved to a new
238 position. The old and new position can be found in the
239 AccessibleEventObject::OldValue and
240 AccessibleEventObject::NewValue fields.
242 const short CARET_CHANGED
= 20;
244 /** Events of this type signal changes of the selection. The old or new
245 selection is <em>not</em> available through the event object. You
246 have to query the XAccessibleText interface of the
247 event source for this information. The type of content of the
248 AccessibleEventObject::OldValue and
249 AccessibleEventObject::NewValue fields is not
250 specified at the moment. This may change in the future.
252 const short TEXT_SELECTION_CHANGED
= 21;
254 /** Use this id to indicate general text changes, i.e. changes to text
255 that is exposed through the XAccessibleText and
256 XAccessibleEditableText interfaces.
258 <p>The affected text ranges are represented by
259 com::sun::star::accessibility::TextSegment structures.<p>
261 <p>The content of the AccessibleEventObject::OldValue and
262 AccessibleEventObject::NewValue expresses the type
263 of text change: <ul> <li>Insertion: the
264 AccessibleEventObject::NewValue field specifies the
265 inserted text after the insertion, the
266 AccessibleEventObject::OldValue field remains
267 empty.</li> <li>Deletion: the
268 AccessibleEventObject::OldValue field specifies the
269 deleted text before the deletion, the
270 AccessibleEventObject::NewValue field remains
271 empty.</li> <li>Update/Replace/Modification: the
272 AccessibleEventObject::OldValue and
273 AccessibleEventObject::NewValue fields specify the
274 modified text before respectively after the modification.</li>
275 <li>Unknown: when the type of text change or the place where it took
276 place can not be determined by the event broadcaster then both
277 fields remain empty. In this case the whole text may have changed
278 and the listener should refetch the text completely.</li> </ul>
280 <p>When broadcasting an event always prefer the first three cases
281 to the last one. Use it only as a last resort.</p>
283 <p> Text ranges should be as small as possible but, of course,
284 include all the text that is involved in a modification. That means
285 that when two or more discontinuous text ranges are inserted,
286 deleted, or otherwise modified the two fields of the event have to
287 cover all the affected text ranges as well as the text in
290 const short TEXT_CHANGED
= 22;
293 /** This entry is reserved for future extension. Don't use it right now.
295 const short TEXT_ATTRIBUTE_CHANGED
= 23;
297 /** Constant used to indicate that a hypertext element has received
298 focus. The AccessibleEventObject::OldValue field
299 contains the start index of previously focused element. The
300 AccessibleEventObject::NewValue field holds the
301 start index in the document of the current element that has focus. A
302 value of -1 indicates that an element does not or did not have
305 const short HYPERTEXT_CHANGED
= 24;
306 /** Constant used to indicate that the table caption has changed. The
307 AccessibleEventObject::OldValue and
308 AccessibleEventObject::NewValue fields contain the
309 old and new accessible objects representing the table caption.
311 const short TABLE_CAPTION_CHANGED
= 25;
313 /** Constant used to indicate that the column description has changed.
314 The AccessibleEventObject::NewValue field contains
315 the column index. The
316 AccessibleEventObject::OldValue is left empty.
318 const short TABLE_COLUMN_DESCRIPTION_CHANGED
= 26;
320 /** Constant used to indicate that the column header has changed. The
321 AccessibleEventObject::OldValue is empty, the
322 AccessibleEventObject::NewValue field contains an
323 AccessibleTableModelChange representing the header
326 const short TABLE_COLUMN_HEADER_CHANGED
= 27;
328 /** Constant used to indicate that the table data has changed. The
329 AccessibleEventObject::OldValue is empty, the
330 AccessibleEventObject::NewValue field contains an
331 AccessibleTableModelChange representing the data
334 const short TABLE_MODEL_CHANGED
= 28;
336 /** Constant used to indicate that the row description has changed. The
337 AccessibleEventObject::NewValue field contains the
338 row index. The AccessibleEventObject::OldValue is
341 const short TABLE_ROW_DESCRIPTION_CHANGED
= 29;
343 /** Constant used to indicate that the row header has changed. The
344 AccessibleEventObject::OldValue is empty, the
345 AccessibleEventObject::NewValue field contains an
346 AccessibleTableModelChange representing the header
349 const short TABLE_ROW_HEADER_CHANGED
= 30;
351 /** Constant used to indicate that the table summary has changed. The
352 AccessibleEventObject::OldValue and
353 AccessibleEventObject::NewValue fields contain the
354 old and new accessible objects representing the table summary.
356 const short TABLE_SUMMARY_CHANGED
= 31;
358 /** Constant used to indicate that a list box entry has been expanded.
359 AccessibleEventObject::OldValue is empty.
360 AccessibleEventObject::NewValue contains the expanded list box entry.
364 const short LISTBOX_ENTRY_EXPANDED
= 32;
366 /** Constant used to indicate that a list box entry has been collapsed.
367 AccessibleEventObject::OldValue is empty.
368 AccessibleEventObject::NewValue contains the collapsed list box entry.
372 const short LISTBOX_ENTRY_COLLAPSED
= 33;
374 /** Constant used to determine when the active descendant of a component
375 has been removed but unlike ACTIVE_DESCENDANT_CHANGED the descendant
376 that is to be removed does not have focus. The active descendant
377 is used in objects with transient children.
379 <p>AccessibleEventObject::OldValue contains the item to be removed.</p>
380 <p>AccessibleEventObject::NewValue is empty.</p>
382 @since LibreOffice 4.3
384 const short ACTIVE_DESCENDANT_CHANGED_NOFOCUS
= 34;
386 /** An item in a container has been added to an already present selection
388 Example: a second list item has been selected in a listbox.
390 <p>AccessibleEventObject::OldValue is empty.</p>
391 <p>AccessibleEventObject::NewValue contains the item to be added.</p>
393 @since LibreOffice 4.3
395 const short SELECTION_CHANGED_ADD
= 35;
397 /** An item in a container has been removed from the selection.
399 <p>AccessibleEventObject::OldValue is empty.</p>
400 <p>AccessibleEventObject::NewValue contains the item that has been removed.</p>
402 @since LibreOffice 4.3
404 const short SELECTION_CHANGED_REMOVE
= 36;
406 /** Multiple items in a container object have been added or removed
409 <p>AccessibleEventObject::OldValue and
410 AccessibleEventObject::NewValue is empty.</p>
412 @since LibreOffice 4.3
414 const short SELECTION_CHANGED_WITHIN
= 37;
416 /** A change of page or slide.
418 @since LibreOffice 4.3
420 const short PAGE_CHANGED
= 38;
422 /** The cursor has moved to/from a section
424 @since LibreOffice 4.3
426 const short SECTION_CHANGED
= 39;
428 /** The cursor has moved to/from a section
430 @since LibreOffice 4.3
432 const short COLUMN_CHANGED
= 40;
434 /** Constant used to indicate that the role of an accessible object has
437 <p>AccessibleEventObject::OldValue and
438 AccessibleEventObject::NewValue are empty.
439 The new role can be retrieved via
440 XAccessibleContext::getAccessibleRole.</p>
442 @since LibreOffice 4.3
444 const short ROLE_CHANGED
=41;
449 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */