Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIAccessible;
9 interface nsIAccessibleDocument;
10 interface nsIDOMNode;
12 %{C++
13 #define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event"
14 %}
16 /**
17 * An interface for accessibility events listened to
18 * by in-process accessibility clients, which can be used
19 * to find out how to get accessibility and DOM interfaces for
20 * the event and its target. To listen to in-process accessibility invents,
21 * make your object an nsIObserver, and listen for accessible-event by
22 * using code something like this:
23 * nsCOMPtr<nsIObserverService> observerService =
24 * do_GetService("@mozilla.org/observer-service;1", &rv);
25 * if (NS_SUCCEEDED(rv))
26 * rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
27 */
28 [scriptable, builtinclass, uuid(7f66a33a-9ed7-4fd4-87a8-e431b0f43368)]
29 interface nsIAccessibleEvent : nsISupports
30 {
31 /**
32 * An object has been created.
33 */
34 const unsigned long EVENT_SHOW = 0x0001;
36 /**
37 * An object has been destroyed.
38 */
39 const unsigned long EVENT_HIDE = 0x0002;
41 /**
42 * An object's children have changed
43 */
44 const unsigned long EVENT_REORDER = 0x0003;
46 /**
47 * The active descendant of a component has changed. The active descendant
48 * is used in objects with transient children.
49 */
50 const unsigned long EVENT_ACTIVE_DECENDENT_CHANGED = 0x0004;
52 /**
53 * An object has received the keyboard focus.
54 */
55 const unsigned long EVENT_FOCUS = 0x0005;
57 /**
58 * An object's state has changed.
59 */
60 const unsigned long EVENT_STATE_CHANGE = 0x0006;
62 /**
63 * An object has changed location, shape, or size.
64 */
65 const unsigned long EVENT_LOCATION_CHANGE = 0x0007;
67 /**
68 * An object's Name property has changed.
69 */
70 const unsigned long EVENT_NAME_CHANGE = 0x0008;
72 /**
73 * An object's Description property has changed.
74 */
75 const unsigned long EVENT_DESCRIPTION_CHANGE = 0x0009;
77 /**
78 * An object's Value property has changed.
79 */
80 const unsigned long EVENT_VALUE_CHANGE = 0x000A;
82 /**
83 * An object's help has changed.
84 */
85 const unsigned long EVENT_HELP_CHANGE = 0x000B;
87 /**
88 * An object's default action has changed.
89 */
90 const unsigned long EVENT_DEFACTION_CHANGE = 0x000C;
92 /**
93 * An object's action has changed.
94 */
95 const unsigned long EVENT_ACTION_CHANGE = 0x000D;
97 /**
98 * An object's keyboard shortcut has changed.
99 */
100 const unsigned long EVENT_ACCELERATOR_CHANGE = 0x000E;
102 /**
103 * The selection within a container object has changed.
104 */
105 const unsigned long EVENT_SELECTION = 0x000F;
107 /**
108 * An item within a container object has been added to the selection.
109 */
110 const unsigned long EVENT_SELECTION_ADD = 0x0010;
112 /**
113 * An item within a container object has been removed from the selection.
114 */
115 const unsigned long EVENT_SELECTION_REMOVE = 0x0011;
117 /**
118 * Numerous selection changes have occurred within a container object.
119 */
120 const unsigned long EVENT_SELECTION_WITHIN = 0x0012;
122 /**
123 * An alert has been generated. Server applications send this event when a
124 * user needs to know that a user interface element has changed.
125 */
126 const unsigned long EVENT_ALERT = 0x0013;
128 /**
129 * The foreground window has changed.
130 */
131 const unsigned long EVENT_FOREGROUND = 0x0014;
133 /**
134 * A menu item on the menu bar has been selected.
135 */
136 const unsigned long EVENT_MENU_START = 0x0015;
138 /**
139 * A menu from the menu bar has been closed.
140 */
141 const unsigned long EVENT_MENU_END = 0x0016;
143 /**
144 * A pop-up menu has been displayed.
145 */
146 const unsigned long EVENT_MENUPOPUP_START = 0x0017;
148 /**
149 * A pop-up menu has been closed.
150 */
151 const unsigned long EVENT_MENUPOPUP_END = 0x0018;
153 /**
154 * A window has received mouse capture.
155 */
156 const unsigned long EVENT_CAPTURE_START = 0x0019;
158 /**
159 * A window has lost mouse capture.
160 */
161 const unsigned long EVENT_CAPTURE_END = 0x001A;
163 /**
164 * A window is being moved or resized.
165 */
166 const unsigned long EVENT_MOVESIZE_START = 0x001B;
168 /**
169 * The movement or resizing of a window has finished
170 */
171 const unsigned long EVENT_MOVESIZE_END = 0x001C;
173 /**
174 * A window has entered context-sensitive Help mode
175 */
176 const unsigned long EVENT_CONTEXTHELP_START = 0x001D;
178 /**
179 * A window has exited context-sensitive Help mode
180 */
181 const unsigned long EVENT_CONTEXTHELP_END = 0x001E;
183 /**
184 * An application is about to enter drag-and-drop mode
185 */
186 const unsigned long EVENT_DRAGDROP_START = 0x001F;
188 /**
189 * An application is about to exit drag-and-drop mode
190 */
191 const unsigned long EVENT_DRAGDROP_END = 0x0020;
193 /**
194 * A dialog box has been displayed
195 */
196 const unsigned long EVENT_DIALOG_START = 0x0021;
198 /**
199 * A dialog box has been closed
200 */
201 const unsigned long EVENT_DIALOG_END = 0x0022;
203 /**
204 * Scrolling has started on a scroll bar
205 */
206 const unsigned long EVENT_SCROLLING_START = 0x0023;
208 /**
209 * Scrolling has ended on a scroll bar
210 */
211 const unsigned long EVENT_SCROLLING_END = 0x0024;
213 /**
214 * A window object is about to be minimized or maximized
215 */
216 const unsigned long EVENT_MINIMIZE_START = 0x0025;
218 /**
219 * A window object has been minimized or maximized
220 */
221 const unsigned long EVENT_MINIMIZE_END = 0x0026;
223 /**
224 * The loading of the document has completed.
225 */
226 const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x0027;
228 /**
229 * The document contents are being reloaded.
230 */
231 const unsigned long EVENT_DOCUMENT_RELOAD = 0x0028;
233 /**
234 * The loading of the document was interrupted.
235 */
236 const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x0029;
238 /**
239 * The document wide attributes of the document object have changed.
240 */
241 const unsigned long EVENT_DOCUMENT_ATTRIBUTES_CHANGED = 0x002A;
243 /**
244 * The contents of the document have changed.
245 */
246 const unsigned long EVENT_DOCUMENT_CONTENT_CHANGED = 0x002B;
248 const unsigned long EVENT_PROPERTY_CHANGED = 0x002C;
250 /**
251 * A slide changed in a presentation document or a page boundary was
252 * crossed in a word processing document.
253 */
254 const unsigned long EVENT_PAGE_CHANGED = 0x002D;
256 /**
257 * A text object's attributes changed.
258 * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
259 */
260 const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x002E;
262 /**
263 * The caret has moved to a new position.
264 */
265 const unsigned long EVENT_TEXT_CARET_MOVED = 0x002F;
267 /**
268 * This event indicates general text changes, i.e. changes to text that is
269 * exposed through the IAccessibleText and IAccessibleEditableText interfaces.
270 */
271 const unsigned long EVENT_TEXT_CHANGED = 0x0030;
273 /**
274 * Text was inserted.
275 */
276 const unsigned long EVENT_TEXT_INSERTED = 0x0031;
278 /**
279 * Text was removed.
280 */
281 const unsigned long EVENT_TEXT_REMOVED = 0x0032;
283 /**
284 * Text was updated.
285 */
286 const unsigned long EVENT_TEXT_UPDATED = 0x0033;
288 /**
289 * The text selection changed.
290 */
291 const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x0034;
293 /**
294 * A visibile data event indicates the change of the visual appearance
295 * of an accessible object. This includes for example most of the
296 * attributes available via the IAccessibleComponent interface.
297 */
298 const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0035;
300 /**
301 * The caret moved from one column to the next.
302 */
303 const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x0036;
305 /**
306 * The caret moved from one section to the next.
307 */
308 const unsigned long EVENT_SECTION_CHANGED = 0x0037;
310 /**
311 * A table caption changed.
312 */
313 const unsigned long EVENT_TABLE_CAPTION_CHANGED = 0x0038;
315 /**
316 * A table's data changed.
317 */
318 const unsigned long EVENT_TABLE_MODEL_CHANGED = 0x0039;
320 /**
321 * A table's summary changed.
322 */
323 const unsigned long EVENT_TABLE_SUMMARY_CHANGED = 0x003A;
325 /**
326 * A table's row description changed.
327 */
328 const unsigned long EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x003B;
330 /**
331 * A table's row header changed.
332 */
333 const unsigned long EVENT_TABLE_ROW_HEADER_CHANGED = 0x003C;
335 const unsigned long EVENT_TABLE_ROW_INSERT = 0x003D;
336 const unsigned long EVENT_TABLE_ROW_DELETE = 0x003E;
337 const unsigned long EVENT_TABLE_ROW_REORDER = 0x003F;
339 /**
340 * A table's column description changed.
341 */
342 const unsigned long EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x0040;
344 /**
345 * A table's column header changed.
346 */
347 const unsigned long EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x0041;
349 const unsigned long EVENT_TABLE_COLUMN_INSERT = 0x0042;
350 const unsigned long EVENT_TABLE_COLUMN_DELETE = 0x0043;
351 const unsigned long EVENT_TABLE_COLUMN_REORDER = 0x0044;
353 const unsigned long EVENT_WINDOW_ACTIVATE = 0x0045;
354 const unsigned long EVENT_WINDOW_CREATE = 0x0046;
355 const unsigned long EVENT_WINDOW_DEACTIVATE = 0x0047;
356 const unsigned long EVENT_WINDOW_DESTROY = 0x0048;
357 const unsigned long EVENT_WINDOW_MAXIMIZE = 0x0049;
358 const unsigned long EVENT_WINDOW_MINIMIZE = 0x004A;
359 const unsigned long EVENT_WINDOW_RESIZE = 0x004B;
360 const unsigned long EVENT_WINDOW_RESTORE = 0x004C;
362 /**
363 * The ending index of this link within the containing string has changed.
364 */
365 const unsigned long EVENT_HYPERLINK_END_INDEX_CHANGED = 0x004D;
367 /**
368 * The number of anchors assoicated with this hyperlink object has changed.
369 */
370 const unsigned long EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED = 0x004E;
372 /**
373 * The hyperlink selected state changed from selected to unselected or
374 * from unselected to selected.
375 */
376 const unsigned long EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x004F;
378 /**
379 * One of the links associated with the hypertext object has been activated.
380 */
381 const unsigned long EVENT_HYPERTEXT_LINK_ACTIVATED = 0x0050;
383 /**
384 * One of the links associated with the hypertext object has been selected.
385 */
386 const unsigned long EVENT_HYPERTEXT_LINK_SELECTED = 0x0051;
388 /**
389 * The starting index of this link within the containing string has changed.
390 */
391 const unsigned long EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0052;
393 /**
394 * Focus has changed from one hypertext object to another, or focus moved
395 * from a non-hypertext object to a hypertext object, or focus moved from a
396 * hypertext object to a non-hypertext object.
397 */
398 const unsigned long EVENT_HYPERTEXT_CHANGED = 0x0053;
400 /**
401 * The number of hyperlinks associated with a hypertext object changed.
402 */
403 const unsigned long EVENT_HYPERTEXT_NLINKS_CHANGED = 0x0054;
405 /**
406 * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.
407 */
408 const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0055;
410 /**
411 * A cursorable's virtual cursor has changed.
412 */
413 const unsigned long EVENT_VIRTUALCURSOR_CHANGED = 0x0056;
415 /**
416 * Help make sure event map does not get out-of-line.
417 */
418 const unsigned long EVENT_LAST_ENTRY = 0x0057;
420 /**
421 * The type of event, based on the enumerated event values
422 * defined in this interface.
423 */
424 readonly attribute unsigned long eventType;
426 /**
427 * The nsIAccessible associated with the event.
428 * May return null if no accessible is available
429 */
430 readonly attribute nsIAccessible accessible;
432 /**
433 * The nsIAccessibleDocument that the event target nsIAccessible
434 * resides in. This can be used to get the DOM window,
435 * the DOM document and the window handler, among other things.
436 */
437 readonly attribute nsIAccessibleDocument accessibleDocument;
439 /**
440 * The nsIDOMNode associated with the event
441 * May return null if accessible for event has been shut down
442 */
443 readonly attribute nsIDOMNode DOMNode;
445 /**
446 * Returns true if the event was caused by explicit user input,
447 * as opposed to purely originating from a timer or mouse movement
448 */
449 readonly attribute boolean isFromUserInput;
450 };