accessible/public/nsIAccessible.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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/. */
     6 #include "nsISupports.idl"
     7 #include "nsIArray.idl"
     9 interface nsIPersistentProperties;
    10 interface nsIDOMCSSPrimitiveValue;
    11 interface nsIDOMNode;
    12 interface nsIAccessibleDocument;
    13 interface nsIAccessibleRelation;
    15 /**
    16  * A cross-platform interface that supports platform-specific 
    17  * accessibility APIs like MSAA and ATK. Contains the sum of what's needed
    18  * to support IAccessible as well as ATK's generic accessibility objects.
    19  * Can also be used by in-process accessibility clients to get information
    20  * about objects in the accessible tree. The accessible tree is a subset of 
    21  * nodes in the DOM tree -- such as documents, focusable elements and text.
    22  * Mozilla creates the implementations of nsIAccessible on demand.
    23  * See http://www.mozilla.org/projects/ui/accessibility for more information.
    24  */
    25 [scriptable, uuid(ee62158b-bb83-424b-a88d-d7d7f9cf460d)]
    26 interface nsIAccessible : nsISupports
    27 {
    28   /**
    29    * Parent node in accessible tree.
    30    */
    31   readonly attribute nsIAccessible parent;
    33   /**
    34    * Next sibling in accessible tree
    35    */
    36   readonly attribute nsIAccessible nextSibling;
    38   /**
    39    * Previous sibling in accessible tree
    40    */
    41   readonly attribute nsIAccessible previousSibling;
    43   /**
    44    * First child in accessible tree
    45    */
    46   readonly attribute nsIAccessible firstChild;
    48   /**
    49    * Last child in accessible tree
    50    */
    51   readonly attribute nsIAccessible lastChild;
    53   /**
    54    * Array of all this element's children.
    55    */
    56   readonly attribute nsIArray children;
    58   /**
    59    * Number of accessible children
    60    */
    61   readonly attribute long childCount;
    63   /**
    64    * The 0-based index of this accessible in its parent's list of children,
    65    * or -1 if this accessible does not have a parent.
    66    */
    67   readonly attribute long indexInParent;
    69   /**
    70    * The DOM node this nsIAccessible is associated with.
    71    */
    72   readonly attribute nsIDOMNode DOMNode;
    74   /**
    75    * The document accessible that this access node resides in.
    76    */
    77   readonly attribute nsIAccessibleDocument document;
    79   /**
    80    * The root document accessible that this access node resides in.
    81    */
    82   readonly attribute nsIAccessibleDocument rootDocument;
    84   /**
    85    * The language for the current DOM node, e.g. en, de, etc.
    86    */
    87   readonly attribute DOMString language;
    89   /**
    90    * Accessible name -- the main text equivalent for this node. The name is
    91    * specified by ARIA or by native markup. Example of ARIA markup is
    92    * aria-labelledby attribute placed on element of this accessible. Example
    93    * of native markup is HTML label linked with HTML element of this accessible.
    94    *
    95    * Value can be string or null. A null value indicates that AT may attempt to
    96    * compute the name. Any string value, including the empty string, should be
    97    * considered author-intentional, and respected.
    98    */
    99   attribute AString name;
   101   /**
   102    * Accessible value -- a number or a secondary text equivalent for this node
   103    * Widgets that use role attribute can force a value using the valuenow attribute
   104    */
   105   readonly attribute AString value;
   107   /**
   108    * Accessible description -- long text associated with this node
   109    */
   110   readonly attribute AString description;
   112   /**
   113    * Provides localized string of accesskey name, such as Alt+D.
   114    * The modifier may be affected by user and platform preferences.
   115    * Usually alt+letter, or just the letter alone for menu items. 
   116    */
   117   readonly attribute AString accessKey;
   119   /**
   120    * Provides localized string of global keyboard accelerator for default
   121    * action, such as Ctrl+O for Open file
   122    */
   123   readonly attribute AString keyboardShortcut;
   125   /**
   126    * Enumerated accessible role (see the constants defined in nsIAccessibleRole).
   127    *
   128    * @note  The values might depend on platform because of variations. Widgets
   129    *        can use ARIA role attribute to force the final role.
   130    */
   131   readonly attribute unsigned long role;
   133   /**
   134    * Accessible states -- bit fields which describe boolean properties of node.
   135    * Many states are only valid given a certain role attribute that supports
   136    * them.
   137    *
   138    * @param aState - the first bit field (see nsIAccessibleStates::STATE_*
   139    *                 constants)
   140    * @param aExtraState - the second bit field
   141    *                      (see nsIAccessibleStates::EXT_STATE_* constants)
   142    */
   143   void getState(out unsigned long aState, out unsigned long aExtraState);
   145   /**
   146    * Help text associated with node
   147    */
   148   readonly attribute AString help;
   150   /**
   151    * Focused accessible child of node
   152    */
   153   readonly attribute nsIAccessible focusedChild;
   155   /**
   156    * Attributes of accessible
   157    */
   158   readonly attribute nsIPersistentProperties attributes;
   160   /**
   161    * Returns grouping information. Used for tree items, list items, tab panel
   162    * labels, radio buttons, etc. Also used for collectons of non-text objects.
   163    *
   164    * @param groupLevel - 1-based, similar to ARIA 'level' property
   165    * @param similarItemsInGroup - 1-based, similar to ARIA 'setsize' property,
   166    *                              inclusive of the current item
   167    * @param positionInGroup - 1-based, similar to ARIA 'posinset' property
   168    */
   169   [binaryname(ScriptableGroupPosition)]
   170   void groupPosition(out long aGroupLevel, out long aSimilarItemsInGroup,
   171                      out long aPositionInGroup);
   173   /**
   174    * Accessible child which contains the coordinate at (x, y) in screen pixels.
   175    * If the point is in the current accessible but not in a child, the
   176    * current accessible will be returned.
   177    * If the point is in neither the current accessible or a child, then
   178    * null will be returned.
   179    *
   180    * @param x  screen's x coordinate
   181    * @param y  screen's y coordinate
   182    * @return   the deepest accessible child containing the given point
   183    */
   184   nsIAccessible getChildAtPoint(in long x, in long y);
   186   /**
   187    * Deepest accessible child which contains the coordinate at (x, y) in screen
   188    * pixels. If the point is in the current accessible but not in a child, the
   189    * current accessible will be returned. If the point is in neither the current
   190    * accessible or a child, then null will be returned.
   191    *
   192    * @param x  screen's x coordinate
   193    * @param y  screen's y coordinate
   194    * @return   the deepest accessible child containing the given point
   195    */
   196   nsIAccessible getDeepestChildAtPoint(in long x, in long y);
   198   /**
   199    * Nth accessible child using zero-based index or last child if index less than zero
   200    */
   201   nsIAccessible getChildAt(in long aChildIndex);
   203   /**
   204    * Return accessible relation by the given relation type (see.
   205    * constants defined in nsIAccessibleRelation).
   206    */
   207   nsIAccessibleRelation getRelationByType(in unsigned long aRelationType);
   209   /**
   210    * Returns multiple accessible relations for this object.
   211    */
   212   nsIArray getRelations();
   214   /**
   215    * Return accessible's x and y coordinates relative to the screen and
   216    * accessible's width and height.
   217    */
   218   void getBounds(out long x, out long y, out long width, out long height);
   220   /**
   221    * Add or remove this accessible to the current selection
   222    */
   223   void setSelected(in boolean isSelected);
   225   /**
   226    * Extend the current selection from its current accessible anchor node
   227    * to this accessible
   228    */
   229   void extendSelection();
   231   /**
   232    * Select this accessible node only
   233    */
   234   void takeSelection();
   236   /**
   237    * Focus this accessible node,
   238    * The state STATE_FOCUSABLE indicates whether this node is normally focusable.
   239    * It is the callers responsibility to determine whether this node is focusable.
   240    * accTakeFocus on a node that is not normally focusable (such as a table),
   241    * will still set focus on that node, although normally that will not be visually 
   242    * indicated in most style sheets.
   243    */
   244   void takeFocus();
   246   /**
   247    * The number of accessible actions associated with this accessible
   248    */
   249   readonly attribute uint8_t actionCount;
   251   /**
   252    * The name of the accessible action at the given zero-based index
   253    */
   254   AString getActionName(in uint8_t index);
   256   /**
   257    * The description of the accessible action at the given zero-based index
   258    */
   259   AString getActionDescription(in uint8_t aIndex);
   261   /**
   262    * Perform the accessible action at the given zero-based index
   263    * Action number 0 is the default action
   264    */
   265   void doAction(in uint8_t index);   
   267   /**
   268    * Makes an object visible on screen.
   269    *
   270    * @param scrollType - defines where the object should be placed on
   271    *                     the screen (see nsIAccessibleScrollType for
   272    *                     available constants).
   273    */
   274   void scrollTo(in unsigned long aScrollType);
   276   /**
   277    * Moves the top left of an object to a specified location.
   278    *
   279    * @param coordinateType [in] - specifies whether the coordinates are relative to
   280    *                         the screen or the parent object (for available
   281    *                         constants refer to nsIAccessibleCoordinateType)
   282    * @param x [in] - defines the x coordinate
   283    * @param y [in] - defines the y coordinate
   284   */
   285   void scrollToPoint(in unsigned long coordinateType, in long x, in long y);
   287   /**
   288    * Get a pointer to accessibility interface for this node, which is specific 
   289    * to the OS/accessibility toolkit we're running on.
   290    */
   291   [noscript] void getNativeInterface(out voidPtr aOutAccessible);
   292 };

mercurial