Bug 1655413 [wpt PR 24763] - Make CSP default-src without 'unsafe-eval' block eval...
[gecko.git] / accessible / interfaces / nsIAccessibleEvent.idl
blob430b169045d7264a20a889480c840cd1b3ab54b0
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;
11 webidl Node;
13 %{C++
14 #define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event"
17 /**
18 * An interface for accessibility events listened to
19 * by in-process accessibility clients, which can be used
20 * to find out how to get accessibility and DOM interfaces for
21 * the event and its target. To listen to in-process accessibility invents,
22 * make your object an nsIObserver, and listen for accessible-event by
23 * using code something like this:
24 * nsCOMPtr<nsIObserverService> observerService =
25 * do_GetService("@mozilla.org/observer-service;1", &rv);
26 * if (NS_SUCCEEDED(rv))
27 * rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
29 [scriptable, builtinclass, uuid(20c69a40-6c2c-42a3-a578-6f4473aab9dd)]
30 interface nsIAccessibleEvent : nsISupports
32 /**
33 * An object has been created.
35 const unsigned long EVENT_SHOW = 0x0001;
37 /**
38 * An object has been destroyed.
40 const unsigned long EVENT_HIDE = 0x0002;
42 /**
43 * An object's children have changed
45 const unsigned long EVENT_REORDER = 0x0003;
47 /**
48 * The active descendant of a component has changed. The active descendant
49 * is used in objects with transient children.
51 const unsigned long EVENT_ACTIVE_DECENDENT_CHANGED = 0x0004;
53 /**
54 * An object has received the keyboard focus.
56 const unsigned long EVENT_FOCUS = 0x0005;
58 /**
59 * An object's state has changed.
61 const unsigned long EVENT_STATE_CHANGE = 0x0006;
63 /**
64 * An object has changed location, shape, or size.
66 const unsigned long EVENT_LOCATION_CHANGE = 0x0007;
68 /**
69 * An object's Name property has changed.
71 const unsigned long EVENT_NAME_CHANGE = 0x0008;
73 /**
74 * An object's Description property has changed.
76 const unsigned long EVENT_DESCRIPTION_CHANGE = 0x0009;
78 /**
79 * An object's numeric Value has changed.
81 const unsigned long EVENT_VALUE_CHANGE = 0x000A;
83 /**
84 * An object's help has changed.
86 const unsigned long EVENT_HELP_CHANGE = 0x000B;
88 /**
89 * An object's default action has changed.
91 const unsigned long EVENT_DEFACTION_CHANGE = 0x000C;
93 /**
94 * An object's action has changed.
96 const unsigned long EVENT_ACTION_CHANGE = 0x000D;
98 /**
99 * An object's keyboard shortcut has changed.
101 const unsigned long EVENT_ACCELERATOR_CHANGE = 0x000E;
104 * The selection within a container object has changed.
106 const unsigned long EVENT_SELECTION = 0x000F;
109 * An item within a container object has been added to the selection.
111 const unsigned long EVENT_SELECTION_ADD = 0x0010;
114 * An item within a container object has been removed from the selection.
116 const unsigned long EVENT_SELECTION_REMOVE = 0x0011;
119 * Numerous selection changes have occurred within a container object.
121 const unsigned long EVENT_SELECTION_WITHIN = 0x0012;
124 * An alert has been generated. Server applications send this event when a
125 * user needs to know that a user interface element has changed.
127 const unsigned long EVENT_ALERT = 0x0013;
130 * The foreground window has changed.
132 const unsigned long EVENT_FOREGROUND = 0x0014;
135 * A menu item on the menu bar has been selected.
137 const unsigned long EVENT_MENU_START = 0x0015;
140 * A menu from the menu bar has been closed.
142 const unsigned long EVENT_MENU_END = 0x0016;
145 * A pop-up menu has been displayed.
147 const unsigned long EVENT_MENUPOPUP_START = 0x0017;
150 * A pop-up menu has been closed.
152 const unsigned long EVENT_MENUPOPUP_END = 0x0018;
155 * A window has received mouse capture.
157 const unsigned long EVENT_CAPTURE_START = 0x0019;
160 * A window has lost mouse capture.
162 const unsigned long EVENT_CAPTURE_END = 0x001A;
165 * A window is being moved or resized.
167 const unsigned long EVENT_MOVESIZE_START = 0x001B;
170 * The movement or resizing of a window has finished
172 const unsigned long EVENT_MOVESIZE_END = 0x001C;
175 * A window has entered context-sensitive Help mode
177 const unsigned long EVENT_CONTEXTHELP_START = 0x001D;
180 * A window has exited context-sensitive Help mode
182 const unsigned long EVENT_CONTEXTHELP_END = 0x001E;
185 * An application is about to enter drag-and-drop mode
187 const unsigned long EVENT_DRAGDROP_START = 0x001F;
190 * An application is about to exit drag-and-drop mode
192 const unsigned long EVENT_DRAGDROP_END = 0x0020;
195 * A dialog box has been displayed
197 const unsigned long EVENT_DIALOG_START = 0x0021;
200 * A dialog box has been closed
202 const unsigned long EVENT_DIALOG_END = 0x0022;
205 * Scrolling has started on a scroll bar
207 const unsigned long EVENT_SCROLLING_START = 0x0023;
210 * Scrolling has ended on a scroll bar
212 const unsigned long EVENT_SCROLLING_END = 0x0024;
215 * A window object is about to be minimized or maximized
217 const unsigned long EVENT_MINIMIZE_START = 0x0025;
220 * A window object has been minimized or maximized
222 const unsigned long EVENT_MINIMIZE_END = 0x0026;
225 * The loading of the document has completed.
227 const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x0027;
230 * The document contents are being reloaded.
232 const unsigned long EVENT_DOCUMENT_RELOAD = 0x0028;
235 * The loading of the document was interrupted.
237 const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x0029;
240 * The document wide attributes of the document object have changed.
242 const unsigned long EVENT_DOCUMENT_ATTRIBUTES_CHANGED = 0x002A;
245 * The contents of the document have changed.
247 const unsigned long EVENT_DOCUMENT_CONTENT_CHANGED = 0x002B;
249 const unsigned long EVENT_PROPERTY_CHANGED = 0x002C;
252 * A slide changed in a presentation document or a page boundary was
253 * crossed in a word processing document.
255 const unsigned long EVENT_PAGE_CHANGED = 0x002D;
258 * A text object's attributes changed.
259 * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
261 const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x002E;
264 * The caret has moved to a new position.
266 const unsigned long EVENT_TEXT_CARET_MOVED = 0x002F;
269 * This event indicates general text changes, i.e. changes to text that is
270 * exposed through the IAccessibleText and IAccessibleEditableText interfaces.
272 const unsigned long EVENT_TEXT_CHANGED = 0x0030;
275 * Text was inserted.
277 const unsigned long EVENT_TEXT_INSERTED = 0x0031;
280 * Text was removed.
282 const unsigned long EVENT_TEXT_REMOVED = 0x0032;
285 * Text was updated.
287 const unsigned long EVENT_TEXT_UPDATED = 0x0033;
290 * The text selection changed.
292 const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x0034;
295 * A visibile data event indicates the change of the visual appearance
296 * of an accessible object. This includes for example most of the
297 * attributes available via the IAccessibleComponent interface.
299 const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0035;
302 * The caret moved from one column to the next.
304 const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x0036;
307 * The caret moved from one section to the next.
309 const unsigned long EVENT_SECTION_CHANGED = 0x0037;
312 * A table caption changed.
314 const unsigned long EVENT_TABLE_CAPTION_CHANGED = 0x0038;
317 * A table's data changed.
319 const unsigned long EVENT_TABLE_MODEL_CHANGED = 0x0039;
322 * A table's summary changed.
324 const unsigned long EVENT_TABLE_SUMMARY_CHANGED = 0x003A;
327 * A table's row description changed.
329 const unsigned long EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x003B;
332 * A table's row header changed.
334 const unsigned long EVENT_TABLE_ROW_HEADER_CHANGED = 0x003C;
336 const unsigned long EVENT_TABLE_ROW_INSERT = 0x003D;
337 const unsigned long EVENT_TABLE_ROW_DELETE = 0x003E;
338 const unsigned long EVENT_TABLE_ROW_REORDER = 0x003F;
341 * A table's column description changed.
343 const unsigned long EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x0040;
346 * A table's column header changed.
348 const unsigned long EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x0041;
350 const unsigned long EVENT_TABLE_COLUMN_INSERT = 0x0042;
351 const unsigned long EVENT_TABLE_COLUMN_DELETE = 0x0043;
352 const unsigned long EVENT_TABLE_COLUMN_REORDER = 0x0044;
354 const unsigned long EVENT_WINDOW_ACTIVATE = 0x0045;
355 const unsigned long EVENT_WINDOW_CREATE = 0x0046;
356 const unsigned long EVENT_WINDOW_DEACTIVATE = 0x0047;
357 const unsigned long EVENT_WINDOW_DESTROY = 0x0048;
358 const unsigned long EVENT_WINDOW_MAXIMIZE = 0x0049;
359 const unsigned long EVENT_WINDOW_MINIMIZE = 0x004A;
360 const unsigned long EVENT_WINDOW_RESIZE = 0x004B;
361 const unsigned long EVENT_WINDOW_RESTORE = 0x004C;
364 * The ending index of this link within the containing string has changed.
366 const unsigned long EVENT_HYPERLINK_END_INDEX_CHANGED = 0x004D;
369 * The number of anchors assoicated with this hyperlink object has changed.
371 const unsigned long EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED = 0x004E;
374 * The hyperlink selected state changed from selected to unselected or
375 * from unselected to selected.
377 const unsigned long EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x004F;
380 * One of the links associated with the hypertext object has been activated.
382 const unsigned long EVENT_HYPERTEXT_LINK_ACTIVATED = 0x0050;
385 * One of the links associated with the hypertext object has been selected.
387 const unsigned long EVENT_HYPERTEXT_LINK_SELECTED = 0x0051;
390 * The starting index of this link within the containing string has changed.
392 const unsigned long EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0052;
395 * Focus has changed from one hypertext object to another, or focus moved
396 * from a non-hypertext object to a hypertext object, or focus moved from a
397 * hypertext object to a non-hypertext object.
399 const unsigned long EVENT_HYPERTEXT_CHANGED = 0x0053;
402 * The number of hyperlinks associated with a hypertext object changed.
404 const unsigned long EVENT_HYPERTEXT_NLINKS_CHANGED = 0x0054;
407 * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.
409 const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0055;
412 * A cursorable's virtual cursor has changed.
414 const unsigned long EVENT_VIRTUALCURSOR_CHANGED = 0x0056;
417 * An object's text Value has changed.
419 const unsigned long EVENT_TEXT_VALUE_CHANGE = 0x0057;
422 * An accessible's viewport is scrolling.
424 const unsigned long EVENT_SCROLLING = 0x0058;
427 * An accessible is making an explicit announcement.
429 const unsigned long EVENT_ANNOUNCEMENT = 0x0059;
432 * Help make sure event map does not get out-of-line.
434 const unsigned long EVENT_LAST_ENTRY = 0x005A;
437 * The type of event, based on the enumerated event values
438 * defined in this interface.
440 readonly attribute unsigned long eventType;
443 * The nsIAccessible associated with the event.
444 * May return null if no accessible is available
446 readonly attribute nsIAccessible accessible;
449 * The nsIAccessibleDocument that the event target nsIAccessible
450 * resides in. This can be used to get the DOM window,
451 * the DOM document and the window handler, among other things.
453 readonly attribute nsIAccessibleDocument accessibleDocument;
456 * The Node associated with the event
457 * May return null if accessible for event has been shut down
459 readonly attribute Node DOMNode;
462 * Returns true if the event was caused by explicit user input,
463 * as opposed to purely originating from a timer or mouse movement
465 readonly attribute boolean isFromUserInput;