1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_accessibility_AccessibleEventId_idl__
24#define __com_sun_star_accessibility_AccessibleEventId_idl__
25
26module com { module sun { module star { module accessibility {
27
28/** These constants identify the type of <type>AccessibleEventObject</type>
29    objects.
30
31    <p>The <member>AccessibleEventObject::OldValue</member> and
32    <member>AccessibleEventObject::NewValue</member> fields contain, where
33    applicable and not otherwise stated, the old and new value of the
34    property in question.</p>
35
36    @see AccessibleEventObject
37    @see XAccessibleEventListener
38
39    @since OpenOffice 1.1.2
40*/
41published constants AccessibleEventId
42{
43    /** Use this event type to indicate a change of the name string
44        of an accessible object.  The
45        <member>AccessibleEventObject::OldValue</member> and
46        <member>AccessibleEventObject::NewValue</member> fields contain the
47        name before and after the change.
48    */
49    const short NAME_CHANGED = 1;
50
51    /** Use this event type to indicate a change of the description string
52        of an accessible object.  The
53        <member>AccessibleEventObject::OldValue</member> and
54        <member>AccessibleEventObject::NewValue</member> fields contain the
55        description before and after the change.
56    */
57    const short DESCRIPTION_CHANGED = 2;
58
59    /** The change of the number or attributes of actions of an accessible
60        object is signaled by events of this type.
61        <p>The <member>AccessibleEventObject::OldValue</member> and
62        <member>AccessibleEventObject::NewValue</member> fields contain the
63        old and new number of actions.
64    */
65    const short ACTION_CHANGED = 3;
66
67    /** State changes are signaled with this event type.  Use one event for
68        every state that is set or reset.  The
69        <member>AccessibleEventObject::OldValue</member> and
70        <member>AccessibleEventObject::NewValue</member> fields contain the
71        old and new value respectively.  To set a state put the state id
72        into the <member>AccessibleEventObject::NewValue</member> field and
73        leave <member>AccessibleEventObject::OldValue</member> empty.  To
74        reset a state put the state id into the
75        <member>AccessibleEventObject::OldValue</member> field and leave
76        <member>AccessibleEventObject::NewValue</member> empty.
77    */
78    const short STATE_CHANGED = 4;
79
80    /** Constant used to determine when the active descendant of a component
81        has changed.  The active descendant is used in objects with
82        transient children.  The <member>AccessibleEventObject::NewValue</member>
83        contains the now active object.  The
84        <member>AccessibleEventObject::OldValue</member> contains the
85        previously active child.  Empty references indicate that no child
86        has been respectively is currently active.
87    */
88    const short ACTIVE_DESCENDANT_CHANGED = 5;
89
90    /** This event indicates a change of the bounding rectangle of an
91        accessible object with respect only to its size or relative
92        position.  If the absolute position changes but not the relative
93        position then its is not necessary to send an event.
94
95        <p>Use this event rather than the
96        <const>VISIBLE_DATA_EVENT</const> when really only the
97        (relative) bounding box of an accessible object has changed.  It is
98        much more specific than the later one and reduces the number of
99        calls an AT-Tool has to make to retrieve all affected data.</p>
100
101        <p>The <member>AccessibleEventObject::OldValue</member> and
102        <member>AccessibleEventObject::NewValue</member> remain empty.  Use
103        a call to the <member>XAccessibleComponent::getBounds()</member>
104        method to determine the new bounding box.</p>
105    */
106    const short BOUNDRECT_CHANGED = 6;
107
108    /** A child event indicates the addition of a new or the removal of an
109        existing child.  The contents of the
110        <member>AccessibleEventObject::OldValue</member> and
111        <member>AccessibleEventObject::NewValue</member> fields determines
112        which of both has taken place.
113
114        <p>If a new child has been added then
115        the <member>AccessibleEventObject::NewValue</member> contains a
116        reference to this new object and
117        <member>AccessibleEventObject::OldValue</member> remains empty.</p>
118
119        <p>If a child has been removed then the
120        <member>AccessibleEventObject::OldValue</member> contains a
121        reference to this object and
122        <member>AccessibleEventObject::NewValue</member> remains empty.</p>
123
124        <p>If a child has been added and a another one has been removed
125        don't set both fields at the same.  Send separate events
126        instead.</p>
127
128        <p>Note that a child event is sent after a child has been added or
129        removed.  Especially in the case of a removal this means that the
130        removed object does not have a parent anymore.</p>
131    */
132    const short CHILD = 7;
133
134    /** Use this event to tell the listeners to re-retrieve the whole set of
135        children.  This should be used by a parent object which exchanges all
136        or most of its children.  It is a short form of first sending one
137        <const>CHILD</const> event for every old child indicating that
138        this child is about to be removed and then sending one
139        <const>CHILD</const> for every new child indicating that this
140        child has been added to the list of children.
141
142        <p>When this API is used by Java or Gnome AT-Tools then a bridge can
143        generate the events described above automatically.</p>
144    */
145    const short INVALIDATE_ALL_CHILDREN = 8;
146
147    /** Events of this type indicate changes of the selection. The
148        <member>AccessibleEventObject::OldValue</member> and
149        <member>AccessibleEventObject::NewValue</member> fields remain empty.
150    */
151    const short SELECTION_CHANGED = 9;
152
153    /** A visibile data event indicates the change of the visual appearance
154        of an accessible object.  This includes for example most of the
155        attributes available over the <type>XAccessibleComponent</type> and
156        <type>XAccessibleExtendedComponent</type> interfaces.  The
157        <member>AccessibleEventObject::OldValue</member> and
158        <member>AccessibleEventObject::NewValue</member> fields are left empty.
159    */
160    const short VISIBLE_DATA_CHANGED = 10;
161
162    /** This constant indicates changes of the value of an
163        <type>XAccessibleValue</type> interface.  The
164        <member>AccessibleEventObject::OldValue</member> and
165        <member>AccessibleEventObject::NewValue</member> field contain the
166        old and new value as a number.  Its exact type is implementation
167        dependent but has to be the same as is returned by the
168        <member>XAccessibleValue::getCurrentValue</member> function.
169    */
170
171    const short VALUE_CHANGED = 11;
172
173    /** Identifies the change of a relation set: The content flow has
174        changed.
175
176        <p>Not used: The <member>AccessibleEventObject::OldValue</member> and
177        <member>AccessibleEventObject::NewValue</member> fields contain
178        references to the old and new predecessor.  Note that both references
179        my be <NULL/> to indicate that a flow to the sending object has not
180        existed or does not exist anymore.</p>
181    */
182    const short CONTENT_FLOWS_FROM_RELATION_CHANGED = 12;
183
184    /** Identifies the change of a relation set: The content flow has
185        changed.
186
187        <p>Not used: The <member>AccessibleEventObject::OldValue</member> and
188        <member>AccessibleEventObject::NewValue</member> fields contain
189        references to the old and new successor.  Note that both references
190        my be <NULL/> to indicate that a flow from the sending object has not
191        existed or does not exist anymore.</p>
192    */
193    const short CONTENT_FLOWS_TO_RELATION_CHANGED = 13;
194
195    /** Identifies the change of a relation set: The target object that is
196        doing the controlling has changed.  The
197        <member>AccessibleEventObject::OldValue</member> and
198        <member>AccessibleEventObject::NewValue</member> fields contain the
199        old and new controlling objects.
200    */
201    const short CONTROLLED_BY_RELATION_CHANGED = 14;
202
203    /** Identifies the change of a relation set: The controller for the
204        target object has changed.  The
205        <member>AccessibleEventObject::OldValue</member> and
206        <member>AccessibleEventObject::NewValue</member> fields contain the
207        old and new number of controlled objects.
208    */
209    const short CONTROLLER_FOR_RELATION_CHANGED = 15;
210
211    /** Identifies the change of a relation set: The target group for a
212        label has changed.  The
213        <member>AccessibleEventObject::OldValue</member> and
214        <member>AccessibleEventObject::NewValue</member> fields contain the
215        old and new number labeled objects.
216    */
217    const short LABEL_FOR_RELATION_CHANGED = 16;
218
219    /** Identifies the change of a relation set: The objects that are doing
220        the labeling have changed.  The
221        <member>AccessibleEventObject::OldValue</member> and
222        <member>AccessibleEventObject::NewValue</member> fields contain the
223        old and new accessible label.
224    */
225    const short LABELED_BY_RELATION_CHANGED = 17;
226
227    /** Identifies the change of a relation set: The group membership has
228        changed.  The
229        <member>AccessibleEventObject::OldValue</member> and
230        <member>AccessibleEventObject::NewValue</member> fields contain the
231        old and new number of members.
232    */
233    const short MEMBER_OF_RELATION_CHANGED = 18;
234
235    /** Identifies the change of a relation set: The sub-window-of relation
236        has changed.  The
237        <member>AccessibleEventObject::OldValue</member> and
238        <member>AccessibleEventObject::NewValue</member> fields contain the
239        old and new accessible parent window objects.
240    */
241    const short SUB_WINDOW_OF_RELATION_CHANGED = 19;
242
243    /** Events of this type are sent when the caret has moved to a new
244        position.  The old and new position can be found in the
245        <member>AccessibleEventObject::OldValue</member> and
246        <member>AccessibleEventObject::NewValue</member> fields.
247    */
248    const short CARET_CHANGED = 20;
249
250    /** Events of this type signal changes of the selection.  The old or new
251        selection is <em>not</em> available through the event object.  You
252        have to query the <type>XAccessibleText</type> interface of the
253        event source for this information.  The type of content of  the
254        <member>AccessibleEventObject::OldValue</member> and
255        <member>AccessibleEventObject::NewValue</member> fields is not
256        specified at the moment.  This may change in the future.
257    */
258    const short TEXT_SELECTION_CHANGED = 21;
259
260    /** Use this id to indicate general text changes, i.e. changes to text
261        that is exposed through the <type>XAccessibleText</type> and
262        <type>XAccessibleEditableText</type> interfaces.
263
264        <p>The affected text ranges are represented by <type
265        scope="com::sun::star::accessibility">TextSegment</type> structures.<p>
266
267        <p>The content of the <member>AccessibleEventObject::OldValue</member> and
268        <member>AccessibleEventObject::NewValue</member> expresses the type
269        of text change: <ul> <li>Insertion: the
270        <member>AccessibleEventObject::NewValue</member> field specifies the
271        inserted text after the insertion, the
272        <member>AccessibleEventObject::OldValue</member> field remains
273        empty.</li> <li>Deletion: the
274        <member>AccessibleEventObject::OldValue</member> field specifies the
275        deleted text before the deletion, the
276        <member>AccessibleEventObject::NewValue</member> field remains
277        empty.</li> <li>Update/Replace/Modification: the
278        <member>AccessibleEventObject::OldValue</member> and
279        <member>AccessibleEventObject::NewValue</member> fields specify the
280        modified text before respectively after the modification.</li>
281        <li>Unknown: when the type of text change or the place where it took
282        place can not be determined by the event broadcaster then both
283        fields remain empty.  In this case the whole text may have changed
284        and the listener should refetch the text completely.</li> </ol>
285
286        <p>When broadcasting an event allways prefer the first three cases
287        to the last one.  Use it only as a last resort.</p>
288
289        <p> Text ranges should be as small as possible but, of course,
290        include all the text that is involved in a modification.  That means
291        that when two or more discontiguous text ranges are inserted,
292        deleted, or otherwise modified the two fields of the event have to
293        cover all the effected text ranges as well as the text in
294        between.</p>
295    */
296    const short TEXT_CHANGED = 22;
297
298
299    /** This entry is reserved for future extension.  Don't use it right now.
300    */
301    const short TEXT_ATTRIBUTE_CHANGED = 23;
302
303    /** Constant used to indicate that a hypertext element has received
304        focus. The <member>AccessibleEventObject::OldValue</member> field
305        contains the start index of previously focused element.  The
306        <member>AccessibleEventObject::NewValue</member> field holds the
307        start index in the document of the current element that has focus. A
308        value of -1 indicates that an element does not or did not have
309        focus.
310    */
311    const short HYPERTEXT_CHANGED = 24;
312    /** Constant used to indicate that the table caption has changed.  The
313        <member>AccessibleEventObject::OldValue</member> and
314        <member>AccessibleEventObject::NewValue</member> fields contain the
315        old and new accessible objects representing the table caption.
316    */
317    const short TABLE_CAPTION_CHANGED = 25;
318
319    /** Constant used to indicate that the column description has changed.
320        The <member>AccessibleEventObject::NewValue</member> field contains
321        the column index. The
322        <member>AccessibleEventObject::OldValue</member> is left empty.
323    */
324    const short TABLE_COLUMN_DESCRIPTION_CHANGED = 26;
325
326    /** Constant used to indicate that the column header has changed.  The
327        <member>AccessibleEventObject::OldValue</member> is empty, the
328        <member>AccessibleEventObject::NewValue</member> field contains an
329        <type>AccessibleTableModelChange</type> representing the header
330        change.
331    */
332    const short TABLE_COLUMN_HEADER_CHANGED = 27;
333
334    /** Constant used to indicate that the table data has changed.  The
335        <member>AccessibleEventObject::OldValue</member> is empty, the
336        <member>AccessibleEventObject::NewValue</member> field contains an
337        <type>AccessibleTableModelChange</type> representing the data
338        change.
339    */
340    const short TABLE_MODEL_CHANGED = 28;
341
342    /** Constant used to indicate that the row description has changed.  The
343        <member>AccessibleEventObject::NewValue</member> field contains the
344        row index. The <member>AccessibleEventObject::OldValue</member> is
345        left empty.
346    */
347    const short TABLE_ROW_DESCRIPTION_CHANGED = 29;
348
349    /** Constant used to indicate that the row header has changed.  The
350        <member>AccessibleEventObject::OldValue</member> is empty, the
351        <member>AccessibleEventObject::NewValue</member> field contains an
352        <type>AccessibleTableModelChange</type> representing the header
353        change.
354    */
355    const short TABLE_ROW_HEADER_CHANGED = 30;
356
357    /** Constant used to indicate that the table summary has changed.  The
358        <member>AccessibleEventObject::OldValue</member> and
359        <member>AccessibleEventObject::NewValue</member> fields contain the
360        old and new accessible objects representing the table summary.
361    */
362    const short TABLE_SUMMARY_CHANGED = 31;
363
364    /** Constant used to indicate that a list box entry has been expanded.
365        <member>AccessibleEventObject::OldValue</member> is empty.
366        <member>AccessibleEventObject::NewValue</member> contains the expanded list box entry.
367
368        @since OpenOffice 3.2
369    */
370    const short LISTBOX_ENTRY_EXPANDED = 32;
371
372    /** Constant used to indicate that a list box entry has been collapsed.
373        <member>AccessibleEventObject::OldValue</member> is empty.
374        <member>AccessibleEventObject::NewValue</member> contains the collapsed list box entry.
375
376        @since OpenOffice 3.2
377    */
378    const short LISTBOX_ENTRY_COLLAPSED = 33;
379
380    const short ACTIVE_DESCENDANT_CHANGED_NOFOCUS = 34;
381    const short SELECTION_CHANGED_ADD =35;
382    const short SELECTION_CHANGED_REMOVE =36;
383    const short SELECTION_CHANGED_WITHIN =37;
384    const short PAGE_CHANGED =38;
385    const short SECTION_CHANGED =39;
386    const short COLUMN_CHANGED =40;
387
388};
389
390}; }; }; };
391
392#endif
393