accessible/public/nsIAccessibleHyperLink.idl

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     9 interface nsIURI;
    10 interface nsIAccessible;
    12 /**
    13  * A cross-platform interface that supports hyperlink-specific properties and
    14  * methods.  Anchors, image maps, xul:labels with class="text-link" implement this interface.
    15  */
    16 [scriptable, uuid(883643d4-93a5-4f32-922c-6f06e01363c1)]
    17 interface nsIAccessibleHyperLink : nsISupports
    18 {
    19   /**
    20    * Returns the offset of the link within the parent accessible.
    21    */
    22   readonly attribute long startIndex;
    24   /**
    25    * Returns the end index of the link within the parent accessible.
    26    *
    27    * @note  The link itself is represented by one embedded character within the
    28    * parent text, so the endIndex should be startIndex + 1.
    29    */
    30   readonly attribute long endIndex;
    32   /**
    33    * Determines whether the link is valid (e. g. points to a valid URL).
    34    *
    35    * @note  XXX Currently only used with ARIA links, and the author has to
    36    * specify that the link is invalid via the aria-invalid="true" attribute.
    37    * In all other cases, TRUE is returned.
    38    */
    39   readonly attribute boolean valid;
    41   /**
    42    * The numbber of anchors within this Hyperlink. Is normally 1 for anchors.
    43    * This anchor is, for example, the visible output of the html:a tag.
    44    * With an Image Map, reflects the actual areas within the map.
    45    */
    46   readonly attribute long anchorCount;
    48   /**
    49    * Returns the URI at the given index.
    50    *
    51    * @note  ARIA hyperlinks do not have an URI to point to, since clicks are
    52    * processed via JavaScript. Therefore this property does not work on ARIA
    53    * links.
    54    *
    55    * @param index  The 0-based index of the URI to be returned.
    56    *
    57    * @return the nsIURI object containing the specifications for the URI.
    58    */
    59   nsIURI getURI (in long index);
    61   /**
    62    * Returns a reference to the object at the given index.
    63    *
    64    * @param index  The 0-based index whose object is to be returned.
    65    *
    66    * @return the nsIAccessible object at the desired index.
    67    */
    68   nsIAccessible getAnchor (in long index);
    69 };
    71 /*
    72  Assumptions:
    74  The object associated with object or anchor index
    75  is an nsIAccessible.
    76  A URI can be represented by the nsIURI interface
    77  (or nsIURL interface).
    79  Note that an object which supports nsIAccessibleHyperlink
    80  does *not* generally implement nsIAccessible, unlike the
    81     case of the other nsiAccessible* interfaces in this directory.
    83     Aaron: would the nsISupports return from
    84     getObject be queryable for nsIURI and nsIURL directly?
    86 */

mercurial