tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIAccessibleEvent.idl (6858B)


      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/. */
      5 
      6 #include "nsISupports.idl"
      7 
      8 interface nsIAccessible;
      9 interface nsIAccessibleDocument;
     10 
     11 webidl Node;
     12 
     13 %{C++
     14 #define NS_ACCESSIBLE_EVENT_TOPIC "accessible-event"
     15 %}
     16 
     17 /**
     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);
     28 */
     29 [scriptable, builtinclass, uuid(20c69a40-6c2c-42a3-a578-6f4473aab9dd)]
     30 interface nsIAccessibleEvent : nsISupports
     31 {
     32  /**
     33   * An object has been created.
     34   */
     35  const unsigned long EVENT_SHOW = 0x0001;
     36 
     37  /**
     38   * An object has been destroyed.
     39   */
     40  const unsigned long EVENT_HIDE = 0x0002;
     41 
     42  /**
     43   * An object's children have changed
     44   */
     45  const unsigned long EVENT_REORDER = 0x0003;
     46 
     47  /**
     48   * An object has received the keyboard focus.
     49   */
     50  const unsigned long EVENT_FOCUS = 0x0004;
     51 
     52  /**
     53   * An object's state has changed.
     54   */
     55  const unsigned long EVENT_STATE_CHANGE = 0x0005;
     56 
     57  /**
     58   * An object's Name property has changed.
     59   */
     60  const unsigned long EVENT_NAME_CHANGE = 0x0006;
     61 
     62  /**
     63   * An object's Description property has changed.
     64   */
     65  const unsigned long EVENT_DESCRIPTION_CHANGE = 0x0007;
     66 
     67  /**
     68   * An object's numeric Value has changed.
     69   */
     70  const unsigned long EVENT_VALUE_CHANGE = 0x0008;
     71 
     72  /**
     73   * The selection within a container object has changed.
     74   */
     75  const unsigned long EVENT_SELECTION = 0x0009;
     76 
     77  /**
     78   * An item within a container object has been added to the selection.
     79   */
     80  const unsigned long EVENT_SELECTION_ADD = 0x000A;
     81 
     82  /**
     83   * An item within a container object has been removed from the selection.
     84   */
     85  const unsigned long EVENT_SELECTION_REMOVE = 0x000B;
     86 
     87  /**
     88   * Numerous selection changes have occurred within a container object.
     89   */
     90  const unsigned long EVENT_SELECTION_WITHIN = 0x000C;
     91 
     92  /**
     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.
     95   */
     96  const unsigned long EVENT_ALERT = 0x000D;
     97 
     98  /**
     99   * A menu item on the menu bar has been selected.
    100   */
    101  const unsigned long EVENT_MENU_START = 0x000E;
    102 
    103  /**
    104   * A menu from the menu bar has been closed.
    105   */
    106  const unsigned long EVENT_MENU_END = 0x000F;
    107 
    108  /**
    109   * A pop-up menu has been displayed.
    110   */
    111  const unsigned long EVENT_MENUPOPUP_START = 0x0010;
    112 
    113  /**
    114   * A pop-up menu has been closed.
    115   */
    116  const unsigned long EVENT_MENUPOPUP_END = 0x0011;
    117 
    118  /**
    119   * An application is about to enter drag-and-drop mode
    120   */
    121  const unsigned long EVENT_DRAGDROP_START = 0x0012;
    122 
    123  /**
    124   * Scrolling has started on a scroll bar
    125   */
    126  const unsigned long EVENT_SCROLLING_START = 0x0013;
    127 
    128  /**
    129   * Scrolling has ended on a scroll bar
    130   */
    131  const unsigned long EVENT_SCROLLING_END = 0x0014;
    132 
    133  /**
    134   * The loading of the document has completed.
    135   */
    136  const unsigned long EVENT_DOCUMENT_LOAD_COMPLETE = 0x0015;
    137 
    138  /**
    139   * The document contents are being reloaded.
    140   */
    141  const unsigned long EVENT_DOCUMENT_RELOAD = 0x0016;
    142 
    143  /**
    144   * The loading of the document was interrupted.
    145   */
    146  const unsigned long EVENT_DOCUMENT_LOAD_STOPPED = 0x0017;
    147 
    148  /**
    149   * A text object's attributes changed.
    150   * Also see EVENT_OBJECT_ATTRIBUTE_CHANGED.
    151   */
    152  const unsigned long EVENT_TEXT_ATTRIBUTE_CHANGED = 0x0018;
    153 
    154  /**
    155   * The caret has moved to a new position.
    156   */
    157  const unsigned long EVENT_TEXT_CARET_MOVED = 0x0019;
    158 
    159  /**
    160   * Text was inserted.
    161   */
    162  const unsigned long EVENT_TEXT_INSERTED = 0x001A;
    163 
    164  /**
    165   * Text was removed.
    166   */
    167  const unsigned long EVENT_TEXT_REMOVED = 0x001B;
    168 
    169  /**
    170   * The text selection changed.
    171   */
    172  const unsigned long EVENT_TEXT_SELECTION_CHANGED = 0x001C;
    173 
    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;
    179 
    180  /**
    181   * An object's attributes changed. Also see EVENT_TEXT_ATTRIBUTE_CHANGED.
    182   */
    183  const unsigned long EVENT_OBJECT_ATTRIBUTE_CHANGED = 0x0022;
    184 
    185  /**
    186   * An object's text Value has changed.
    187   */
    188  const unsigned long EVENT_TEXT_VALUE_CHANGE = 0x0023;
    189 
    190  /**
    191   * An accessible's viewport is scrolling.
    192   */
    193  const unsigned long EVENT_SCROLLING = 0x0024;
    194 
    195  /**
    196   * An accessible is making an explicit announcement.
    197   */
    198  const unsigned long EVENT_ANNOUNCEMENT = 0x0025;
    199 
    200  /**
    201   * A live region has been introduced. Mac only.
    202   */
    203  const unsigned long EVENT_LIVE_REGION_ADDED = 0x0026;
    204 
    205  /**
    206   * A live region has been removed (aria-live attribute changed). Mac Only.
    207   */
    208  const unsigned long EVENT_LIVE_REGION_REMOVED = 0x0027;
    209 
    210  /**
    211   * A reorder event that has been coalesced into a mutation
    212   * of an ancestor's subtree.
    213   */
    214  const unsigned long EVENT_INNER_REORDER = 0x0028;
    215 
    216  /**
    217   * A live region's contents has changed. Mac Only.
    218   */
    219  const unsigned long EVENT_LIVE_REGION_CHANGED = 0x0029;
    220 
    221  /**
    222   * A value of aria-errormessage was changed.
    223   */
    224  const unsigned long EVENT_ERRORMESSAGE_CHANGED = 0x002a;
    225 
    226  /**
    227   * Help make sure event map does not get out-of-line.
    228   */
    229  const unsigned long EVENT_LAST_ENTRY = 0x002b;
    230 
    231  /**
    232   * The type of event, based on the enumerated event values
    233   * defined in this interface.
    234   */
    235  readonly attribute unsigned long eventType;
    236 
    237  /**
    238   * The nsIAccessible associated with the event.
    239   * May return null if no accessible is available
    240   */
    241  readonly attribute nsIAccessible accessible;
    242 
    243  /**
    244   * The nsIAccessibleDocument that the event target nsIAccessible
    245   * resides in. This can be used to get the DOM window,
    246   * the DOM document and the window handler, among other things.
    247   */
    248  readonly attribute nsIAccessibleDocument accessibleDocument;
    249 
    250  /**
    251   * The Node associated with the event
    252   * May return null if accessible for event has been shut down
    253   */
    254  readonly attribute Node DOMNode;
    255 
    256  /**
    257   * Returns true if the event was caused by explicit user input,
    258   * as opposed to purely originating from a timer or mouse movement
    259   */
    260  readonly attribute boolean isFromUserInput;
    261 };