2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIArray.idl"
|
|
|
|
|
|
|
|
interface nsIPersistentProperties;
|
2012-02-07 05:18:33 -08:00
|
|
|
interface nsIDOMCSSPrimitiveValue;
|
|
|
|
interface nsIDOMNode;
|
|
|
|
interface nsIAccessibleDocument;
|
2007-05-19 19:41:33 -07:00
|
|
|
interface nsIAccessibleRelation;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A cross-platform interface that supports platform-specific
|
|
|
|
* accessibility APIs like MSAA and ATK. Contains the sum of what's needed
|
|
|
|
* to support IAccessible as well as ATK's generic accessibility objects.
|
|
|
|
* Can also be used by in-process accessibility clients to get information
|
|
|
|
* about objects in the accessible tree. The accessible tree is a subset of
|
|
|
|
* nodes in the DOM tree -- such as documents, focusable elements and text.
|
|
|
|
* Mozilla creates the implementations of nsIAccessible on demand.
|
|
|
|
* See http://www.mozilla.org/projects/ui/accessibility for more information.
|
|
|
|
*/
|
2013-09-24 07:12:54 -07:00
|
|
|
[scriptable, uuid(ee62158b-bb83-424b-a88d-d7d7f9cf460d)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIAccessible : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Parent node in accessible tree.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible parent;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Next sibling in accessible tree
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible nextSibling;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Previous sibling in accessible tree
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible previousSibling;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* First child in accessible tree
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible firstChild;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Last child in accessible tree
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible lastChild;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Array of all this element's children.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIArray children;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Number of accessible children
|
|
|
|
*/
|
|
|
|
readonly attribute long childCount;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The 0-based index of this accessible in its parent's list of children,
|
|
|
|
* or -1 if this accessible does not have a parent.
|
|
|
|
*/
|
|
|
|
readonly attribute long indexInParent;
|
|
|
|
|
2012-02-07 05:18:33 -08:00
|
|
|
/**
|
|
|
|
* The DOM node this nsIAccessible is associated with.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDOMNode DOMNode;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The document accessible that this access node resides in.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessibleDocument document;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The root document accessible that this access node resides in.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessibleDocument rootDocument;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The language for the current DOM node, e.g. en, de, etc.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString language;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
2008-12-16 08:13:49 -08:00
|
|
|
* Accessible name -- the main text equivalent for this node. The name is
|
|
|
|
* specified by ARIA or by native markup. Example of ARIA markup is
|
|
|
|
* aria-labelledby attribute placed on element of this accessible. Example
|
|
|
|
* of native markup is HTML label linked with HTML element of this accessible.
|
|
|
|
*
|
|
|
|
* Value can be string or null. A null value indicates that AT may attempt to
|
|
|
|
* compute the name. Any string value, including the empty string, should be
|
|
|
|
* considered author-intentional, and respected.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
attribute AString name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Accessible value -- a number or a secondary text equivalent for this node
|
|
|
|
* Widgets that use role attribute can force a value using the valuenow attribute
|
|
|
|
*/
|
|
|
|
readonly attribute AString value;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Accessible description -- long text associated with this node
|
|
|
|
*/
|
|
|
|
readonly attribute AString description;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides localized string of accesskey name, such as Alt+D.
|
|
|
|
* The modifier may be affected by user and platform preferences.
|
|
|
|
* Usually alt+letter, or just the letter alone for menu items.
|
|
|
|
*/
|
2012-06-10 16:44:50 -07:00
|
|
|
readonly attribute AString accessKey;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides localized string of global keyboard accelerator for default
|
|
|
|
* action, such as Ctrl+O for Open file
|
|
|
|
*/
|
2012-06-10 16:44:50 -07:00
|
|
|
readonly attribute AString keyboardShortcut;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2009-03-07 07:38:58 -08:00
|
|
|
* Enumerated accessible role (see the constants defined in nsIAccessibleRole).
|
|
|
|
*
|
|
|
|
* @note The values might depend on platform because of variations. Widgets
|
|
|
|
* can use ARIA role attribute to force the final role.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
readonly attribute unsigned long role;
|
|
|
|
|
|
|
|
/**
|
2007-04-02 08:56:24 -07:00
|
|
|
* Accessible states -- bit fields which describe boolean properties of node.
|
|
|
|
* Many states are only valid given a certain role attribute that supports
|
|
|
|
* them.
|
|
|
|
*
|
|
|
|
* @param aState - the first bit field (see nsIAccessibleStates::STATE_*
|
|
|
|
* constants)
|
|
|
|
* @param aExtraState - the second bit field
|
|
|
|
* (see nsIAccessibleStates::EXT_STATE_* constants)
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2008-11-03 19:37:46 -08:00
|
|
|
void getState(out unsigned long aState, out unsigned long aExtraState);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Help text associated with node
|
|
|
|
*/
|
|
|
|
readonly attribute AString help;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Focused accessible child of node
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible focusedChild;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Attributes of accessible
|
|
|
|
*/
|
|
|
|
readonly attribute nsIPersistentProperties attributes;
|
|
|
|
|
2007-03-27 05:17:11 -07:00
|
|
|
/**
|
|
|
|
* Returns grouping information. Used for tree items, list items, tab panel
|
|
|
|
* labels, radio buttons, etc. Also used for collectons of non-text objects.
|
|
|
|
*
|
2007-04-16 22:13:24 -07:00
|
|
|
* @param groupLevel - 1-based, similar to ARIA 'level' property
|
2007-11-12 19:03:29 -08:00
|
|
|
* @param similarItemsInGroup - 1-based, similar to ARIA 'setsize' property,
|
|
|
|
* inclusive of the current item
|
2007-04-16 22:13:24 -07:00
|
|
|
* @param positionInGroup - 1-based, similar to ARIA 'posinset' property
|
2007-03-27 05:17:11 -07:00
|
|
|
*/
|
2013-09-24 07:12:54 -07:00
|
|
|
[binaryname(ScriptableGroupPosition)]
|
2007-03-27 05:17:11 -07:00
|
|
|
void groupPosition(out long aGroupLevel, out long aSimilarItemsInGroup,
|
|
|
|
out long aPositionInGroup);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Accessible child which contains the coordinate at (x, y) in screen pixels.
|
2007-09-18 14:44:43 -07:00
|
|
|
* If the point is in the current accessible but not in a child, the
|
|
|
|
* current accessible will be returned.
|
|
|
|
* If the point is in neither the current accessible or a child, then
|
|
|
|
* null will be returned.
|
2008-09-17 06:11:39 -07:00
|
|
|
*
|
|
|
|
* @param x screen's x coordinate
|
|
|
|
* @param y screen's y coordinate
|
|
|
|
* @return the deepest accessible child containing the given point
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
nsIAccessible getChildAtPoint(in long x, in long y);
|
|
|
|
|
2008-09-17 06:11:39 -07:00
|
|
|
/**
|
|
|
|
* Deepest accessible child which contains the coordinate at (x, y) in screen
|
|
|
|
* pixels. If the point is in the current accessible but not in a child, the
|
|
|
|
* current accessible will be returned. If the point is in neither the current
|
|
|
|
* accessible or a child, then null will be returned.
|
|
|
|
*
|
|
|
|
* @param x screen's x coordinate
|
|
|
|
* @param y screen's y coordinate
|
|
|
|
* @return the deepest accessible child containing the given point
|
|
|
|
*/
|
|
|
|
nsIAccessible getDeepestChildAtPoint(in long x, in long y);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Nth accessible child using zero-based index or last child if index less than zero
|
|
|
|
*/
|
|
|
|
nsIAccessible getChildAt(in long aChildIndex);
|
|
|
|
|
|
|
|
/**
|
2009-02-10 02:03:30 -08:00
|
|
|
* Return accessible relation by the given relation type (see.
|
2007-05-19 19:41:33 -07:00
|
|
|
* constants defined in nsIAccessibleRelation).
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2009-02-10 02:03:30 -08:00
|
|
|
nsIAccessibleRelation getRelationByType(in unsigned long aRelationType);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-05-19 19:41:33 -07:00
|
|
|
/**
|
|
|
|
* Returns multiple accessible relations for this object.
|
|
|
|
*/
|
|
|
|
nsIArray getRelations();
|
|
|
|
|
2007-05-15 23:04:20 -07:00
|
|
|
/**
|
|
|
|
* Return accessible's x and y coordinates relative to the screen and
|
|
|
|
* accessible's width and height.
|
|
|
|
*/
|
|
|
|
void getBounds(out long x, out long y, out long width, out long height);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add or remove this accessible to the current selection
|
|
|
|
*/
|
|
|
|
void setSelected(in boolean isSelected);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Extend the current selection from its current accessible anchor node
|
|
|
|
* to this accessible
|
|
|
|
*/
|
|
|
|
void extendSelection();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Select this accessible node only
|
|
|
|
*/
|
|
|
|
void takeSelection();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Focus this accessible node,
|
|
|
|
* The state STATE_FOCUSABLE indicates whether this node is normally focusable.
|
|
|
|
* It is the callers responsibility to determine whether this node is focusable.
|
|
|
|
* accTakeFocus on a node that is not normally focusable (such as a table),
|
|
|
|
* will still set focus on that node, although normally that will not be visually
|
|
|
|
* indicated in most style sheets.
|
|
|
|
*/
|
|
|
|
void takeFocus();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The number of accessible actions associated with this accessible
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
readonly attribute uint8_t actionCount;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The name of the accessible action at the given zero-based index
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
AString getActionName(in uint8_t index);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The description of the accessible action at the given zero-based index
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
AString getActionDescription(in uint8_t aIndex);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform the accessible action at the given zero-based index
|
|
|
|
* Action number 0 is the default action
|
|
|
|
*/
|
2012-08-22 08:56:38 -07:00
|
|
|
void doAction(in uint8_t index);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-02-07 05:18:33 -08:00
|
|
|
/**
|
|
|
|
* Makes an object visible on screen.
|
|
|
|
*
|
|
|
|
* @param scrollType - defines where the object should be placed on
|
|
|
|
* the screen (see nsIAccessibleScrollType for
|
|
|
|
* available constants).
|
|
|
|
*/
|
|
|
|
void scrollTo(in unsigned long aScrollType);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Moves the top left of an object to a specified location.
|
|
|
|
*
|
|
|
|
* @param coordinateType [in] - specifies whether the coordinates are relative to
|
|
|
|
* the screen or the parent object (for available
|
|
|
|
* constants refer to nsIAccessibleCoordinateType)
|
|
|
|
* @param x [in] - defines the x coordinate
|
|
|
|
* @param y [in] - defines the y coordinate
|
|
|
|
*/
|
|
|
|
void scrollToPoint(in unsigned long coordinateType, in long x, in long y);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Get a pointer to accessibility interface for this node, which is specific
|
|
|
|
* to the OS/accessibility toolkit we're running on.
|
|
|
|
*/
|
|
|
|
[noscript] void getNativeInterface(out voidPtr aOutAccessible);
|
|
|
|
};
|
2007-05-19 19:41:33 -07:00
|
|
|
|