nsIAccessibleEvent 编辑

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

AttributeTypeDescription
accessiblensIAccessibleThe nsIAccessible associated with the event. May return null if no accessible is available. Read only.
accessibleDocumentnsIAccessibleDocumentThe 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.
DOMNodensIDOMNodeThe nsIDOMNode associated with the event. May return null if accessible for event has been shut down. Read only.
eventTypeunsigned longThe type of event, based on the enumerated event values defined in this interface. Read only.
isFromUserInputbooleanReturns true if the event was caused by explicit user input, as opposed to purely originating from a timer or mouse movement.

Constants

ConstantGecko versionDescription
1.7 - 1.8.11.9 - 1.9.22.0
EVENT_SHOW0x8002 0x0001An object has been created.
EVENT_HIDE0x8003 0x0002An object has been destroyed.
EVENT_REORDER0x80040x005C0x0003An object's children have changed.
EVENT_ACTIVE_DECENDENT_CHANGED 0x00070x0004The active descendant of a component has changed. The active descendant is used in objects with transient children.
EVENT_FOCUS0x80050x00080x0005An object has received the keyboard focus.
EVENT_STATE_CHANGE0x800A0x00090x0006An object's state has changed.
EVENT_LOCATION_CHANGE0x800B0x000A0x0007An object has changed location, shape, or size.
EVENT_NAME_CHANGE0x800C0x000B0x0008An object's Name property has changed.
EVENT_DESCRIPTION_CHANGE 0x000C0x0009An object's Description property has changed.
EVENT_VALUE_CHANGE0x800E0x000D0x000AAn object's Value property has changed.
EVENT_HELP_CHANGE 0x000E0x000BAn object's help has changed.
EVENT_DEFACTION_CHANGE 0x000F0x000CAn object's default action has changed.
EVENT_ACTION_CHANGE 0x00100x000DAn object's action has changed.
EVENT_ACCELERATOR_CHANGE 0x00110x000EAn object's keyboard shortcut has changed.
EVENT_SELECTION0x80060x00120x000FThe selection within a container object has changed.
EVENT_SELECTION_ADD0x80070x00130x0010An item within a container object has been added to the selection.
EVENT_SELECTION_REMOVE0x80080x00140x0011An item within a container object has been removed from the selection.
EVENT_SELECTION_WITHIN0x80090x00150x0012Numerous selection changes have occurred within a container object.
EVENT_ALERT0x00020x00160x0013An alert has been generated. Server applications send this event when a user needs to know that a user interface element has changed.
EVENT_FOREGROUND0x00030x00170x0014The foreground window has changed.
EVENT_MENU_START 0x00180x0015A menu item on the menu bar has been selected.
EVENT_MENU_END 0x00190x0016A menu from the menu bar has been closed.
EVENT_MENUPOPUP_START 0x001A0x0017A pop-up menu has been displayed.
EVENT_MENUPOPUP_END 0x001B0x0018A pop-up menu has been closed.
EVENT_CAPTURE_START 0x001C0x0019A window has received mouse capture.
EVENT_CAPTURE_END 0x001D0x001AA window has lost mouse capture.
EVENT_MOVESIZE_START 0x001E0x001BA window is being moved or resized.
EVENT_MOVESIZE_END 0x001F0x001CThe movement or resizing of a window has finished.
EVENT_CONTEXTHELP_START 0x00200x001DA window has entered context-sensitive Help mode.
EVENT_CONTEXTHELP_END 0x00210x001EA window has exited context-sensitive Help mode.
EVENT_DRAGDROP_START 0x00220x001FAn application is about to enter drag-and-drop mode.
EVENT_DRAGDROP_END 0x00230x0020An application is about to exit drag-and-drop mode.
EVENT_DIALOG_START 0x00240x0021A dialog box has been displayed.
EVENT_DIALOG_END 0x00250x0022A dialog box has been closed.
EVENT_SCROLLING_START 0x00260x0023Scrolling has started on a scroll bar.
EVENT_SCROLLING_END 0x00270x0024Scrolling has ended on a scroll bar.
EVENT_MINIMIZE_START 0x00280x0025A window object is about to be minimized or maximized.
EVENT_MINIMIZE_END 0x00290x0026A window object has been minimized or maximized.
EVENT_DOCUMENT_LOAD_COMPLETE 0x002B0x0027The loading of the document has completed.
EVENT_DOCUMENT_RELOAD 0x002C0x0028The document contents are being reloaded.
EVENT_DOCUMENT_LOAD_STOPPED 0x002D0x0029The loading of the document was interrupted.
EVENT_DOCUMENT_ATTRIBUTES_CHANGED 0x002E0x002AThe document wide attributes of the document object have changed.
EVENT_DOCUMENT_CONTENT_CHANGED 0x002F0x002BThe contents of the document have changed.
EVENT_PROPERTY_CHANGED 0x00300x002C 
EVENT_SELECTION_CHANGED 0x00310x002D 
EVENT_TEXT_ATTRIBUTE_CHANGED 0x00320x002EA text object's attributes changed. Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
EVENT_TEXT_CARET_MOVED 0x00330x002FThe caret has moved to a new position.
EVENT_TEXT_CHANGED 0x00340x0030This event indicates general text changes. That is, changes to text that is exposed through the IAccessibleText and IAccessibleEditableText interfaces.
EVENT_TEXT_INSERTED 0x00350x0031Text was inserted.
EVENT_TEXT_REMOVED 0x00360x0032Text was removed.
EVENT_TEXT_UPDATED 0x00370x0033Text was updated.
EVENT_TEXT_SELECTION_CHANGED 0x00380x0034The text selection changed.
EVENT_VISIBLE_DATA_CHANGED 0x00390x0035A 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 0x003A0x0036The caret moved from one column to the next.
EVENT_SECTION_CHANGED 0x003B0x0037The caret moved from one section to the next.
EVENT_TABLE_CAPTION_CHANGED 0x003C0x0038A table caption changed.
EVENT_TABLE_MODEL_CHANGED 0x003D0x0039A table's data changed.
EVENT_TABLE_SUMMARY_CHANGED 0x003E0x003AA table's summary changed.
EVENT_TABLE_ROW_DESCRIPTION_CHANGED 0x003F0x003BA table's row description changed.
EVENT_TABLE_ROW_HEADER_CHANGED 0x00400x003CA table's row header changed.
EVENT_TABLE_ROW_INSERT 0x00410x003D 
EVENT_TABLE_ROW_DELETE 0x00420x003E 
EVENT_TABLE_ROW_REORDER 0x00430x003F 
EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED 0x00440x0040A table's column description changed.
EVENT_TABLE_COLUMN_HEADER_CHANGED 0x00450x0041A table's column header changed.
EVENT_TABLE_COLUMN_INSERT 0x00460x0042 
EVENT_TABLE_COLUMN_DELETE 0x00470x0043 
EVENT_TABLE_COLUMN_REORDER 0x00480x0044 
EVENT_WINDOW_ACTIVATE 0x00490x0045 
EVENT_WINDOW_CREATE 0x004A0x0046 
EVENT_WINDOW_DEACTIVATE 0x004B0x0047 
EVENT_WINDOW_DESTROY 0x004C0x0048 
EVENT_WINDOW_MAXIMIZE 0x004D0x0049 
EVENT_WINDOW_MINIMIZE 0x004E0x004A 
EVENT_WINDOW_RESIZE 0x004F0x004B 
EVENT_WINDOW_RESTORE 0x00500x004C 
EVENT_HYPERLINK_END_INDEX_CHANGED 0x00510x004DThe ending index of this link within the containing string has changed.
EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED 0x00520x004EThe number of anchors associated with this hyperlink object has changed.
EVENT_HYPERLINK_SELECTED_LINK_CHANGED 0x00530x004FThe hyperlink selected state changed from selected to unselected or from unselected to selected.
EVENT_HYPERTEXT_LINK_ACTIVATED 0x00540x0050One of the links associated with the hypertext object has been activated.
EVENT_HYPERTEXT_LINK_SELECTED 0x00550x0051One of the links associated with the hypertext object has been selected.
EVENT_HYPERLINK_START_INDEX_CHANGED 0x00560x0052The starting index of this link within the containing string has changed.
EVENT_HYPERTEXT_CHANGED 0x00570x0053Focus 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 0x00580x0054The number of hyperlinks associated with a hypertext object changed.
EVENT_OBJECT_ATTRIBUTE_CHANGED 0x00590x0055

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 0x005A0x0056A slide changed in a presentation document or a page boundary was crossed in a word processing document.
EVENT_LAST_ENTRY 0x005D0x0057Help make sure event map does not get out-of-line.
EVENT_CREATE0x8000  
EVENT_DESTROY0x8001  
EVENT_DESCRIPTIONCHANGE0x800D  
EVENT_PARENTCHANGE0x800F  
EVENT_HELPCHANGE0x8010  
EVENT_DEFACTIONCHANGE0x8011  
EVENT_ACCELERATORCHANGE0x8012  
EVENT_MENUSTART0x0004  
EVENT_MENUEND0x0005  
EVENT_MENUPOPUPSTART0x0006  
EVENT_MENUPOPUPEND0x0007  
EVENT_CAPTURESTART0x0008  
EVENT_CAPTUREEND0x0009  
EVENT_MOVESIZESTART0x000A  
EVENT_MOVESIZEEND0x000B  
EVENT_CONTEXTHELPSTART0x000C  
EVENT_CONTEXTHELPEND0x000D  
EVENT_DRAGDROPSTART0x000E  
EVENT_DRAGDROPEND0x000F  
EVENT_DIALOGSTART0x0010  
EVENT_DIALOGEND0x0011  
EVENT_SCROLLINGSTART0x0012  
EVENT_SCROLLINGEND0x0013  
EVENT_MINIMIZESTART0x0016  
EVENT_MINIMIZEEND0x0017  
EVENT_ATK_PROPERTY_CHANGE0x0100  
EVENT_ATK_SELECTION_CHANGE0x0101  
EVENT_ATK_TEXT_CHANGE0x0102  
EVENT_ATK_TEXT_SELECTION_CHANGE0x0103  
EVENT_ATK_TEXT_CARET_MOVE0x0104  
EVENT_ATK_VISIBLE_DATA_CHANGE0x0105  
EVENT_ATK_TABLE_MODEL_CHANGE0x0110  
EVENT_ATK_TABLE_ROW_INSERT0x0111  
EVENT_ATK_TABLE_ROW_DELETE0x0112  
EVENT_ATK_TABLE_ROW_REORDER0x0113  
EVENT_ATK_TABLE_COLUMN_INSERT0x0114  
EVENT_ATK_TABLE_COLUMN_DELETE0x0115  
EVENT_ATK_TABLE_COLUMN_REORDER0x0116  
EVENT_ATK_LINK_SELECTED0x0117  
EVENT_ATK_WINDOW_ACTIVATE0x0118  
EVENT_ATK_WINDOW_CREATE0x0119  
EVENT_ATK_WINDOW_DEACTIVATE0x0120  
EVENT_ATK_WINDOW_DESTROY0x0121  
EVENT_ATK_WINDOW_MAXIMIZE0x0122  
EVENT_ATK_WINDOW_MINIMIZE0x0123  
EVENT_ATK_WINDOW_RESIZE0x0124  
EVENT_ATK_WINDOW_RESTORE0x0125  
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);
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:82 次

字数:27526

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文