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
;
14 #define NS_ACCESSIBLE_EVENT_TOPIC
"accessible-event"
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
33 * An object has been created.
35 const unsigned long EVENT_SHOW
= 0x0001;
38 * An object has been destroyed.
40 const unsigned long EVENT_HIDE
= 0x0002;
43 * An object's children have changed
45 const unsigned long EVENT_REORDER
= 0x0003;
48 * An object has received the keyboard focus.
50 const unsigned long EVENT_FOCUS
= 0x0004;
53 * An object's state has changed.
55 const unsigned long EVENT_STATE_CHANGE
= 0x0005;
58 * An object's Name property has changed.
60 const unsigned long EVENT_NAME_CHANGE
= 0x0006;
63 * An object's Description property has changed.
65 const unsigned long EVENT_DESCRIPTION_CHANGE
= 0x0007;
68 * An object's numeric Value has changed.
70 const unsigned long EVENT_VALUE_CHANGE
= 0x0008;
73 * The selection within a container object has changed.
75 const unsigned long EVENT_SELECTION
= 0x0009;
78 * An item within a container object has been added to the selection.
80 const unsigned long EVENT_SELECTION_ADD
= 0x000A;
83 * An item within a container object has been removed from the selection.
85 const unsigned long EVENT_SELECTION_REMOVE
= 0x000B;
88 * Numerous selection changes have occurred within a container object.
90 const unsigned long EVENT_SELECTION_WITHIN
= 0x000C;
93 * An alert has been generated. Server applications send this event when a
94 * user needs to know that a user interface element has changed.
96 const unsigned long EVENT_ALERT
= 0x000D;
99 * A menu item on the menu bar has been selected.
101 const unsigned long EVENT_MENU_START
= 0x000E;
104 * A menu from the menu bar has been closed.
106 const unsigned long EVENT_MENU_END
= 0x000F;
109 * A pop-up menu has been displayed.
111 const unsigned long EVENT_MENUPOPUP_START
= 0x0010;
114 * A pop-up menu has been closed.
116 const unsigned long EVENT_MENUPOPUP_END
= 0x0011;
119 * An application is about to enter drag-and-drop mode
121 const unsigned long EVENT_DRAGDROP_START
= 0x0012;
124 * Scrolling has started on a scroll bar
126 const unsigned long EVENT_SCROLLING_START
= 0x0013;
129 * Scrolling has ended on a scroll bar
131 const unsigned long EVENT_SCROLLING_END
= 0x0014;
134 * The loading of the document has completed.
136 const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE
= 0x0015;
139 * The document contents are being reloaded.
141 const unsigned long EVENT_DOCUMENT_RELOAD
= 0x0016;
144 * The loading of the document was interrupted.
146 const unsigned long EVENT_DOCUMENT_LOAD_STOPPED
= 0x0017;
149 * A text object's attributes changed.
150 * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
152 const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED
= 0x0018;
155 * The caret has moved to a new position.
157 const unsigned long EVENT_TEXT_CARET_MOVED
= 0x0019;
162 const unsigned long EVENT_TEXT_INSERTED
= 0x001A;
167 const unsigned long EVENT_TEXT_REMOVED
= 0x001B;
170 * The text selection changed.
172 const unsigned long EVENT_TEXT_SELECTION_CHANGED
= 0x001C;
174 const unsigned long EVENT_WINDOW_ACTIVATE
= 0x001D;
175 const unsigned long EVENT_WINDOW_DEACTIVATE
= 0x001E;
176 const unsigned long EVENT_WINDOW_MAXIMIZE
= 0x001F;
177 const unsigned long EVENT_WINDOW_MINIMIZE
= 0x0020;
178 const unsigned long EVENT_WINDOW_RESTORE
= 0x0021;
181 * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.
183 const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED
= 0x0022;
186 * An object's text Value has changed.
188 const unsigned long EVENT_TEXT_VALUE_CHANGE
= 0x0023;
191 * An accessible's viewport is scrolling.
193 const unsigned long EVENT_SCROLLING
= 0x0024;
196 * An accessible is making an explicit announcement.
198 const unsigned long EVENT_ANNOUNCEMENT
= 0x0025;
201 * A live region has been introduced. Mac only.
203 const unsigned long EVENT_LIVE_REGION_ADDED
= 0x0026;
206 * A live region has been removed (aria-live attribute changed). Mac Only.
208 const unsigned long EVENT_LIVE_REGION_REMOVED
= 0x0027;
211 * A reorder event that has been coalesced into a mutation
212 * of an ancestor's subtree.
214 const unsigned long EVENT_INNER_REORDER
= 0x0028;
217 * A live region's contents has changed. Mac Only.
219 const unsigned long EVENT_LIVE_REGION_CHANGED
= 0x0029;
222 * Help make sure event map does not get out-of-line.
224 const unsigned long EVENT_LAST_ENTRY
= 0x002a;
227 * The type of event, based on the enumerated event values
228 * defined in this interface.
230 readonly attribute
unsigned long eventType
;
233 * The nsIAccessible associated with the event.
234 * May return null if no accessible is available
236 readonly attribute nsIAccessible accessible
;
239 * The nsIAccessibleDocument that the event target nsIAccessible
240 * resides in. This can be used to get the DOM window,
241 * the DOM document and the window handler, among other things.
243 readonly attribute nsIAccessibleDocument accessibleDocument
;
246 * The Node associated with the event
247 * May return null if accessible for event has been shut down
249 readonly attribute Node DOMNode
;
252 * Returns true if the event was caused by explicit user input,
253 * as opposed to purely originating from a timer or mouse movement
255 readonly attribute
boolean isFromUserInput
;