michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIAccessible; michael@0: interface nsIAccessibleDocument; michael@0: interface nsIDOMNode; michael@0: michael@0: %{C++ michael@0: #define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event" michael@0: %} michael@0: michael@0: /** michael@0: * An interface for accessibility events listened to michael@0: * by in-process accessibility clients, which can be used michael@0: * to find out how to get accessibility and DOM interfaces for michael@0: * the event and its target. To listen to in-process accessibility invents, michael@0: * make your object an nsIObserver, and listen for accessible-event by michael@0: * using code something like this: michael@0: * nsCOMPtr observerService = michael@0: * do_GetService("@mozilla.org/observer-service;1", &rv); michael@0: * if (NS_SUCCEEDED(rv)) michael@0: * rv = observerService->AddObserver(this, "accessible-event", PR_TRUE); michael@0: */ michael@0: [scriptable, builtinclass, uuid(7f66a33a-9ed7-4fd4-87a8-e431b0f43368)] michael@0: interface nsIAccessibleEvent : nsISupports michael@0: { michael@0: /** michael@0: * An object has been created. michael@0: */ michael@0: const unsigned long EVENT_SHOW = 0x0001; michael@0: michael@0: /** michael@0: * An object has been destroyed. michael@0: */ michael@0: const unsigned long EVENT_HIDE = 0x0002; michael@0: michael@0: /** michael@0: * An object's children have changed michael@0: */ michael@0: const unsigned long EVENT_REORDER = 0x0003; michael@0: michael@0: /** michael@0: * The active descendant of a component has changed. The active descendant michael@0: * is used in objects with transient children. michael@0: */ michael@0: const unsigned long EVENT_ACTIVE_DECENDENT_CHANGED = 0x0004; michael@0: michael@0: /** michael@0: * An object has received the keyboard focus. michael@0: */ michael@0: const unsigned long EVENT_FOCUS = 0x0005; michael@0: michael@0: /** michael@0: * An object's state has changed. michael@0: */ michael@0: const unsigned long EVENT_STATE_CHANGE = 0x0006; michael@0: michael@0: /** michael@0: * An object has changed location, shape, or size. michael@0: */ michael@0: const unsigned long EVENT_LOCATION_CHANGE = 0x0007; michael@0: michael@0: /** michael@0: * An object's Name property has changed. michael@0: */ michael@0: const unsigned long EVENT_NAME_CHANGE = 0x0008; michael@0: michael@0: /** michael@0: * An object's Description property has changed. michael@0: */ michael@0: const unsigned long EVENT_DESCRIPTION_CHANGE = 0x0009; michael@0: michael@0: /** michael@0: * An object's Value property has changed. michael@0: */ michael@0: const unsigned long EVENT_VALUE_CHANGE = 0x000A; michael@0: michael@0: /** michael@0: * An object's help has changed. michael@0: */ michael@0: const unsigned long EVENT_HELP_CHANGE = 0x000B; michael@0: michael@0: /** michael@0: * An object's default action has changed. michael@0: */ michael@0: const unsigned long EVENT_DEFACTION_CHANGE = 0x000C; michael@0: michael@0: /** michael@0: * An object's action has changed. michael@0: */ michael@0: const unsigned long EVENT_ACTION_CHANGE = 0x000D; michael@0: michael@0: /** michael@0: * An object's keyboard shortcut has changed. michael@0: */ michael@0: const unsigned long EVENT_ACCELERATOR_CHANGE = 0x000E; michael@0: michael@0: /** michael@0: * The selection within a container object has changed. michael@0: */ michael@0: const unsigned long EVENT_SELECTION = 0x000F; michael@0: michael@0: /** michael@0: * An item within a container object has been added to the selection. michael@0: */ michael@0: const unsigned long EVENT_SELECTION_ADD = 0x0010; michael@0: michael@0: /** michael@0: * An item within a container object has been removed from the selection. michael@0: */ michael@0: const unsigned long EVENT_SELECTION_REMOVE = 0x0011; michael@0: michael@0: /** michael@0: * Numerous selection changes have occurred within a container object. michael@0: */ michael@0: const unsigned long EVENT_SELECTION_WITHIN = 0x0012; michael@0: michael@0: /** michael@0: * An alert has been generated. Server applications send this event when a michael@0: * user needs to know that a user interface element has changed. michael@0: */ michael@0: const unsigned long EVENT_ALERT = 0x0013; michael@0: michael@0: /** michael@0: * The foreground window has changed. michael@0: */ michael@0: const unsigned long EVENT_FOREGROUND = 0x0014; michael@0: michael@0: /** michael@0: * A menu item on the menu bar has been selected. michael@0: */ michael@0: const unsigned long EVENT_MENU_START = 0x0015; michael@0: michael@0: /** michael@0: * A menu from the menu bar has been closed. michael@0: */ michael@0: const unsigned long EVENT_MENU_END = 0x0016; michael@0: michael@0: /** michael@0: * A pop-up menu has been displayed. michael@0: */ michael@0: const unsigned long EVENT_MENUPOPUP_START = 0x0017; michael@0: michael@0: /** michael@0: * A pop-up menu has been closed. michael@0: */ michael@0: const unsigned long EVENT_MENUPOPUP_END = 0x0018; michael@0: michael@0: /** michael@0: * A window has received mouse capture. michael@0: */ michael@0: const unsigned long EVENT_CAPTURE_START = 0x0019; michael@0: michael@0: /** michael@0: * A window has lost mouse capture. michael@0: */ michael@0: const unsigned long EVENT_CAPTURE_END = 0x001A; michael@0: michael@0: /** michael@0: * A window is being moved or resized. michael@0: */ michael@0: const unsigned long EVENT_MOVESIZE_START = 0x001B; michael@0: michael@0: /** michael@0: * The movement or resizing of a window has finished michael@0: */ michael@0: const unsigned long EVENT_MOVESIZE_END = 0x001C; michael@0: michael@0: /** michael@0: * A window has entered context-sensitive Help mode michael@0: */ michael@0: const unsigned long EVENT_CONTEXTHELP_START = 0x001D; michael@0: michael@0: /** michael@0: * A window has exited context-sensitive Help mode michael@0: */ michael@0: const unsigned long EVENT_CONTEXTHELP_END = 0x001E; michael@0: michael@0: /** michael@0: * An application is about to enter drag-and-drop mode michael@0: */ michael@0: const unsigned long EVENT_DRAGDROP_START = 0x001F; michael@0: michael@0: /** michael@0: * An application is about to exit drag-and-drop mode michael@0: */ michael@0: const unsigned long EVENT_DRAGDROP_END = 0x0020; michael@0: michael@0: /** michael@0: * A dialog box has been displayed michael@0: */ michael@0: const unsigned long EVENT_DIALOG_START = 0x0021; michael@0: michael@0: /** michael@0: * A dialog box has been closed michael@0: */ michael@0: const unsigned long EVENT_DIALOG_END = 0x0022; michael@0: michael@0: /** michael@0: * Scrolling has started on a scroll bar michael@0: */ michael@0: const unsigned long EVENT_SCROLLING_START = 0x0023; michael@0: michael@0: /** michael@0: * Scrolling has ended on a scroll bar michael@0: */ michael@0: const unsigned long EVENT_SCROLLING_END = 0x0024; michael@0: michael@0: /** michael@0: * A window object is about to be minimized or maximized michael@0: */ michael@0: const unsigned long EVENT_MINIMIZE_START = 0x0025; michael@0: michael@0: /** michael@0: * A window object has been minimized or maximized michael@0: */ michael@0: const unsigned long EVENT_MINIMIZE_END = 0x0026; michael@0: michael@0: /** michael@0: * The loading of the document has completed. michael@0: */ michael@0: const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x0027; michael@0: michael@0: /** michael@0: * The document contents are being reloaded. michael@0: */ michael@0: const unsigned long EVENT_DOCUMENT_RELOAD = 0x0028; michael@0: michael@0: /** michael@0: * The loading of the document was interrupted. michael@0: */ michael@0: const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x0029; michael@0: michael@0: /** michael@0: * The document wide attributes of the document object have changed. michael@0: */ michael@0: const unsigned long EVENT_DOCUMENT_ATTRIBUTES_CHANGED = 0x002A; michael@0: michael@0: /** michael@0: * The contents of the document have changed. michael@0: */ michael@0: const unsigned long EVENT_DOCUMENT_CONTENT_CHANGED = 0x002B; michael@0: michael@0: const unsigned long EVENT_PROPERTY_CHANGED = 0x002C; michael@0: michael@0: /** michael@0: * A slide changed in a presentation document or a page boundary was michael@0: * crossed in a word processing document. michael@0: */ michael@0: const unsigned long EVENT_PAGE_CHANGED = 0x002D; michael@0: michael@0: /** michael@0: * A text object's attributes changed. michael@0: * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED. michael@0: */ michael@0: const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x002E; michael@0: michael@0: /** michael@0: * The caret has moved to a new position. michael@0: */ michael@0: const unsigned long EVENT_TEXT_CARET_MOVED = 0x002F; michael@0: michael@0: /** michael@0: * This event indicates general text changes, i.e. changes to text that is michael@0: * exposed through the IAccessibleText and IAccessibleEditableText interfaces. michael@0: */ michael@0: const unsigned long EVENT_TEXT_CHANGED = 0x0030; michael@0: michael@0: /** michael@0: * Text was inserted. michael@0: */ michael@0: const unsigned long EVENT_TEXT_INSERTED = 0x0031; michael@0: michael@0: /** michael@0: * Text was removed. michael@0: */ michael@0: const unsigned long EVENT_TEXT_REMOVED = 0x0032; michael@0: michael@0: /** michael@0: * Text was updated. michael@0: */ michael@0: const unsigned long EVENT_TEXT_UPDATED = 0x0033; michael@0: michael@0: /** michael@0: * The text selection changed. michael@0: */ michael@0: const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x0034; michael@0: michael@0: /** michael@0: * A visibile data event indicates the change of the visual appearance michael@0: * of an accessible object. This includes for example most of the michael@0: * attributes available via the IAccessibleComponent interface. michael@0: */ michael@0: const unsigned long EVENT_VISIBLE_DATA_CHANGED = 0x0035; michael@0: michael@0: /** michael@0: * The caret moved from one column to the next. michael@0: */ michael@0: const unsigned long EVENT_TEXT_COLUMN_CHANGED = 0x0036; michael@0: michael@0: /** michael@0: * The caret moved from one section to the next. michael@0: */ michael@0: const unsigned long EVENT_SECTION_CHANGED = 0x0037; michael@0: michael@0: /** michael@0: * A table caption changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_CAPTION_CHANGED = 0x0038; michael@0: michael@0: /** michael@0: * A table's data changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_MODEL_CHANGED = 0x0039; michael@0: michael@0: /** michael@0: * A table's summary changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_SUMMARY_CHANGED = 0x003A; michael@0: michael@0: /** michael@0: * A table's row description changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_ROW_DESCRIPTION_CHANGED = 0x003B; michael@0: michael@0: /** michael@0: * A table's row header changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_ROW_HEADER_CHANGED = 0x003C; michael@0: michael@0: const unsigned long EVENT_TABLE_ROW_INSERT = 0x003D; michael@0: const unsigned long EVENT_TABLE_ROW_DELETE = 0x003E; michael@0: const unsigned long EVENT_TABLE_ROW_REORDER = 0x003F; michael@0: michael@0: /** michael@0: * A table's column description changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED = 0x0040; michael@0: michael@0: /** michael@0: * A table's column header changed. michael@0: */ michael@0: const unsigned long EVENT_TABLE_COLUMN_HEADER_CHANGED = 0x0041; michael@0: michael@0: const unsigned long EVENT_TABLE_COLUMN_INSERT = 0x0042; michael@0: const unsigned long EVENT_TABLE_COLUMN_DELETE = 0x0043; michael@0: const unsigned long EVENT_TABLE_COLUMN_REORDER = 0x0044; michael@0: michael@0: const unsigned long EVENT_WINDOW_ACTIVATE = 0x0045; michael@0: const unsigned long EVENT_WINDOW_CREATE = 0x0046; michael@0: const unsigned long EVENT_WINDOW_DEACTIVATE = 0x0047; michael@0: const unsigned long EVENT_WINDOW_DESTROY = 0x0048; michael@0: const unsigned long EVENT_WINDOW_MAXIMIZE = 0x0049; michael@0: const unsigned long EVENT_WINDOW_MINIMIZE = 0x004A; michael@0: const unsigned long EVENT_WINDOW_RESIZE = 0x004B; michael@0: const unsigned long EVENT_WINDOW_RESTORE = 0x004C; michael@0: michael@0: /** michael@0: * The ending index of this link within the containing string has changed. michael@0: */ michael@0: const unsigned long EVENT_HYPERLINK_END_INDEX_CHANGED = 0x004D; michael@0: michael@0: /** michael@0: * The number of anchors assoicated with this hyperlink object has changed. michael@0: */ michael@0: const unsigned long EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED = 0x004E; michael@0: michael@0: /** michael@0: * The hyperlink selected state changed from selected to unselected or michael@0: * from unselected to selected. michael@0: */ michael@0: const unsigned long EVENT_HYPERLINK_SELECTED_LINK_CHANGED = 0x004F; michael@0: michael@0: /** michael@0: * One of the links associated with the hypertext object has been activated. michael@0: */ michael@0: const unsigned long EVENT_HYPERTEXT_LINK_ACTIVATED = 0x0050; michael@0: michael@0: /** michael@0: * One of the links associated with the hypertext object has been selected. michael@0: */ michael@0: const unsigned long EVENT_HYPERTEXT_LINK_SELECTED = 0x0051; michael@0: michael@0: /** michael@0: * The starting index of this link within the containing string has changed. michael@0: */ michael@0: const unsigned long EVENT_HYPERLINK_START_INDEX_CHANGED = 0x0052; michael@0: michael@0: /** michael@0: * Focus has changed from one hypertext object to another, or focus moved michael@0: * from a non-hypertext object to a hypertext object, or focus moved from a michael@0: * hypertext object to a non-hypertext object. michael@0: */ michael@0: const unsigned long EVENT_HYPERTEXT_CHANGED = 0x0053; michael@0: michael@0: /** michael@0: * The number of hyperlinks associated with a hypertext object changed. michael@0: */ michael@0: const unsigned long EVENT_HYPERTEXT_NLINKS_CHANGED = 0x0054; michael@0: michael@0: /** michael@0: * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED. michael@0: */ michael@0: const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0055; michael@0: michael@0: /** michael@0: * A cursorable's virtual cursor has changed. michael@0: */ michael@0: const unsigned long EVENT_VIRTUALCURSOR_CHANGED = 0x0056; michael@0: michael@0: /** michael@0: * Help make sure event map does not get out-of-line. michael@0: */ michael@0: const unsigned long EVENT_LAST_ENTRY = 0x0057; michael@0: michael@0: /** michael@0: * The type of event, based on the enumerated event values michael@0: * defined in this interface. michael@0: */ michael@0: readonly attribute unsigned long eventType; michael@0: michael@0: /** michael@0: * The nsIAccessible associated with the event. michael@0: * May return null if no accessible is available michael@0: */ michael@0: readonly attribute nsIAccessible accessible; michael@0: michael@0: /** michael@0: * The nsIAccessibleDocument that the event target nsIAccessible michael@0: * resides in. This can be used to get the DOM window, michael@0: * the DOM document and the window handler, among other things. michael@0: */ michael@0: readonly attribute nsIAccessibleDocument accessibleDocument; michael@0: michael@0: /** michael@0: * The nsIDOMNode associated with the event michael@0: * May return null if accessible for event has been shut down michael@0: */ michael@0: readonly attribute nsIDOMNode DOMNode; michael@0: michael@0: /** michael@0: * Returns true if the event was caused by explicit user input, michael@0: * as opposed to purely originating from a timer or mouse movement michael@0: */ michael@0: readonly attribute boolean isFromUserInput; michael@0: };