accessible/public/nsIAccessibleEvent.idlScriptable
An interface for accessibility events listened to by in-process accessibility clients, which can be used to find out how to get accessibility and DOM interfaces for the event and its target.
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Attributes

Attribute Type Description
accessible nsIAccessible The nsIAccessible associated with the event. May return null if no accessible is available. Read only.
accessibleDocument nsIAccessibleDocument The nsIAccessibleDocument that the event target nsIAccessible resides in. This can be used to get the DOM window, the DOM document and the window handler, among other things. Read only.
DOMNode nsIDOMNode The nsIDOMNode associated with the event. May return null if accessible for event has been shut down. Read only.
eventType unsigned long The type of event, based on the enumerated event values defined in this interface. Read only.
isFromUserInput boolean Returns true if the event was caused by explicit user input, as opposed to purely originating from a timer or mouse movement.

Constants

Constant Gecko version Description
1.7 - 1.8.1 1.9 - 1.9.2 2.0
EVENT_SHOW 0x8002   0x0001 An object has been created.
EVENT_HIDE 0x8003   0x0002 An object has been destroyed.
EVENT_REORDER 0x8004 0x005C 0x0003 An object's children have changed.
EVENT_ACTIVE_DECENDENT_CHANGED   0x0007 0x0004 The active descendant of a component has changed. The active descendant is used in objects with transient children.
EVENT_FOCUS 0x8005 0x0008 0x0005 An object has received the keyboard focus.
EVENT_STATE_CHANGE 0x800A 0x0009 0x0006 An object's state has changed.
EVENT_LOCATION_CHANGE 0x800B 0x000A 0x0007 An object has changed location, shape, or size.
EVENT_NAME_CHANGE 0x800C 0x000B 0x0008 An object's Name property has changed.
EVENT_DESCRIPTION_CHANGE   0x000C 0x0009 An object's Description property has changed.
EVENT_VALUE_CHANGE 0x800E 0x000D 0x000A An object's Value property has changed.
EVENT_HELP_CHANGE   0x000E 0x000B An object's help has changed.
EVENT_DEFACTION_CHANGE   0x000F 0x000C An object's default action has changed.
EVENT_ACTION_CHANGE   0x0010 0x000D An object's action has changed.
EVENT_ACCELERATOR_CHANGE   0x0011 0x000E An object's keyboard shortcut has changed.
EVENT_SELECTION 0x8006 0x0012 0x000F The selection within a container object has changed.
EVENT_SELECTION_ADD 0x8007 0x0013 0x0010 An item within a container object has been added to the selection.
EVENT_SELECTION_REMOVE 0x8008 0x0014 0x0011 An item within a container object has been removed from the selection.
EVENT_SELECTION_WITHIN 0x8009 0x0015 0x0012 Numerous selection changes have occurred within a container object.
EVENT_ALERT 0x0002 0x0016 0x0013 An alert has been generated. Server applications send this event when a user needs to know that a user interface element has changed.
EVENT_FOREGROUND 0x0003 0x0017 0x0014 The foreground window has changed.
EVENT_MENU_START   0x0018 0x0015 A menu item on the menu bar has been selected.
EVENT_MENU_END   0x0019 0x0016 A menu from the menu bar has been closed.
EVENT_MENUPOPUP_START   0x001A 0x0017 A pop-up menu has been displayed.
EVENT_MENUPOPUP_END   0x001B 0x0018 A pop-up menu has been closed.
EVENT_CAPTURE_START   0x001C 0x0019 A window has received mouse capture.
EVENT_CAPTURE_END   0x001D 0x001A A window has lost mouse capture.
EVENT_MOVESIZE_START   0x001E 0x001B A window is being moved or resized.
EVENT_MOVESIZE_END   0x001F 0x001C The movement or resizing of a window has finished.
EVENT_CONTEXTHELP_START   0x0020 0x001D A window has entered context-sensitive Help mode.
EVENT_CONTEXTHELP_END   0x0021 0x001E A window has exited context-sensitive Help mode.
EVENT_DRAGDROP_START   0x0022 0x001F An application is about to enter drag-and-drop mode.
EVENT_DRAGDROP_END   0x0023 0x0020 An application is about to exit drag-and-drop mode.
EVENT_DIALOG_START   0x0024 0x0021 A dialog box has been displayed.
EVENT_DIALOG_END   0x0025 0x0022 A dialog box has been closed.
EVENT_SCROLLING_START   0x0026 0x0023 Scrolling has started on a scroll bar.
EVENT_SCROLLING_END   0x0027 0x0024 Scrolling has ended on a scroll bar.
EVENT_MINIMIZE_START   0x0028 0x0025 A window object is about to be minimized or maximized.
EVENT_MINIMIZE_END   0x0029 0x0026 A window object has been minimized or maximized.
EVENT_DOCUMENT_LOAD_COMPLETE   0x002B 0x0027 The loading of the document has completed.
EVENT_DOCUMENT_RELOAD   0x002C 0x0028 The document contents are being reloaded.
EVENT_DOCUMENT_LOAD_STOPPED   0x002D 0x0029 The loading of the document was interrupted.
EVENT_DOCUMENT_ATTRIBUTES_CHANGED   0x002E 0x002A The document wide attributes of the document object have changed.
EVENT_DOCUMENT_CONTENT_CHANGED   0x002F 0x002B The contents of the document have changed.
EVENT_PROPERTY_CHANGED   0x0030 0x002C  
EVENT_SELECTION_CHANGED   0x0031 0x002D  
EVENT_TEXT_ATTRIBUTE_CHANGED   0x0032 0x002E A text object's attributes changed. Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
EVENT_TEXT_CARET_MOVED   0x0033 0x002F The caret has moved to a new position.
EVENT_TEXT_CHANGED   0x0034 0x0030 This event indicates general text changes. That is, changes to text that is exposed through the IAccessibleText and IAccessibleEditableText interfaces.
EVENT_TEXT_INSERTED   0x0035 0x0031 Text was inserted.
EVENT_TEXT_REMOVED   0x0036 0x0032 Text was removed.
EVENT_TEXT_UPDATED   0x0037 0x0033 Text was updated.
EVENT_TEXT_SELECTION_CHANGED   0x0038 0x0034 The text selection changed.
EVENT_VISIBLE_DATA_CHANGED   0x0039 0x0035 A visible data event indicates the change of the visual appearance of an accessible object. This includes for example most of the attributes available via the IAccessibleComponent interface.
EVENT_TEXT_COLUMN_CHANGED   0x003A 0x0036 The caret moved from one column to the next.
EVENT_SECTION_CHANGED   0x003B 0x0037 The caret moved from one section to the next.
EVENT_TABLE_CAPTION_CHANGED   0x003C 0x0038 A table caption changed.
EVENT_TABLE_MODEL_CHANGED   0x003D 0x0039 A table's data changed.
EVENT_TABLE_SUMMARY_CHANGED   0x003E 0x003A A table's summary changed.
EVENT_TABLE_ROW_DESCRIPTION_CHANGED   0x003F 0x003B A table's row description changed.
EVENT_TABLE_ROW_HEADER_CHANGED   0x0040 0x003C A table's row header changed.
EVENT_TABLE_ROW_INSERT   0x0041 0x003D  
EVENT_TABLE_ROW_DELETE   0x0042 0x003E  
EVENT_TABLE_ROW_REORDER   0x0043 0x003F  
EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED   0x0044 0x0040 A table's column description changed.
EVENT_TABLE_COLUMN_HEADER_CHANGED   0x0045 0x0041 A table's column header changed.
EVENT_TABLE_COLUMN_INSERT   0x0046 0x0042  
EVENT_TABLE_COLUMN_DELETE   0x0047 0x0043  
EVENT_TABLE_COLUMN_REORDER   0x0048 0x0044  
EVENT_WINDOW_ACTIVATE   0x0049 0x0045  
EVENT_WINDOW_CREATE   0x004A 0x0046  
EVENT_WINDOW_DEACTIVATE   0x004B 0x0047  
EVENT_WINDOW_DESTROY   0x004C 0x0048  
EVENT_WINDOW_MAXIMIZE   0x004D 0x0049  
EVENT_WINDOW_MINIMIZE   0x004E 0x004A  
EVENT_WINDOW_RESIZE   0x004F 0x004B  
EVENT_WINDOW_RESTORE   0x0050 0x004C  
EVENT_HYPERLINK_END_INDEX_CHANGED   0x0051 0x004D The ending index of this link within the containing string has changed.
EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED   0x0052 0x004E The number of anchors associated with this hyperlink object has changed.
EVENT_HYPERLINK_SELECTED_LINK_CHANGED   0x0053 0x004F The hyperlink selected state changed from selected to unselected or from unselected to selected.
EVENT_HYPERTEXT_LINK_ACTIVATED   0x0054 0x0050 One of the links associated with the hypertext object has been activated.
EVENT_HYPERTEXT_LINK_SELECTED   0x0055 0x0051 One of the links associated with the hypertext object has been selected.
EVENT_HYPERLINK_START_INDEX_CHANGED   0x0056 0x0052 The starting index of this link within the containing string has changed.
EVENT_HYPERTEXT_CHANGED   0x0057 0x0053 Focus has changed from one hypertext object to another, or focus moved from a non-hypertext object to a hypertext object, or focus moved from a hypertext object to a non-hypertext object.
EVENT_HYPERTEXT_NLINKS_CHANGED   0x0058 0x0054 The number of hyperlinks associated with a hypertext object changed.
EVENT_OBJECT_ATTRIBUTE_CHANGED   0x0059 0x0055

An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.

Gecko 1.9.2 note
This event is never sent in versions of Gecko prior to 1.9.2, even though the constant existed.
EVENT_PAGE_CHANGED   0x005A 0x0056 A slide changed in a presentation document or a page boundary was crossed in a word processing document.
EVENT_LAST_ENTRY   0x005D 0x0057 Help make sure event map does not get out-of-line.
EVENT_CREATE 0x8000    
EVENT_DESTROY 0x8001    
EVENT_DESCRIPTIONCHANGE 0x800D    
EVENT_PARENTCHANGE 0x800F    
EVENT_HELPCHANGE 0x8010    
EVENT_DEFACTIONCHANGE 0x8011    
EVENT_ACCELERATORCHANGE 0x8012    
EVENT_MENUSTART 0x0004    
EVENT_MENUEND 0x0005    
EVENT_MENUPOPUPSTART 0x0006    
EVENT_MENUPOPUPEND 0x0007    
EVENT_CAPTURESTART 0x0008    
EVENT_CAPTUREEND 0x0009    
EVENT_MOVESIZESTART 0x000A    
EVENT_MOVESIZEEND 0x000B    
EVENT_CONTEXTHELPSTART 0x000C    
EVENT_CONTEXTHELPEND 0x000D    
EVENT_DRAGDROPSTART 0x000E    
EVENT_DRAGDROPEND 0x000F    
EVENT_DIALOGSTART 0x0010    
EVENT_DIALOGEND 0x0011    
EVENT_SCROLLINGSTART 0x0012    
EVENT_SCROLLINGEND 0x0013    
EVENT_MINIMIZESTART 0x0016    
EVENT_MINIMIZEEND 0x0017    
EVENT_ATK_PROPERTY_CHANGE 0x0100    
EVENT_ATK_SELECTION_CHANGE 0x0101    
EVENT_ATK_TEXT_CHANGE 0x0102    
EVENT_ATK_TEXT_SELECTION_CHANGE 0x0103    
EVENT_ATK_TEXT_CARET_MOVE 0x0104    
EVENT_ATK_VISIBLE_DATA_CHANGE 0x0105    
EVENT_ATK_TABLE_MODEL_CHANGE 0x0110    
EVENT_ATK_TABLE_ROW_INSERT 0x0111    
EVENT_ATK_TABLE_ROW_DELETE 0x0112    
EVENT_ATK_TABLE_ROW_REORDER 0x0113    
EVENT_ATK_TABLE_COLUMN_INSERT 0x0114    
EVENT_ATK_TABLE_COLUMN_DELETE 0x0115    
EVENT_ATK_TABLE_COLUMN_REORDER 0x0116    
EVENT_ATK_LINK_SELECTED 0x0117    
EVENT_ATK_WINDOW_ACTIVATE 0x0118    
EVENT_ATK_WINDOW_CREATE 0x0119    
EVENT_ATK_WINDOW_DEACTIVATE 0x0120    
EVENT_ATK_WINDOW_DESTROY 0x0121    
EVENT_ATK_WINDOW_MAXIMIZE 0x0122    
EVENT_ATK_WINDOW_MINIMIZE 0x0123    
EVENT_ATK_WINDOW_RESIZE 0x0124    
EVENT_ATK_WINDOW_RESTORE 0x0125    
EVENT_DOM_CREATE   0x0001   An object has been created.
EVENT_DOM_DESTROY   0x0002   An object has been destroyed.
EVENT_DOM_SIGNIFICANT_CHANGE   0x0003   An object's properties or content have changed significantly so that the type of object has really changed, and therefore the accessible should be destroyed or recreated.
EVENT_ASYNCH_SHOW   0x0004   A hidden object is shown -- this is a layout occurrence and is thus asynchronous.
EVENT_ASYNCH_HIDE   0x0005   An object is hidden -- this is a layout occurrence and is thus asynchronous.
EVENT_ASYNCH_SIGNIFICANT_CHANGE   0x0006   An object had a significant layout change which could affect the type of accessible object -- this is a layout occurrence and is thus asynchronous.
EVENT_DOCUMENT_LOAD_START   0x002A    
EVENT_INTERNAL_LOAD   0x005B   Used internally in Gecko.

Example

To listen to in-process accessibility invents, make your object an nsIObserver, and listen for accessible-event by using code something like this:

nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
if (NS_SUCCEEDED(rv)) {
  rv = observerService->AddObserver(this, "accessible-event", PR_TRUE);
}