nsIAccessibleText

IID:E44D3FA6-9CB2-432A-8BDB-69D72B6ADA00
Inherits From:nsISupports

Constants

nsAccessibleTextBoundary BOUNDARY_CHAR = 0
nsAccessibleTextBoundary BOUNDARY_WORD_START = 1
nsAccessibleTextBoundary BOUNDARY_WORD_END = 2
nsAccessibleTextBoundary BOUNDARY_SENTENCE_START = 3
nsAccessibleTextBoundary BOUNDARY_SENTENCE_END = 4
nsAccessibleTextBoundary BOUNDARY_LINE_START = 5
nsAccessibleTextBoundary BOUNDARY_LINE_END = 6
nsAccessibleTextBoundary BOUNDARY_ATTRIBUTE_RANGE = 7
nsAccessibleCoordType COORD_TYPE_SCREEN = 0
nsAccessibleCoordType COORD_TYPE_WINDOW = 1

Properties

PRInt32 caretOffset

readonly PRInt32 characterCount

readonly PRInt32 selectionCount


Methods

void addSelection ( PRInt32 startOffset , PRInt32 endOffset ) nsISupports getAttributeRange ( PRInt32 offset , out PRInt32 rangeStartOffset , out PRInt32 rangeEndOffset ) PRUnichar getCharacterAtOffset ( PRInt32 offset ) void getCharacterExtents ( PRInt32 offset , out PRInt32 x , out PRInt32 y , out PRInt32 width , out PRInt32 height , nsAccessibleCoordType coordType ) PRInt32 getOffsetAtPoint ( PRInt32 x , PRInt32 y , nsAccessibleCoordType coordType ) void getSelectionBounds ( PRInt32 selectionNum , out PRInt32 startOffset , out PRInt32 endOffset ) AString getText ( PRInt32 startOffset , PRInt32 endOffset ) AString getTextAfterOffset ( PRInt32 offset , nsAccessibleTextBoundary boundaryType , out PRInt32 startOffset , out PRInt32 endOffset ) AString getTextAtOffset ( PRInt32 offset , nsAccessibleTextBoundary boundaryType , out PRInt32 startOffset , out PRInt32 endOffset ) AString getTextBeforeOffset ( PRInt32 offset , nsAccessibleTextBoundary boundaryType , out PRInt32 startOffset , out PRInt32 endOffset ) void removeSelection ( PRInt32 selectionNum ) void setSelectionBounds ( PRInt32 selectionNum , PRInt32 startOffset , PRInt32 endOffset )

void addSelection ( PRInt32 startOffset , PRInt32 endOffset )

Arguments:
startOffset
endOffset

nsISupports getAttributeRange ( PRInt32 offset , out PRInt32 rangeStartOffset , out PRInt32 rangeEndOffset )

Arguments:
offset
rangeStartOffset
rangeEndOffset

PRUnichar getCharacterAtOffset ( PRInt32 offset )

It would be better to return an unsigned long here, to allow unicode chars > 16 bits

Arguments:
offset

void getCharacterExtents ( PRInt32 offset , out PRInt32 x , out PRInt32 y , out PRInt32 width , out PRInt32 height , nsAccessibleCoordType coordType )

Arguments:
offset
x
y
width
height
coordType

PRInt32 getOffsetAtPoint ( PRInt32 x , PRInt32 y , nsAccessibleCoordType coordType )

Arguments:
x
y
coordType

void getSelectionBounds ( PRInt32 selectionNum , out PRInt32 startOffset , out PRInt32 endOffset )

Arguments:
selectionNum
startOffset
endOffset

AString getText ( PRInt32 startOffset , PRInt32 endOffset )

String methods may need to return multibyte-encoded strings, since some locales can't be encoded using 16-bit chars. So the methods below might return UTF-16 strings, or they could return "string" values which are UTF-8.

Arguments:
startOffset
endOffset

AString getTextAfterOffset ( PRInt32 offset , nsAccessibleTextBoundary boundaryType , out PRInt32 startOffset , out PRInt32 endOffset )

Arguments:
offset
boundaryType
startOffset
endOffset

AString getTextAtOffset ( PRInt32 offset , nsAccessibleTextBoundary boundaryType , out PRInt32 startOffset , out PRInt32 endOffset )

Arguments:
offset
boundaryType
startOffset
endOffset

AString getTextBeforeOffset ( PRInt32 offset , nsAccessibleTextBoundary boundaryType , out PRInt32 startOffset , out PRInt32 endOffset )

Arguments:
offset
boundaryType
startOffset
endOffset

void removeSelection ( PRInt32 selectionNum )

Arguments:
selectionNum

void setSelectionBounds ( PRInt32 selectionNum , PRInt32 startOffset , PRInt32 endOffset )

Arguments:
selectionNum
startOffset
endOffset

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com