1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/public/nsIAccessibleEvent.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,450 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsIAccessible; 1.12 +interface nsIAccessibleDocument; 1.13 +interface nsIDOMNode; 1.14 + 1.15 +%{C++ 1.16 +#define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event" 1.17 +%} 1.18 + 1.19 +/** 1.20 + * An interface for accessibility events listened to 1.21 + * by in-process accessibility clients, which can be used 1.22 + * to find out how to get accessibility and DOM interfaces for 1.23 + * the event and its target. To listen to in-process accessibility invents, 1.24 + * make your object an nsIObserver, and listen for accessible-event by 1.25 + * using code something like this: 1.26 + * nsCOMPtr<nsIObserverService> observerService = 1.27 + * do_GetService("@mozilla.org/observer-service;1", &rv); 1.28 + * if (NS_SUCCEEDED(rv)) 1.29 + * rv = observerService->AddObserver(this, "accessible-event", PR_TRUE); 1.30 + */ 1.31 +[scriptable, builtinclass, uuid(7f66a33a-9ed7-4fd4-87a8-e431b0f43368)] 1.32 +interface nsIAccessibleEvent : nsISupports 1.33 +{ 1.34 + /** 1.35 + * An object has been created. 1.36 + */ 1.37 + const unsigned long EVENT_SHOW = 0x0001; 1.38 + 1.39 + /** 1.40 + * An object has been destroyed. 1.41 + */ 1.42 + const unsigned long EVENT_HIDE = 0x0002; 1.43 + 1.44 + /** 1.45 + * An object's children have changed 1.46 + */ 1.47 + const unsigned long EVENT_REORDER = 0x0003; 1.48 + 1.49 + /** 1.50 + * The active descendant of a component has changed. The active descendant 1.51 + * is used in objects with transient children. 1.52 + */ 1.53 + const unsigned long EVENT_ACTIVE_DECENDENT_CHANGED = 0x0004; 1.54 + 1.55 + /** 1.56 + * An object has received the keyboard focus. 1.57 + */ 1.58 + const unsigned long EVENT_FOCUS = 0x0005; 1.59 + 1.60 + /** 1.61 + * An object's state has changed. 1.62 + */ 1.63 + const unsigned long EVENT_STATE_CHANGE = 0x0006; 1.64 + 1.65 + /** 1.66 + * An object has changed location, shape, or size. 1.67 + */ 1.68 + const unsigned long EVENT_LOCATION_CHANGE = 0x0007; 1.69 + 1.70 + /** 1.71 + * An object's Name property has changed. 1.72 + */ 1.73 + const unsigned long EVENT_NAME_CHANGE = 0x0008; 1.74 + 1.75 + /** 1.76 + * An object's Description property has changed. 1.77 + */ 1.78 + const unsigned long EVENT_DESCRIPTION_CHANGE = 0x0009; 1.79 + 1.80 + /** 1.81 + * An object's Value property has changed. 1.82 + */ 1.83 + const unsigned long EVENT_VALUE_CHANGE = 0x000A; 1.84 + 1.85 + /** 1.86 + * An object's help has changed. 1.87 + */ 1.88 + const unsigned long EVENT_HELP_CHANGE = 0x000B; 1.89 + 1.90 + /** 1.91 + * An object's default action has changed. 1.92 + */ 1.93 + const unsigned long EVENT_DEFACTION_CHANGE = 0x000C; 1.94 + 1.95 + /** 1.96 + * An object's action has changed. 1.97 + */ 1.98 + const unsigned long EVENT_ACTION_CHANGE = 0x000D; 1.99 + 1.100 + /** 1.101 + * An object's keyboard shortcut has changed. 1.102 + */ 1.103 + const unsigned long EVENT_ACCELERATOR_CHANGE = 0x000E; 1.104 + 1.105 + /** 1.106 + * The selection within a container object has changed. 1.107 + */ 1.108 + const unsigned long EVENT_SELECTION = 0x000F; 1.109 + 1.110 + /** 1.111 + * An item within a container object has been added to the selection. 1.112 + */ 1.113 + const unsigned long EVENT_SELECTION_ADD = 0x0010; 1.114 + 1.115 + /** 1.116 + * An item within a container object has been removed from the selection. 1.117 + */ 1.118 + const unsigned long EVENT_SELECTION_REMOVE = 0x0011; 1.119 + 1.120 + /** 1.121 + * Numerous selection changes have occurred within a container object. 1.122 + */ 1.123 + const unsigned long EVENT_SELECTION_WITHIN = 0x0012; 1.124 + 1.125 + /** 1.126 + * An alert has been generated. Server applications send this event when a 1.127 + * user needs to know that a user interface element has changed. 1.128 + */ 1.129 + const unsigned long EVENT_ALERT = 0x0013; 1.130 + 1.131 + /** 1.132 + * The foreground window has changed. 1.133 + */ 1.134 + const unsigned long EVENT_FOREGROUND = 0x0014; 1.135 + 1.136 + /** 1.137 + * A menu item on the menu bar has been selected. 1.138 + */ 1.139 + const unsigned long EVENT_MENU_START = 0x0015; 1.140 + 1.141 + /** 1.142 + * A menu from the menu bar has been closed. 1.143 + */ 1.144 + const unsigned long EVENT_MENU_END = 0x0016; 1.145 + 1.146 + /** 1.147 + * A pop-up menu has been displayed. 1.148 + */ 1.149 + const unsigned long EVENT_MENUPOPUP_START = 0x0017; 1.150 + 1.151 + /** 1.152 + * A pop-up menu has been closed. 1.153 + */ 1.154 + const unsigned long EVENT_MENUPOPUP_END = 0x0018; 1.155 + 1.156 + /** 1.157 + * A window has received mouse capture. 1.158 + */ 1.159 + const unsigned long EVENT_CAPTURE_START = 0x0019; 1.160 + 1.161 + /** 1.162 + * A window has lost mouse capture. 1.163 + */ 1.164 + const unsigned long EVENT_CAPTURE_END = 0x001A; 1.165 + 1.166 + /** 1.167 + * A window is being moved or resized. 1.168 + */ 1.169 + const unsigned long EVENT_MOVESIZE_START = 0x001B; 1.170 + 1.171 + /** 1.172 + * The movement or resizing of a window has finished 1.173 + */ 1.174 + const unsigned long EVENT_MOVESIZE_END = 0x001C; 1.175 + 1.176 + /** 1.177 + * A window has entered context-sensitive Help mode 1.178 + */ 1.179 + const unsigned long EVENT_CONTEXTHELP_START = 0x001D; 1.180 + 1.181 + /** 1.182 + * A window has exited context-sensitive Help mode 1.183 + */ 1.184 + const unsigned long EVENT_CONTEXTHELP_END = 0x001E; 1.185 + 1.186 + /** 1.187 + * An application is about to enter drag-and-drop mode 1.188 + */ 1.189 + const unsigned long EVENT_DRAGDROP_START = 0x001F; 1.190 + 1.191 + /** 1.192 + * An application is about to exit drag-and-drop mode 1.193 + */ 1.194 + const unsigned long EVENT_DRAGDROP_END = 0x0020; 1.195 + 1.196 + /** 1.197 + * A dialog box has been displayed 1.198 + */ 1.199 + const unsigned long EVENT_DIALOG_START = 0x0021; 1.200 + 1.201 + /** 1.202 + * A dialog box has been closed 1.203 + */ 1.204 + const unsigned long EVENT_DIALOG_END = 0x0022; 1.205 + 1.206 + /** 1.207 + * Scrolling has started on a scroll bar 1.208 + */ 1.209 + const unsigned long EVENT_SCROLLING_START = 0x0023; 1.210 + 1.211 + /** 1.212 + * Scrolling has ended on a scroll bar 1.213 + */ 1.214 + const unsigned long EVENT_SCROLLING_END = 0x0024; 1.215 + 1.216 + /** 1.217 + * A window object is about to be minimized or maximized 1.218 + */ 1.219 + const unsigned long EVENT_MINIMIZE_START = 0x0025; 1.220 + 1.221 + /** 1.222 + * A window object has been minimized or maximized 1.223 + */ 1.224 + const unsigned long EVENT_MINIMIZE_END = 0x0026; 1.225 + 1.226 + /** 1.227 + * The loading of the document has completed. 1.228 + */ 1.229 + const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x0027; 1.230 + 1.231 + /** 1.232 + * The document contents are being reloaded. 1.233 + */ 1.234 + const unsigned long EVENT_DOCUMENT_RELOAD = 0x0028; 1.235 + 1.236 + /** 1.237 + * The loading of the document was interrupted. 1.238 + */ 1.239 + const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x0029; 1.240 + 1.241 + /** 1.242 + * The document wide attributes of the document object have changed. 1.243 + */ 1.244 + const unsigned long EVENT_DOCUMENT_ATTRIBUTES_CHANGED = 0x002A; 1.245 + 1.246 + /** 1.247 + * The contents of the document have changed. 1.248 + */ 1.249 + const unsigned long EVENT_DOCUMENT_CONTENT_CHANGED = 0x002B; 1.250 + 1.251 + const unsigned long EVENT_PROPERTY_CHANGED = 0x002C; 1.252 + 1.253 + /** 1.254 + * A slide changed in a presentation document or a page boundary was 1.255 + * crossed in a word processing document. 1.256 + */ 1.257 + const unsigned long EVENT_PAGE_CHANGED = 0x002D; 1.258 + 1.259 + /** 1.260 + * A text object's attributes changed. 1.261 + * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED. 1.262 + */ 1.263 + const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x002E; 1.264 + 1.265 + /** 1.266 + * The caret has moved to a new position. 1.267 + */ 1.268 + const unsigned long EVENT_TEXT_CARET_MOVED = 0x002F; 1.269 + 1.270 + /** 1.271 + * This event indicates general text changes, i.e. changes to text that is 1.272 + * exposed through the IAccessibleText and IAccessibleEditableText interfaces. 1.273 + */ 1.274 + const unsigned long EVENT_TEXT_CHANGED = 0x0030; 1.275 + 1.276 + /** 1.277 + * Text was inserted. 1.278 + */ 1.279 + const unsigned long EVENT_TEXT_INSERTED = 0x0031; 1.280 + 1.281 + /** 1.282 + * Text was removed. 1.283 + */ 1.284 + const unsigned long EVENT_TEXT_REMOVED = 0x0032; 1.285 + 1.286 + /** 1.287 + * Text was updated. 1.288 + */ 1.289 + const unsigned long EVENT_TEXT_UPDATED = 0x0033; 1.290 + 1.291 + /** 1.292 + * The text selection changed. 1.293 + */ 1.294 + const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x0034; 1.295 + 1.296 + /** 1.297 + * A visibile data event indicates the change of the visual appearance 1.298 + * of an accessible object. This includes for example most of the 1.299 + * attributes available via the IAccessibleComponent interface. 1.300 + */ 1.301 + const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0035; 1.302 + 1.303 + /** 1.304 + * The caret moved from one column to the next. 1.305 + */ 1.306 + const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x0036; 1.307 + 1.308 + /** 1.309 + * The caret moved from one section to the next. 1.310 + */ 1.311 + const unsigned long EVENT_SECTION_CHANGED = 0x0037; 1.312 + 1.313 + /** 1.314 + * A table caption changed. 1.315 + */ 1.316 + const unsigned long EVENT_TABLE_CAPTION_CHANGED = 0x0038; 1.317 + 1.318 + /** 1.319 + * A table's data changed. 1.320 + */ 1.321 + const unsigned long EVENT_TABLE_MODEL_CHANGED = 0x0039; 1.322 + 1.323 + /** 1.324 + * A table's summary changed. 1.325 + */ 1.326 + const unsigned long EVENT_TABLE_SUMMARY_CHANGED = 0x003A; 1.327 + 1.328 + /** 1.329 + * A table's row description changed. 1.330 + */ 1.331 + const unsigned long EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x003B; 1.332 + 1.333 + /** 1.334 + * A table's row header changed. 1.335 + */ 1.336 + const unsigned long EVENT_TABLE_ROW_HEADER_CHANGED = 0x003C; 1.337 + 1.338 + const unsigned long EVENT_TABLE_ROW_INSERT = 0x003D; 1.339 + const unsigned long EVENT_TABLE_ROW_DELETE = 0x003E; 1.340 + const unsigned long EVENT_TABLE_ROW_REORDER = 0x003F; 1.341 + 1.342 + /** 1.343 + * A table's column description changed. 1.344 + */ 1.345 + const unsigned long EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x0040; 1.346 + 1.347 + /** 1.348 + * A table's column header changed. 1.349 + */ 1.350 + const unsigned long EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x0041; 1.351 + 1.352 + const unsigned long EVENT_TABLE_COLUMN_INSERT = 0x0042; 1.353 + const unsigned long EVENT_TABLE_COLUMN_DELETE = 0x0043; 1.354 + const unsigned long EVENT_TABLE_COLUMN_REORDER = 0x0044; 1.355 + 1.356 + const unsigned long EVENT_WINDOW_ACTIVATE = 0x0045; 1.357 + const unsigned long EVENT_WINDOW_CREATE = 0x0046; 1.358 + const unsigned long EVENT_WINDOW_DEACTIVATE = 0x0047; 1.359 + const unsigned long EVENT_WINDOW_DESTROY = 0x0048; 1.360 + const unsigned long EVENT_WINDOW_MAXIMIZE = 0x0049; 1.361 + const unsigned long EVENT_WINDOW_MINIMIZE = 0x004A; 1.362 + const unsigned long EVENT_WINDOW_RESIZE = 0x004B; 1.363 + const unsigned long EVENT_WINDOW_RESTORE = 0x004C; 1.364 + 1.365 + /** 1.366 + * The ending index of this link within the containing string has changed. 1.367 + */ 1.368 + const unsigned long EVENT_HYPERLINK_END_INDEX_CHANGED = 0x004D; 1.369 + 1.370 + /** 1.371 + * The number of anchors assoicated with this hyperlink object has changed. 1.372 + */ 1.373 + const unsigned long EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED = 0x004E; 1.374 + 1.375 + /** 1.376 + * The hyperlink selected state changed from selected to unselected or 1.377 + * from unselected to selected. 1.378 + */ 1.379 + const unsigned long EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x004F; 1.380 + 1.381 + /** 1.382 + * One of the links associated with the hypertext object has been activated. 1.383 + */ 1.384 + const unsigned long EVENT_HYPERTEXT_LINK_ACTIVATED = 0x0050; 1.385 + 1.386 + /** 1.387 + * One of the links associated with the hypertext object has been selected. 1.388 + */ 1.389 + const unsigned long EVENT_HYPERTEXT_LINK_SELECTED = 0x0051; 1.390 + 1.391 + /** 1.392 + * The starting index of this link within the containing string has changed. 1.393 + */ 1.394 + const unsigned long EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0052; 1.395 + 1.396 + /** 1.397 + * Focus has changed from one hypertext object to another, or focus moved 1.398 + * from a non-hypertext object to a hypertext object, or focus moved from a 1.399 + * hypertext object to a non-hypertext object. 1.400 + */ 1.401 + const unsigned long EVENT_HYPERTEXT_CHANGED = 0x0053; 1.402 + 1.403 + /** 1.404 + * The number of hyperlinks associated with a hypertext object changed. 1.405 + */ 1.406 + const unsigned long EVENT_HYPERTEXT_NLINKS_CHANGED = 0x0054; 1.407 + 1.408 + /** 1.409 + * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED. 1.410 + */ 1.411 + const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0055; 1.412 + 1.413 + /** 1.414 + * A cursorable's virtual cursor has changed. 1.415 + */ 1.416 + const unsigned long EVENT_VIRTUALCURSOR_CHANGED = 0x0056; 1.417 + 1.418 + /** 1.419 + * Help make sure event map does not get out-of-line. 1.420 + */ 1.421 + const unsigned long EVENT_LAST_ENTRY = 0x0057; 1.422 + 1.423 + /** 1.424 + * The type of event, based on the enumerated event values 1.425 + * defined in this interface. 1.426 + */ 1.427 + readonly attribute unsigned long eventType; 1.428 + 1.429 + /** 1.430 + * The nsIAccessible associated with the event. 1.431 + * May return null if no accessible is available 1.432 + */ 1.433 + readonly attribute nsIAccessible accessible; 1.434 + 1.435 + /** 1.436 + * The nsIAccessibleDocument that the event target nsIAccessible 1.437 + * resides in. This can be used to get the DOM window, 1.438 + * the DOM document and the window handler, among other things. 1.439 + */ 1.440 + readonly attribute nsIAccessibleDocument accessibleDocument; 1.441 + 1.442 + /** 1.443 + * The nsIDOMNode associated with the event 1.444 + * May return null if accessible for event has been shut down 1.445 + */ 1.446 + readonly attribute nsIDOMNode DOMNode; 1.447 + 1.448 + /** 1.449 + * Returns true if the event was caused by explicit user input, 1.450 + * as opposed to purely originating from a timer or mouse movement 1.451 + */ 1.452 + readonly attribute boolean isFromUserInput; 1.453 +};