nsISupports
Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)void addSelection(in long startOffset, in long endOffset); |
nsIAccessible getAttributeRange(in long offset, out long rangeStartOffset, out long rangeEndOffset); Obsolete since Gecko 1.9.1 |
wchar getCharacterAtOffset(in long offset); |
void getCharacterExtents(in long offset, out long x, out long y, out long width, out long height, in unsigned long coordType); |
long getOffsetAtPoint(in long x, in long y, in unsigned long coordType); |
void getRangeExtents(in long startOffset, in long endOffset, out long x, out long y, out long width, out long height, in unsigned long coordType); |
void getSelectionBounds(in long selectionNum, out long startOffset, out long endOffset); |
AString getText(in long startOffset, in long endOffset); |
AString getTextAfterOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); |
AString getTextAtOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); |
nsIPersistentProperties getTextAttributes(in boolean includeDefAttrs, in long offset, out long rangeStartOffset, out long rangeEndOffset); |
AString getTextBeforeOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset); |
void removeSelection(in long selectionNum); |
void scrollSubstringTo(in long startIndex, in long endIndex, in unsigned long scrollType); |
void scrollSubstringToPoint(in long startIndex, in long endIndex, in unsigned long coordinateType, in long x, in long y); |
void setSelectionBounds(in long selectionNum, in long startOffset, in long endOffset); |
Attribute | Type | Description |
caretOffset | long | The current current caret offset. If set < 0 then caret will be placed at the end of the text. |
characterCount | long | Read only. |
defaultTextAttributes | nsIPersistentProperties | Return the text attributes that apply to the entire accessible. Read only. |
selectionCount | long | Read only. |
Constant | Value | Description |
TEXT_OFFSET_END_OF_TEXT | -1 | Will be treated as the equal to the end of the text. |
TEXT_OFFSET_CARET | -2 | Will be treated as the caret position. |
Constant | Value | Description |
BOUNDARY_CHAR | 0 | |
BOUNDARY_WORD_START | 1 | |
BOUNDARY_WORD_END | 2 | |
BOUNDARY_SENTENCE_START | 3 | Do not use in new code. |
BOUNDARY_SENTENCE_END | 4 | Do not use in new code. |
BOUNDARY_LINE_START | 5 | |
BOUNDARY_LINE_END | 6 | |
BOUNDARY_ATTRIBUTE_RANGE | 7 |
Obsolete since Gecko 1.9 (Firefox 3)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Constant | Value | Description |
COORD_TYPE_SCREEN | 0 | |
COORD_TYPE_WINDOW | 1 |
void addSelection( in long startOffset, in long endOffset );
startOffset
endOffset
Get the accessible and start/end offsets around the given offset. This accessible get return the DOM node and layout frame with the uniform attributes for this range of text.
nsIAccessible getAttributeRange( in long offset, out long rangeStartOffset, out long rangeEndOffset );
offset
rangeStartOffset
rangeEndOffset
It would be better to return an unsigned long here, to allow unicode chars > 16 bits.
wchar getCharacterAtOffset( in long offset );
offset
Returns the bounding box of the specified position.
The virtual character after the last character of the represented text, that is the one at position length is a special case. It represents the current input position and will therefore typically be queried by AT more often than other positions. Because it does not represent an existing character its bounding box is defined in relation to preceding characters. It should be roughly equivalent to the bounding box of some character when inserted at the end of the text. Its height typically being the maximal height of all the characters in the text or the height of the preceding character, its width being at least one pixel so that the bounding box is not degenerate.
void getCharacterExtents( in long offset, out long x, out long y, out long width, out long height, in unsigned long coordType );
offset
x
y
width
height
coordType
nsIAccessibleCoordinateType.Constants
).Get the text offset at the given point, or return -1 if no character exists at that point.
long getOffsetAtPoint( in long x, in long y, in unsigned long coordType );
x
y
coordType
nsIAccessibleCoordinateType
).Offset - Index of the character under the given point or -1 if the point is invalid or there is no character under the point.
The virtual character after the last character of the represented text, that is the one at position length is a special case. It represents the current input position and will therefore typically be queried by AT more often than other positions. Because it does not represent an existing character its bounding box is defined in relation to preceding characters. It should be roughly equivalent to the bounding box of some character when inserted at the end of the text. Its height typically being the maximal height of all the characters in the text or the height of the preceding character, its width being at least one pixel so that the bounding box is not degenerate.
void getRangeExtents( in long startOffset, in long endOffset, out long x, out long y, out long width, out long height, in unsigned long coordType );
startOffset
endOffset
x
y
width
height
coordType
nsIAccessibleCoordinateType.Constants
.void getSelectionBounds( in long selectionNum, out long startOffset, out long endOffset );
selectionNum
startOffset
endOffset
String methods may need to return multibyte-encoded strings, since some locales can not be encoded using 16-bit chars. So this method might return UTF-16 strings, or it could return "string" values which are UTF-8.
AString getText( in long startOffset, in long endOffset );
startOffset
endOffset
String methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars. So this method might return UTF-16 strings, or it could return "string" values which are UTF-8.
AString getTextAfterOffset( in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset );
offset
boundaryType
startOffset
endOffset
String methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars. So this method might return UTF-16 strings, or it could return "string" values which are UTF-8.
AString getTextAtOffset( in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset );
offset
boundaryType
startOffset
endOffset
Get the accessible start/end offsets around the given offset, return the text attributes for this range of text.
nsIPersistentProperties getTextAttributes( in boolean includeDefAttrs, in long offset, out long rangeStartOffset, out long rangeEndOffset );
includeDefAttrs
offset
rangeStartOffset
rangeEndOffset
Missing Exception
String methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars. So this method might return UTF-16 strings, or it could return "string" values which are UTF-8.
AString getTextBeforeOffset( in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset );
offset
boundaryType
startOffset
endOffset
void removeSelection( in long selectionNum );
selectionNum
Makes a specific part of string visible on screen.
void scrollSubstringTo( in long startIndex, in long endIndex, in unsigned long scrollType );
startIndex
endIndex
scrollType
nsIAccessibleScrollType.Constants
for available constants)Moves the top left of a substring to a specified location.
void scrollSubstringToPoint( in long startIndex, in long endIndex, in unsigned long coordinateType, in long x, in long y );
startIndex
endIndex
coordinateType
nsIAccessibleCoordinateType.Constants
)x
y
Set the bounds for the given selection range.
void setSelectionBounds( in long selectionNum, in long startOffset, in long endOffset );
selectionNum
startOffset
endOffset