2 namespace org.freestandards.atspi {
4 The text interface should be implemented by objects which place textual information onscreen
5 as character strings or glyphs. The text interface allows access to textual content including
6 display attributes and semantic hints associated with runs of text, and to bounding boc information
7 for glyphs and substrings. It also alows portions of text to be selected, if the objects StateSet
8 includes STATE_SELECTABLE_TEXT.
12 Specified the boundary conditions determining a run of text
18 enum <uint32> TextBoundaryType {
20 TEXT_BOUNDARY_WORD_START,
21 TEXT_BOUNDARY_WORD_END,
22 TEXT_BOUNDARY_SENTENCE_START,
23 TEXT_BOUNDARY_SENTENCE_END,
24 TEXT_BOUNDARY_LINE_START,
25 TEXT_BOUNDARY_LINE_END
28 enum <uint32> TextClipType {
36 A structure used to define a contiguous range of text, including
37 its (unattributed) textual content.
46 /* The total number of character in the text object including whitespace. */
47 read property int32 CharacterCount;
49 /* The current offset of the text caret in the Text object. */
50 read property int32 CaretOffset;
52 /* Move the text caret to a given position. */
53 method SetCaretOffset {
60 Obtain the subset of text content that entirely precedes the given offset,
61 delimited by character word, line or sentente boundaries.
63 method GetTextBeforeOffset {
65 TextBoundaryType type;
73 Obtain the subset of text content that includes the given offset,
74 delimited by character word, line or sentente boundaries.
76 method GetTextAtOffset {
78 TextBoundaryType type;
86 Obtain the subset of text content that entirely follows the given offset,
87 delimited by character word, line or sentente boundaries.
89 method GetTextAfterOffset {
91 TextBoundaryType type;
98 method GetCharacterAtOffset {
101 /* UCS-4 representation of the character or 0 if offset out-of-range. */
106 Get the value of a named attribute at a given offset.
108 method GetAttributeValue {
110 string attribute_key;
112 string attribute_value;
118 /* Deprecated in favor of GetAttributeRun. */
119 method GetAttributes {
122 Attributes attributes;
127 /* Deprecated in facor of GetDefaultAttributeSet. */
128 method GetDefaultAttributes reply {
129 Attributes attributes;
133 Obtain a bounding box of the character glyph at a particular character offset,
134 in the given coordinate system.
136 method GetCharacterExtents {
147 Get the offset of the character at a given on-screen coordinate. The coordinate
148 system used is determined by the give coordinate type.
150 method GetOffsetAtPoint {
155 /* -1 if the point is outside the bounds of any glyph. */
160 Obtain the number of separate, contiguous selections in the current Text object.
162 method GetNSelections reply {
166 method GetSelection {
167 int32 selection_index;
173 method AddSelection {
180 method RemoveSelection {
181 int32 selection_index;
186 method SetSelection {
187 int32 selection_index;
195 Obtain the bounding box which entirely contains the given text range.
196 Negative values may be obtained in the event that part of the text range is
199 method GetRangeExtents {
211 Return the text content within a bounding box.
213 Depending on the clip type glyphs which are clipped by the bounding box
214 may, or may not be inclide in the ranges returned.
216 method GetBoundedRanges {
229 Gets the attributes of a particular text objects defined at a given offset.
230 The attributes are invariant over the offsets returned.
232 method GetAttributeRun {
234 boolean include_defaults;
236 Attributes attributes;
242 Gets the default attributes that apply to the entire text.
244 method GetAttributeSet reply {
245 Attributes attributes'
250 All objects supporting EditableText should also support the
253 Provides methods for modifying textual content of components which support editing.
254 EditableText also interacts with the system clipboard.
256 interface EditableText {
258 Replace the text contents with a new string, discarding the old contents.
260 method SetTextContents {
267 Insert new text contents into a given location.
278 Copy a range of text in to the system clipboard.
286 Excise a range of text, copying it to the system clipboard.
296 Excise a range of text from the object without copying to the system clipboard.
306 Copy the contents of the system clip-board in to the text object.