2014-02-27 20:33:09 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIAccessible;
|
2014-05-23 04:10:19 +04:00
|
|
|
interface nsIAccessibleText;
|
|
|
|
interface nsIArray;
|
|
|
|
interface nsIVariant;
|
2014-02-27 20:33:09 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A range representing a piece of text in the document.
|
|
|
|
*/
|
2016-07-26 16:55:00 +03:00
|
|
|
[scriptable, builtinclass, uuid(c4515623-55f9-4543-a3d5-c1e9afa588f4)]
|
2014-02-27 20:33:09 +04:00
|
|
|
interface nsIAccessibleTextRange : nsISupports
|
|
|
|
{
|
2014-05-23 04:10:19 +04:00
|
|
|
readonly attribute nsIAccessibleText startContainer;
|
2014-02-27 20:33:09 +04:00
|
|
|
readonly attribute long startOffset;
|
2014-05-23 04:10:19 +04:00
|
|
|
readonly attribute nsIAccessibleText endContainer;
|
2014-02-27 20:33:09 +04:00
|
|
|
readonly attribute long endOffset;
|
|
|
|
|
2014-05-23 04:10:19 +04:00
|
|
|
/**
|
|
|
|
* Return an accessible containing the whole range
|
|
|
|
*/
|
|
|
|
readonly attribute nsIAccessible container;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return true if this range has the same end points of the given range.
|
|
|
|
*/
|
|
|
|
boolean compare(in nsIAccessibleTextRange aOtherRange);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The two endpoints of the range (starting and ending).
|
|
|
|
*/
|
|
|
|
const unsigned long EndPoint_Start = 1;
|
|
|
|
const unsigned long EndPoint_End = 2;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Compare this and given ranges end points.
|
|
|
|
*
|
|
|
|
* @return -1/0/1 if this range end point is before/equal/after the given
|
|
|
|
* range end point.
|
|
|
|
*/
|
|
|
|
long compareEndPoints(in unsigned long aEndPoint,
|
|
|
|
in nsIAccessibleTextRange aOtherRange,
|
|
|
|
in unsigned long aOtherRangeEndPoint);
|
|
|
|
|
2016-01-20 20:53:03 +03:00
|
|
|
/**
|
|
|
|
* Crops the range by the given accessible element.
|
|
|
|
*/
|
|
|
|
boolean crop(in nsIAccessible aContainer);
|
|
|
|
|
2014-05-23 04:10:19 +04:00
|
|
|
const unsigned long AlignToTop = 0;
|
|
|
|
const unsigned long AlignToBottom = 1;
|
2014-02-27 20:33:09 +04:00
|
|
|
};
|