3 * @obj: a pointer to the #AccessibleText object on which to operate.
5 * Increment the reference count for an #AccessibleText object.
7 * Returns: (no return code implemented yet).
11 AccessibleText_ref (AccessibleText *obj)
13 Accessibility_Text_ref (*obj, &ev);
20 * AccessibleText_unref:
21 * @obj: a pointer to the #Accessible object on which to operate.
23 * Decrement the reference count for an #AccessibleText object.
25 * Returns: (no return code implemented yet).
29 AccessibleText_unref (AccessibleText *obj)
31 Accessibility_Text_unref (*obj, &ev);
37 * AccessibleText_getCharacterCount:
38 * @obj: a pointer to the #AccessibleText object to query.
40 * Get the character count of an #AccessibleText object.
42 * Returns: a long integer indicating the total number of
43 * characters in the #AccessibleText object.
47 AccessibleText_getCharacterCount (AccessibleText *obj)
51 CORBA_exception_init (&ev);
53 Accessibility_Text__get_characterCount (*obj, &ev);
55 spi_check_ev (&ev, "SpiAccessibleText_getCharacterCount");
63 * AccessibleText_getText:
64 * @obj: a pointer to the #AccessibleText object to query.
65 * @startOffset: a #long indicating the start of the desired text range.
66 * @endOffset: a #long indicating the first character past the desired range.
68 * Get a range of text from an #AccessibleText object. The number of bytes
69 * in the returned string may exceed endOffset-startOffset, since
70 * UTF-8 is a variable-width encoding.
72 * Returns: a text string containing characters from @startOffset
73 * to @endOffset-1, inclusive, encoded as UTF-8.
77 AccessibleText_getText (AccessibleText *obj,
82 Accessibility_Text_getText (*obj,
83 (CORBA_long) startOffset, (CORBA_long) endOffset, &ev);
87 * AccessibleText_getCaretOffset:
88 * @obj: a pointer to the #AccessibleText object to query.
90 * Get the current offset of the text caret in an #AccessibleText object.
92 * Returns: a long integer indicating the current position of the text caret.
96 AccessibleText_getCaretOffset (AccessibleText *obj)
99 Accessibility_Text__get_caretOffset (*obj, &ev);
104 * AccessibleText_getAttributes:
105 * @obj: a pointer to the #AccessibleText object to query.
106 * @offset: a long integer indicating the offset from which the attribute
108 * @startOffset: a #long indicating the start of the desired text range.
109 * @endOffset: a #long indicating the first character past the desired range.
111 * Get the attributes applied to a range of text from an #AccessibleText
112 * object, and the bounds of the range.
114 * Returns: a text string describing the attributes occurring within the
115 * attribute run containing @offset, encoded as UTF-8 and
120 AccessibleText_getAttributes (AccessibleText *obj,
122 long int *startOffset,
125 CORBA_long retStartOffset, retEndOffset;
128 Accessibility_Text_getAttributes (*obj,
133 *startOffset = (long) retStartOffset;
134 *endOffset = (long) retEndOffset;
141 * AccessibleText_setCaretOffset:
142 * @obj: a pointer to the #AccessibleText object on which to operate.
143 * @newOffset: the offset to which the text caret is to be moved.
145 * Set the text caret position for an #AccessibleText object.
147 * Returns: #TRUE if successful, #FALSE otherwise.
151 AccessibleText_setCaretOffset (AccessibleText *obj,
155 Accessibility_Text_setCaretOffset (*obj,
156 (CORBA_long) newOffset, &ev);
160 * AccessibleText_getTextBeforeOffset:
161 * @obj: a pointer to the #AccessibleText object on which to operate.
162 * @offset: a long integer indicating the offset from which the delimiter
164 * @type: an #AccessibleTextBoundaryType indicating whether the desired
165 * text string is a word, sentence, line, or attribute run.
166 * @startOffset: a pointer to a long integer which is assigned the
167 * starting offset of the returned string, relative to the
168 * original #AccessibleText.
169 * @endOffset: a pointer to a long integer which is assigned the
170 * ending offset of the returned string, relative to the original
173 * Get delimited text from an #AccessibleText object which precedes a given
176 * Returns: a UTF-8 string representing the delimited text, both of whose
177 * delimiting boundaries are before the current offset, or
178 * an empty string if no such text exists.
182 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
184 AccessibleTextBoundaryType type,
185 long int *startOffset,
189 CORBA_long retStartOffset, retEndOffset;
191 Accessibility_Text_getTextBeforeOffset (*obj,
192 (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type,
193 &retStartOffset, &retEndOffset,
195 *startOffset = (long) retStartOffset;
196 *endOffset = (long) retEndOffset;
201 * AccessibleText_getTextAtOffset:
202 * @obj: a pointer to the #AccessibleText object on which to operate.
203 * @offset: a long integer indicating the offset from which the delimiter
205 * @type: an #AccessibleTextBoundaryType indicating whether the desired
206 * text string is a word, sentence, line, or attribute run.
207 * @startOffset: a pointer to a long integer which is assigned the
208 * starting offset of the returned string, relative to the
209 * original #AccessibleText.
210 * @endOffset: a pointer to a long integer which is assigned the
211 * ending offset of the returned string, relative to the original
214 * Get delimited text from an #AccessibleText object which includes a given
217 * Returns: a UTF-8 string representing the delimited text, whose
218 * delimiting boundaries bracket the current offset, or
219 * an empty string if no such text exists.
223 AccessibleText_getTextAtOffset (AccessibleText *obj,
225 AccessibleTextBoundaryType type,
226 long int *startOffset, long int *endOffset)
228 CORBA_long corbaStartOffset;
229 CORBA_long corbaEndOffset;
231 retval = Accessibility_Text_getTextAtOffset (*obj,
233 (Accessibility_TEXT_BOUNDARY_TYPE) type,
237 *startOffset = (long) corbaStartOffset;
238 *endOffset = (long) corbaEndOffset;
240 fprintf (stderr, "text offsets %ld to %ld\n", *startOffset, *endOffset);
247 * AccessibleText_getTextAfterOffset:
248 * @obj: a pointer to the #AccessibleText object on which to operate.
249 * @offset: a long integer indicating the offset from which the delimiter
251 * @type: an #AccessibleTextBoundaryType indicating whether the desired
252 * text string is a word, sentence, line, or attribute run.
253 * @startOffset: a pointer to a long integer which is assigned the
254 * starting offset of the returned string, relative to the
255 * original #AccessibleText.
256 * @endOffset: a pointer to a long integer which is assigned the
257 * ending offset of the returned string, relative to the original
260 * Get delimited text from an #AccessibleText object which follows a given
263 * Returns: a UTF-8 string representing the delimited text, both of whose
264 * delimiting boundaries are after or inclusive of the current
265 * offset, or an empty string if no such text exists.
269 AccessibleText_getTextAfterOffset (AccessibleText *obj,
271 AccessibleTextBoundaryType type,
272 long int *startOffset, long int *endOffset)
275 CORBA_long retStartOffset, retEndOffset;
277 Accessibility_Text_getTextAfterOffset (*obj,
278 (CORBA_long) offset, (Accessibility_TEXT_BOUNDARY_TYPE) type,
279 &retStartOffset, &retEndOffset,
281 *startOffset = (long) retStartOffset;
282 *endOffset = (long) retEndOffset;
289 * AccessibleText_getCharacterAtOffset:
290 * @obj: a pointer to the #AccessibleText object on which to operate.
291 * @offset: a long integer indicating the text offset where the desired
292 * character is located.
294 * Get the character at a given offset for an #AccessibleText object.
296 * Returns: an #unsigned long integer which represents the
297 * UCS-4 unicode code point of the given character, or
298 * 0xFFFFFFFF if the character in question cannot be represented
299 * in the UCS-4 encoding.
303 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
306 return (unsigned long)
307 Accessibility_Text_getCharacterAtOffset (*obj,
308 (CORBA_long) offset, &ev);
312 * AccessibleText_getCharacterExtents:
313 * @obj: a pointer to the #AccessibleText object on which to operate.
314 * @offset: an integer indicating the offset of the text character for
315 * whom boundary information is requested.
316 * @x: a pointer to a long integer into which the nominal x coordinate
317 * of the corresponding glyph will be returned.
318 * @y:a pointer to a long integer into which the nominal y coordinate
319 * of the corresponding glyph will be returned.
320 * @width:a pointer to a long integer into which the width
321 * of the corresponding glyph will be returned.
322 * @height: a pointer to a long integer into which the height
323 * of the corresponding glyph will be returned.
324 * @type: an #AccessibleCoordType indicating the coordinate system to use
325 * for the returned values.
327 * Get the bounding box containing the glyph representing
328 * the character at a particular text offset.
332 AccessibleText_getCharacterExtents (AccessibleText *obj,
338 AccessibleCoordType type)
340 CORBA_long retX, retY, retWidth, retHeight;
341 Accessibility_Text_getCharacterExtents (*obj,
347 (CORBA_short) type, &ev);
350 *width = (long) retWidth;
351 *height = (long) retHeight;
356 * AccessibleText_getOffsetAtPoint:
357 * @obj: a pointer to the #AccessibleText object on which to operate.
358 * @x: the x coordinate of the point to be queried.
359 * @y: the y coordinate of the point to be queried.
360 * @type: an #AccessibleCoordType indicating the coordinate system in which
361 * the values should be returned.
363 * Get the bounding box for a glyph at a certain #AccessibleText offset.
365 * Returns: the offset (as a long integer) at the point (@x, @y)
366 * in the specified coordinate system.
370 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
373 AccessibleCoordType type)
376 Accessibility_Text_getOffsetAtPoint (*obj,
377 (CORBA_long) x, (CORBA_long) y, (CORBA_short) type, &ev);
382 * AccessibleText_getNSelections:
383 * @obj: a pointer to the #AccessibleText object on which to operate.
385 * Get the number of active non-contiguous selections for an
386 * #AccessibleText object.
388 * Returns: a long integer indicating the current
389 * number of non-contiguous text selections active
390 * within an #AccessibleText object.
394 AccessibleText_getNSelections (AccessibleText *obj)
397 Accessibility_Text_getNSelections (*obj, &ev);
403 * AccessibleText_getSelection:
404 * @obj: a pointer to the #AccessibleText object on which to operate.
405 * @selectionNum: an integer indicating which selection to query.
406 * @startOffset: a pointer to a long integer into which the start offset
407 * of the selection will be returned.
408 * @endOffset: a pointer to a long integer into which the start offset
409 * of the selection will be returned.
411 * Get the bounds of the @selectionNum-th active text selection for an
412 * #AccessibleText object.
416 AccessibleText_getSelection (AccessibleText *obj,
417 long int selectionNum,
418 long int *startOffset,
421 CORBA_long retStartOffset, retEndOffset;
422 Accessibility_Text_getSelection (*obj,
423 (CORBA_long) selectionNum,
424 &retStartOffset, &retEndOffset, &ev);
426 *startOffset = (long) retStartOffset;
427 *endOffset = (long) retEndOffset;
433 * AccessibleText_addSelection:
434 * @obj: a pointer to the #AccessibleText object on which to operate.
435 * @startOffset: the starting offset of the desired new selection.
436 * @endOffset: the offset of the first character after the new selection.
438 * Select some text (add a text selection) in an #AccessibleText object.
440 * Returns: #TRUE if successful, #FALSE otherwise.
444 AccessibleText_addSelection (AccessibleText *obj,
445 long int startOffset, long int endOffset)
448 Accessibility_Text_addSelection (*obj,
449 (CORBA_long) startOffset, (CORBA_long) endOffset,
455 * AccessibleText_removeSelection:
456 * @obj: a pointer to the #AccessibleText object on which to operate.
457 * @selectionNum: an integer indicating which (possibly of several)
458 * text selection to remove.
460 * De-select a text selection.
462 * Returns: #TRUE if successful, #FALSE otherwise.
466 AccessibleText_removeSelection (AccessibleText *obj,
467 long int selectionNum)
470 Accessibility_Text_removeSelection (*obj,
471 (CORBA_long) selectionNum, &ev);
475 * AccessibleText_setSelection:
476 * @obj: a pointer to the #AccessibleText object on which to operate.
477 * @selectionNum: a zero-offset index indicating which text selection to modify.
478 * @startOffset: a long int, the new starting offset for the selection.
479 * @endOffset: a long int, the desired new offset of the first character
480 * after the selection.
482 * Change the bounds of an existing #AccessibleText text selection.
484 * Returns: #TRUE if successful, #FALSE otherwise.
488 AccessibleText_setSelection (AccessibleText *obj,
489 long int selectionNum,
490 long int startOffset,
494 Accessibility_Text_setSelection (*obj,
495 (CORBA_long) selectionNum,
496 (CORBA_long) startOffset,
497 (CORBA_long) endOffset, &ev);