other-licenses/ia2/Accessible2_3.idl
author David Burns <dburns@mozilla.com>
Tue, 31 May 2016 23:23:05 +0100
changeset 302069 7be72cdc9d7801fced2f4496e1c5b14eb6c0fa9a
parent 280749 c34410da6b0130bc5430d18a20ad0357114ab0ed
permissions -rw-r--r--
Bug 1277090: Have Marionette return only attributes from getElementAttribute. r=ato Using the Selenium atom we are conflating properties and attributes which is not thing we really want to be doing. MozReview-Commit-ID: HdZOz1jQrwz

import "objidl.idl";
import "oaidl.idl";
import "oleacc.idl";
import "Accessible2_2.idl";

/**
 * This structure represents a directional range of the content. It is defined
 * by two points in the content, where each one is defined by an accessible
 * object and an offset relative to it. A typical case of a range point is
 * a text accessible and text offset within it.
 *
 * The "anchor" is one point of the range and typically remains constant.
 * The other point is the "active" point, which typically corresponds to
 * the user's focus or point of interest. The user moves the active point to
 * expand or collapse the range. In most cases, anchor is the start of the range
 * and active is the end. However, in case of selection, when selecting
 * backwards (e.g. pressing shift+left arrow in a text field), the start of
 * the range is the active point, as the user moves this to manipulate
 * the selection.
 */
typedef struct IA2Range {
  IUnknown* anchor;
  long anchorOffset;
  IUnknown* active;
  long activeOffset;
} IA2Range;

/**
 * @brief This interface is an extension of IAccessible2_2 and IAccessible2
 * interfaces.
 */
[object, uuid(5BE18059-762E-4E73-9476-ABA294FED411)]
interface IAccessible2_3 : IAccessible2_2
{
  /**
   * @brief Returns an array of ranges for selections within the accessible.
   * @param [out] the array of selection ranges
   * @param [out] the array length
   * @retval S_OK
   * @retval S_FALSE returned if there is no selection within the accessible
  */
  [propget] HRESULT selectionRanges
    (
      [out, size_is(,*nRanges)] IA2Range **ranges,
      [out, retval] long *nRanges
    );
}