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;
115 /* Deprecated in favor of GetAttributeRun. */
116 method GetAttributes {
119 Attributes attributes;
124 /* Deprecated in facor of GetDefaultAttributeSet. */
125 method GetDefaultAttributes reply {
126 Attributes attributes;
130 Obtain a bounding box of the character glyph at a particular character offset,
131 in the given coordinate system.
133 method GetCharacterExtents {
144 Get the offset of the character at a given on-screen coordinate. The coordinate
145 system used is determined by the give coordinate type.
147 method GetOffsetAtPoint {
152 /* -1 if the point is outside the bounds of any glyph. */
157 Obtain the number of separate, contiguous selections in the current Text object.
159 method GetNSelections reply {
163 method GetSelection {
164 int32 selection_index;
170 method AddSelection {
177 method RemoveSelection {
178 int32 selection_index;
183 method SetSelection {
184 int32 selection_index;
192 Obtain the bounding box which entirely contains the given text range.
193 Negative values may be obtained in the event that part of the text range is
196 method GetRangeExtents {
208 Return the text content within a bounding box.
210 Depending on the clip type glyphs which are clipped by the bounding box
211 may, or may not be inclide in the ranges returned.
213 method GetBoundedRanges {
226 Gets the attributes of a particular text objects defined at a given offset.
227 The attributes are invariant over the offsets returned.
229 method GetAttributeRun {
231 boolean include_defaults;
233 Attributes attributes;
239 Gets the default attributes that apply to the entire text.
241 method GetAttributeSet reply {
242 Attributes attributes'
247 All objects supporting EditableText should also support the
250 Provides methods for modifying textual content of components which support editing.
251 EditableText also interacts with the system clipboard.
253 interface EditableText {
255 Replace the text contents with a new string, discarding the old contents.
257 method SetTextContents {
264 Insert new text contents into a given location.
275 Copy a range of text in to the system clipboard.
283 Excise a range of text, copying it to the system clipboard.
293 Excise a range of text from the object without copying to the system clipboard.
303 Copy the contents of the system clip-board in to the text object.