tor-browser

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

nsIAccessibleTextRange.idl (1734B)


      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 nsIAccessibleText;
     10 interface nsIArray;
     11 interface nsIVariant;
     12 
     13 /**
     14 * A range representing a piece of text in the document.
     15 */
     16 [scriptable, builtinclass, uuid(c4515623-55f9-4543-a3d5-c1e9afa588f4)]
     17 interface nsIAccessibleTextRange : nsISupports
     18 {
     19  readonly attribute nsIAccessibleText startContainer;
     20  readonly attribute long startOffset;
     21  readonly attribute nsIAccessibleText endContainer;
     22  readonly attribute long endOffset;
     23 
     24  /**
     25   * Return an accessible containing the whole range
     26   */
     27  readonly attribute nsIAccessible container;
     28 
     29  /**
     30   * Return true if this range has the same end points of the given range.
     31   */
     32  boolean compare(in nsIAccessibleTextRange aOtherRange);
     33 
     34  /**
     35   * The two endpoints of the range (starting and ending).
     36   */
     37  const unsigned long EndPoint_Start = 1;
     38  const unsigned long EndPoint_End = 2;
     39 
     40  /**
     41   * Compare this and given ranges end points.
     42   *
     43   * @return -1/0/1 if this range end point is before/equal/after the given
     44   *          range end point.
     45   */
     46  long compareEndPoints(in unsigned long aEndPoint,
     47                        in nsIAccessibleTextRange aOtherRange,
     48                        in unsigned long aOtherRangeEndPoint);
     49 
     50  /**
     51   * Crops the range by the given accessible element.
     52   */
     53  boolean crop(in nsIAccessible aContainer);
     54 
     55  const unsigned long AlignToTop = 0;
     56  const unsigned long AlignToBottom = 1;
     57 };