mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
3111e08278
--HG-- rename : accessible/public/ia2/IA2Marshal.def => accessible/interfaces/ia2/IA2Marshal.def rename : accessible/public/ia2/Makefile.in => accessible/interfaces/ia2/Makefile.in rename : accessible/public/ia2/moz.build => accessible/interfaces/ia2/moz.build rename : accessible/public/moz.build => accessible/interfaces/moz.build rename : accessible/public/msaa/AccessibleMarshal.def => accessible/interfaces/msaa/AccessibleMarshal.def rename : accessible/public/msaa/ISimpleDOMDocument.idl => accessible/interfaces/msaa/ISimpleDOMDocument.idl rename : accessible/public/msaa/ISimpleDOMNode.idl => accessible/interfaces/msaa/ISimpleDOMNode.idl rename : accessible/public/msaa/ISimpleDOMText.idl => accessible/interfaces/msaa/ISimpleDOMText.idl rename : accessible/public/msaa/Makefile.in => accessible/interfaces/msaa/Makefile.in rename : accessible/public/msaa/moz.build => accessible/interfaces/msaa/moz.build rename : accessible/public/nsIAccessibilityService.h => accessible/interfaces/nsIAccessibilityService.h rename : accessible/public/nsIAccessible.idl => accessible/interfaces/nsIAccessible.idl rename : accessible/public/nsIAccessibleApplication.idl => accessible/interfaces/nsIAccessibleApplication.idl rename : accessible/public/nsIAccessibleCaretMoveEvent.idl => accessible/interfaces/nsIAccessibleCaretMoveEvent.idl rename : accessible/public/nsIAccessibleDocument.idl => accessible/interfaces/nsIAccessibleDocument.idl rename : accessible/public/nsIAccessibleEditableText.idl => accessible/interfaces/nsIAccessibleEditableText.idl rename : accessible/public/nsIAccessibleEvent.idl => accessible/interfaces/nsIAccessibleEvent.idl rename : accessible/public/nsIAccessibleHideEvent.idl => accessible/interfaces/nsIAccessibleHideEvent.idl rename : accessible/public/nsIAccessibleHyperLink.idl => accessible/interfaces/nsIAccessibleHyperLink.idl rename : accessible/public/nsIAccessibleHyperText.idl => accessible/interfaces/nsIAccessibleHyperText.idl rename : accessible/public/nsIAccessibleImage.idl => accessible/interfaces/nsIAccessibleImage.idl rename : accessible/public/nsIAccessiblePivot.idl => accessible/interfaces/nsIAccessiblePivot.idl rename : accessible/public/nsIAccessibleRelation.idl => accessible/interfaces/nsIAccessibleRelation.idl rename : accessible/public/nsIAccessibleRetrieval.idl => accessible/interfaces/nsIAccessibleRetrieval.idl rename : accessible/public/nsIAccessibleRole.idl => accessible/interfaces/nsIAccessibleRole.idl rename : accessible/public/nsIAccessibleSelectable.idl => accessible/interfaces/nsIAccessibleSelectable.idl rename : accessible/public/nsIAccessibleStateChangeEvent.idl => accessible/interfaces/nsIAccessibleStateChangeEvent.idl rename : accessible/public/nsIAccessibleStates.idl => accessible/interfaces/nsIAccessibleStates.idl rename : accessible/public/nsIAccessibleTable.idl => accessible/interfaces/nsIAccessibleTable.idl rename : accessible/public/nsIAccessibleTableChangeEvent.idl => accessible/interfaces/nsIAccessibleTableChangeEvent.idl rename : accessible/public/nsIAccessibleText.idl => accessible/interfaces/nsIAccessibleText.idl rename : accessible/public/nsIAccessibleTextChangeEvent.idl => accessible/interfaces/nsIAccessibleTextChangeEvent.idl rename : accessible/public/nsIAccessibleTextRange.idl => accessible/interfaces/nsIAccessibleTextRange.idl rename : accessible/public/nsIAccessibleTypes.idl => accessible/interfaces/nsIAccessibleTypes.idl rename : accessible/public/nsIAccessibleValue.idl => accessible/interfaces/nsIAccessibleValue.idl rename : accessible/public/nsIAccessibleVirtualCursorChangeEvent.idl => accessible/interfaces/nsIAccessibleVirtualCursorChangeEvent.idl rename : accessible/public/nsIXBLAccessible.idl => accessible/interfaces/nsIXBLAccessible.idl
155 lines
4.9 KiB
Plaintext
155 lines
4.9 KiB
Plaintext
/* -*- 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;
|
|
interface nsIAccessibleText;
|
|
interface nsIArray;
|
|
interface nsIVariant;
|
|
|
|
/**
|
|
* A range representing a piece of text in the document.
|
|
*/
|
|
[scriptable, uuid(525b3401-8a67-4822-b35d-661065767cd8)]
|
|
interface nsIAccessibleTextRange : nsISupports
|
|
{
|
|
readonly attribute nsIAccessibleText startContainer;
|
|
readonly attribute long startOffset;
|
|
readonly attribute nsIAccessibleText endContainer;
|
|
readonly attribute long endOffset;
|
|
|
|
/**
|
|
* Return an accessible containing the whole range
|
|
*/
|
|
readonly attribute nsIAccessible container;
|
|
|
|
/**
|
|
* Return embedded children within the range.
|
|
*/
|
|
readonly attribute nsIArray embeddedChildren;
|
|
|
|
/**
|
|
* 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);
|
|
|
|
/**
|
|
* Return text within the range.
|
|
*/
|
|
readonly attribute AString text;
|
|
|
|
/**
|
|
* Return list of rects of the range.
|
|
*/
|
|
readonly attribute nsIArray bounds;
|
|
|
|
const unsigned long FormatUnit = 0;
|
|
const unsigned long WordUnit = 1;
|
|
const unsigned long LineUnit = 2;
|
|
const unsigned long ParagraphUnit = 3;
|
|
const unsigned long PageUnit = 4;
|
|
const unsigned long DocumentUnit = 5;
|
|
|
|
/**
|
|
* Move the boundary(ies) by the given number of the unit.
|
|
*/
|
|
void move(in unsigned long aUnit, in long aCount);
|
|
void moveStart(in unsigned long aUnit, in long aCount);
|
|
void moveEnd(in unsigned long aUnit, in long aCount);
|
|
|
|
/**
|
|
* Normalize the range to the closest unit of the given type.
|
|
*/
|
|
void normalize(in unsigned long aUnit);
|
|
|
|
/**
|
|
* Return range enclosing the found text.
|
|
*/
|
|
nsIAccessibleTextRange findText(in AString aText, in boolean aIsBackward,
|
|
in boolean aIsIgnoreCase);
|
|
|
|
/**
|
|
* Text attributes. Used in conjunction with findAttrs().
|
|
*/
|
|
const unsigned long AnimationStyleAttr = 0;
|
|
const unsigned long AnnotationObjectsAttr = 1;
|
|
const unsigned long AnnotationTypesAttr = 2;
|
|
const unsigned long BackgroundColorAttr = 3;
|
|
const unsigned long BulletStyleAttr = 4;
|
|
const unsigned long CapStyleAttr = 5;
|
|
const unsigned long CaretBidiModeAttr = 6;
|
|
const unsigned long CaretPositionAttr = 7;
|
|
const unsigned long CultureAttr = 8;
|
|
const unsigned long FontNameAttr = 9;
|
|
const unsigned long FontSizeAttr = 10;
|
|
const unsigned long FontWeightAttr = 11;
|
|
const unsigned long ForegroundColorAttr = 12;
|
|
const unsigned long HorizontalTextAlignmentAttr = 13;
|
|
const unsigned long IndentationFirstLineAttr = 14;
|
|
const unsigned long IndentationLeadingAttr = 15;
|
|
const unsigned long IndentationTrailingAttr = 16;
|
|
const unsigned long IsActiveAttr = 17;
|
|
const unsigned long IsHiddenAttr = 18;
|
|
const unsigned long IsItalicAttr = 19;
|
|
const unsigned long IsReadOnlyAttr = 20;
|
|
const unsigned long IsSubscriptAttr = 21;
|
|
const unsigned long IsSuperscriptAttr = 22;
|
|
const unsigned long LinkAttr = 23;
|
|
const unsigned long MarginBottomAttr = 24;
|
|
const unsigned long MarginLeadingAttr = 25;
|
|
const unsigned long MarginTopAttr = 26;
|
|
const unsigned long MarginTrailingAttr = 27;
|
|
const unsigned long OutlineStylesAttr = 28;
|
|
const unsigned long OverlineColorAttr = 29;
|
|
const unsigned long OverlineStyleAttr = 30;
|
|
const unsigned long SelectionActiveEndAttr = 31;
|
|
const unsigned long StrikethroughColorAttr = 32;
|
|
const unsigned long StrikethroughStyleAttr = 33;
|
|
const unsigned long StyleIdAttr = 34;
|
|
const unsigned long StyleNameAttr = 35;
|
|
const unsigned long TabsAttr = 36;
|
|
const unsigned long TextFlowDirectionsAttr = 37;
|
|
const unsigned long UnderlineColorAttr = 38;
|
|
const unsigned long UnderlineStyleAttr = 39;
|
|
|
|
/**
|
|
* Return range enslosing the text having requested attribute.
|
|
*/
|
|
nsIAccessibleTextRange findAttr(in unsigned long aAttr, in nsIVariant aValue,
|
|
in boolean aIsBackward);
|
|
|
|
/**
|
|
* Add/remove the text range from selection.
|
|
*/
|
|
void addToSelection();
|
|
void removeFromSelection();
|
|
void select();
|
|
|
|
const unsigned long AlignToTop = 0;
|
|
const unsigned long AlignToBottom = 1;
|
|
|
|
/**
|
|
* Scroll the range into view.
|
|
*/
|
|
void scrollIntoView(in unsigned long aHow);
|
|
};
|