2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include <cspi/spi-private.h>
26 static Accessibility_TEXT_BOUNDARY_TYPE
27 get_accessible_text_boundary_type (AccessibleTextBoundaryType type)
31 case SPI_TEXT_BOUNDARY_CHAR:
32 return Accessibility_TEXT_BOUNDARY_CHAR;
34 case SPI_TEXT_BOUNDARY_CURSOR_POS:
36 return Accessibility_TEXT_BOUNDARY_CHAR;
38 case SPI_TEXT_BOUNDARY_WORD_START:
39 return Accessibility_TEXT_BOUNDARY_WORD_START;
41 case SPI_TEXT_BOUNDARY_WORD_END:
42 return Accessibility_TEXT_BOUNDARY_WORD_END;
44 case SPI_TEXT_BOUNDARY_SENTENCE_START:
45 return Accessibility_TEXT_BOUNDARY_SENTENCE_START;
47 case SPI_TEXT_BOUNDARY_SENTENCE_END:
48 return Accessibility_TEXT_BOUNDARY_SENTENCE_END;
50 case SPI_TEXT_BOUNDARY_LINE_START:
51 return Accessibility_TEXT_BOUNDARY_LINE_START;
53 case SPI_TEXT_BOUNDARY_LINE_END:
54 return Accessibility_TEXT_BOUNDARY_LINE_END;
56 case SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE:
58 return Accessibility_TEXT_BOUNDARY_CHAR;
62 return Accessibility_TEXT_BOUNDARY_CHAR;
66 static Accessibility_TEXT_CLIP_TYPE
67 get_accessible_text_clip_type (AccessibleTextClipType type)
71 case SPI_TEXT_CLIP_NONE:
72 return Accessibility_TEXT_CLIP_NONE;
74 case SPI_TEXT_CLIP_MIN:
75 return Accessibility_TEXT_CLIP_MIN;
77 case SPI_TEXT_CLIP_MAX:
78 return Accessibility_TEXT_CLIP_MAX;
81 return Accessibility_TEXT_CLIP_BOTH;
85 static AccessibleTextRange **
86 get_accessible_text_ranges_from_range_seq (Accessibility_Text_RangeList *range_seq)
88 AccessibleTextRange **ranges = NULL;
89 AccessibleTextRange *array = NULL;
91 if (range_seq && range_seq->_length > 0)
93 ranges = g_new0 (AccessibleTextRange *, range_seq->_length + 1);
95 array = g_new0 (AccessibleTextRange, range_seq->_length);
96 for (i = 0; i < range_seq->_length; i++)
98 AccessibleTextRange *range;
100 range->start = range_seq->_buffer[i].startOffset;
101 range->end = range_seq->_buffer[i].endOffset;
102 range->contents = CORBA_string_dup (range_seq->_buffer[i].content);
105 ranges[i] = NULL; /* null-terminated list! */
106 CORBA_free (range_seq);
113 * AccessibleText_ref:
114 * @obj: a pointer to the #AccessibleText object on which to operate.
116 * Increment the reference count for an #AccessibleText object.
119 AccessibleText_ref (AccessibleText *obj)
121 cspi_object_ref (obj);
125 * AccessibleText_unref:
126 * @obj: a pointer to the #Accessible object on which to operate.
128 * Decrement the reference count for an #AccessibleText object.
131 AccessibleText_unref (AccessibleText *obj)
133 cspi_object_unref (obj);
137 * AccessibleText_getCharacterCount:
138 * @obj: a pointer to the #AccessibleText object to query.
140 * Get the character count of an #AccessibleText object.
142 * Returns: a long integer indicating the total number of
143 * characters in the #AccessibleText object.
146 AccessibleText_getCharacterCount (AccessibleText *obj)
150 cspi_return_val_if_fail (obj != NULL, -1);
152 retval = Accessibility_Text__get_characterCount (CSPI_OBJREF (obj), cspi_ev ());
154 cspi_return_val_if_ev ("getCharacterCount", -1);
160 * AccessibleText_getText:
161 * @obj: a pointer to the #AccessibleText object to query.
162 * @startOffset: a #long indicating the start of the desired text range.
163 * @endOffset: a #long indicating the first character past the desired range.
165 * Get a range of text from an #AccessibleText object. The number of bytes
166 * in the returned string may exceed endOffset-startOffset, since
167 * UTF-8 is a variable-width encoding.
169 * Returns: a text string containing characters from @startOffset
170 * to @endOffset-1, inclusive, encoded as UTF-8.
173 AccessibleText_getText (AccessibleText *obj,
174 long int startOffset,
179 cspi_return_val_if_fail (obj != NULL, NULL);
182 Accessibility_Text_getText (CSPI_OBJREF (obj),
187 cspi_return_val_if_ev ("getText", NULL);
193 * AccessibleText_getCaretOffset:
194 * @obj: a pointer to the #AccessibleText object to query.
196 * Get the current offset of the text caret in an #AccessibleText object.
198 * Returns: a long integer indicating the current position of the text caret.
201 AccessibleText_getCaretOffset (AccessibleText *obj)
205 cspi_return_val_if_fail (obj != NULL, -1);
208 Accessibility_Text__get_caretOffset (CSPI_OBJREF (obj), cspi_ev ());
210 cspi_return_val_if_ev ("getCaretOffset", -1);
216 * AccessibleText_getAttributes:
217 * @obj: a pointer to the #AccessibleText object to query.
218 * @offset: a long integer indicating the offset from which the attribute
220 * @startOffset: a #long indicating the start of the desired text range.
221 * @endOffset: a #long indicating the first character past the desired range.
223 * Get the attributes applied to a range of text from an #AccessibleText
224 * object, and the bounds of the range.
225 * The text attributes correspond to CSS attributes where possible,
226 * keys and values are delimited from one another via ":", and
227 * the delimiter between key/value pairs is ";". Thus
228 * "font-size:10;foreground-color:0,0,0" would be a valid
231 * Returns: a text string describing the attributes occurring within the
232 * attribute run containing @offset, encoded as UTF-8.
235 AccessibleText_getAttributes (AccessibleText *obj,
237 long int *startOffset,
240 CORBA_long retStartOffset, retEndOffset;
245 *startOffset = *endOffset = -1;
249 retval = Accessibility_Text_getAttributes (CSPI_OBJREF (obj),
255 if (!cspi_check_ev ("getAttributes"))
257 *startOffset = *endOffset = -1;
262 *startOffset = retStartOffset;
263 *endOffset = retEndOffset;
270 * AccessibleText_getDefaultAttributes:
271 * @obj: a pointer to the #AccessibleText object to query.
273 * Get the default attributes applied to an #AccessibleText
275 * The text attributes correspond to CSS attributes where possible,
276 * keys and values are delimited from one another via ":", and
277 * the delimiter between key/value pairs is ";". Thus
278 * "font-size:10;foreground-color:0,0,0" would be a valid
279 * return string. The combination of this attribute set and
280 * the attributes reported by #AccessibleText_getAttributes
281 * describes the entire set of text attributes over a range.
285 * Returns: a text string describing the default attributes
286 * applied to a text object, (exclusive of explicitly-set
287 * attributes), encoded as UTF-8.
290 AccessibleText_getDefaultAttributes (AccessibleText *obj)
299 retval = Accessibility_Text_getDefaultAttributes (CSPI_OBJREF (obj),
302 if (!cspi_check_ev ("getAttributes"))
311 * AccessibleText_setCaretOffset:
312 * @obj: a pointer to the #AccessibleText object on which to operate.
313 * @newOffset: the offset to which the text caret is to be moved.
315 * Set the text caret position for an #AccessibleText object.
317 * Returns: #TRUE if successful, #FALSE otherwise.
320 AccessibleText_setCaretOffset (AccessibleText *obj,
325 cspi_return_val_if_fail (obj != NULL, FALSE);
328 Accessibility_Text_setCaretOffset (CSPI_OBJREF (obj),
329 newOffset, cspi_ev ());
331 cspi_return_val_if_ev ("setCaretOffset", FALSE);
337 * AccessibleText_getTextBeforeOffset:
338 * @obj: a pointer to the #AccessibleText object on which to operate.
339 * @offset: a long integer indicating the offset from which the delimiter
341 * @type: an #AccessibleTextBoundaryType indicating whether the desired
342 * text string is a word, sentence, line, or attribute run.
343 * @startOffset: a pointer to a long integer which is assigned the
344 * starting offset of the returned string, relative to the
345 * original #AccessibleText.
346 * @endOffset: a pointer to a long integer which is assigned the
347 * ending offset of the returned string, relative to the original
350 * Get delimited text from an #AccessibleText object which precedes a given
353 * Returns: a UTF-8 string representing the delimited text, both of whose
354 * delimiting boundaries are before the current offset, or
355 * an empty string if no such text exists.
358 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
360 AccessibleTextBoundaryType type,
361 long int *startOffset,
365 CORBA_long retStartOffset, retEndOffset;
369 *startOffset = *endOffset = -1;
373 retval = Accessibility_Text_getTextBeforeOffset (CSPI_OBJREF (obj),
375 get_accessible_text_boundary_type (type),
376 &retStartOffset, &retEndOffset,
378 if (!cspi_check_ev ("getTextBeforeOffset"))
380 *startOffset = *endOffset = -1;
385 *startOffset = retStartOffset;
386 *endOffset = retEndOffset;
392 * AccessibleText_getTextAtOffset:
393 * @obj: a pointer to the #AccessibleText object on which to operate.
394 * @offset: a long integer indicating the offset from which the delimiter
396 * @type: an #AccessibleTextBoundaryType indicating whether the desired
397 * text string is a word, sentence, line, or attribute run.
398 * @startOffset: a pointer to a long integer which is assigned the
399 * starting offset of the returned string, relative to the
400 * original #AccessibleText.
401 * @endOffset: a pointer to a long integer which is assigned the
402 * ending offset of the returned string, relative to the original
405 * Get delimited text from an #AccessibleText object which includes a given
408 * Returns: a UTF-8 string representing the delimited text, whose
409 * delimiting boundaries bracket the current offset, or
410 * an empty string if no such text exists.
413 AccessibleText_getTextAtOffset (AccessibleText *obj,
415 AccessibleTextBoundaryType type,
416 long int *startOffset, long int *endOffset)
418 CORBA_long corbaStartOffset;
419 CORBA_long corbaEndOffset;
424 *startOffset = *endOffset = -1;
428 retval = Accessibility_Text_getTextAtOffset (CSPI_OBJREF (obj),
430 get_accessible_text_boundary_type (type),
435 if (!cspi_check_ev ("getTextAtOffset"))
437 *startOffset = *endOffset = -1;
442 *startOffset = corbaStartOffset;
443 *endOffset = corbaEndOffset;
449 * AccessibleText_getTextAfterOffset:
450 * @obj: a pointer to the #AccessibleText object on which to operate.
451 * @offset: a long integer indicating the offset from which the delimiter
453 * @type: an #AccessibleTextBoundaryType indicating whether the desired
454 * text string is a word, sentence, line, or attribute run.
455 * @startOffset: a pointer to a long integer which is assigned the
456 * starting offset of the returned string, relative to the
457 * original #AccessibleText.
458 * @endOffset: a pointer to a long integer which is assigned the
459 * ending offset of the returned string, relative to the original
462 * Get delimited text from an #AccessibleText object which follows a given
465 * Returns: a UTF-8 string representing the delimited text, both of whose
466 * delimiting boundaries are after or inclusive of the current
467 * offset, or an empty string if no such text exists.
470 AccessibleText_getTextAfterOffset (AccessibleText *obj,
472 AccessibleTextBoundaryType type,
473 long int *startOffset, long int *endOffset)
476 CORBA_long retStartOffset, retEndOffset;
480 *startOffset = *endOffset = -1;
484 retval = Accessibility_Text_getTextAfterOffset (CSPI_OBJREF (obj),
486 get_accessible_text_boundary_type (type),
487 &retStartOffset, &retEndOffset,
490 if (!cspi_check_ev ("getTextAfterOffset"))
492 *startOffset = *endOffset = -1;
497 *startOffset = retStartOffset;
498 *endOffset = retEndOffset;
504 * AccessibleText_getCharacterAtOffset:
505 * @obj: a pointer to the #AccessibleText object on which to operate.
506 * @offset: a long integer indicating the text offset where the desired
507 * character is located.
509 * Get the character at a given offset for an #AccessibleText object.
511 * Returns: an #unsigned long integer which represents the
512 * UCS-4 unicode code point of the given character, or
513 * 0xFFFFFFFF if the character in question cannot be represented
514 * in the UCS-4 encoding.
517 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
522 cspi_return_val_if_fail (obj != NULL, -1);
525 Accessibility_Text_getCharacterAtOffset (CSPI_OBJREF (obj),
529 cspi_return_val_if_ev ("getCharacterAtOffset", -1);
535 * AccessibleText_getCharacterExtents:
536 * @obj: a pointer to the #AccessibleText object on which to operate.
537 * @offset: an integer indicating the offset of the text character for
538 * whom boundary information is requested.
539 * @x: a pointer to a long integer into which the nominal x coordinate
540 * of the corresponding glyph will be returned.
541 * @y:a pointer to a long integer into which the nominal y coordinate
542 * of the corresponding glyph will be returned.
543 * @width:a pointer to a long integer into which the width
544 * of the corresponding glyph will be returned.
545 * @height: a pointer to a long integer into which the height
546 * of the corresponding glyph will be returned.
547 * @type: an #AccessibleCoordType indicating the coordinate system to use
548 * for the returned values.
550 * Get the bounding box containing the glyph representing
551 * the character at a particular text offset.
554 AccessibleText_getCharacterExtents (AccessibleText *obj,
560 AccessibleCoordType type)
562 CORBA_long retX, retY, retWidth, retHeight;
567 *width = *height = -1;
571 Accessibility_Text_getCharacterExtents (CSPI_OBJREF (obj),
579 if (!cspi_check_ev ("getCharacterExtents"))
582 *width = *height = -1;
594 * AccessibleText_getOffsetAtPoint:
595 * @obj: a pointer to the #AccessibleText object on which to operate.
596 * @x: the x coordinate of the point to be queried.
597 * @y: the y coordinate of the point to be queried.
598 * @type: an #AccessibleCoordType indicating the coordinate system in which
599 * the values should be returned.
601 * Get the bounding box for a glyph at a certain #AccessibleText offset.
603 * Returns: the offset (as a long integer) at the point (@x, @y)
604 * in the specified coordinate system.
608 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
611 AccessibleCoordType type)
615 cspi_return_val_if_fail (obj != NULL, -1);
618 Accessibility_Text_getOffsetAtPoint (CSPI_OBJREF (obj),
623 cspi_return_val_if_ev ("getOffsetAtPoint", -1);
629 * AccessibleText_getRangeExtents:
630 * @obj: a pointer to the #AccessibleText object on which to operate.
631 * @startOffset: an integer indicating the offset of the first text character for
632 * whom boundary information is requested.
633 * @endOffset: an integer indicating the offset of the text character
634 * after the last character for whom boundary information is requested.
635 * @x: a pointer to a long integer into which the nominal x coordinate
636 * of the corresponding bounding box will be returned.
637 * @y:a pointer to a long integer into which the nominal y coordinate
638 * of the corresponding bounding box will be returned.
639 * @width:a pointer to a long integer into which the width
640 * of the corresponding bounding box will be returned.
641 * @height: a pointer to a long integer into which the height
642 * of the corresponding bounding box will be returned.
643 * @type: an #AccessibleCoordType indicating the coordinate system to use
644 * for the returned values.
646 * Get the bounding box for text within a range in an #AccessibleText object.
651 AccessibleText_getRangeExtents (AccessibleText *obj,
652 long int startOffset,
658 AccessibleCoordType type)
660 CORBA_long retX, retY, retWidth, retHeight;
665 *width = *height = -1;
669 Accessibility_Text_getRangeExtents (CSPI_OBJREF (obj),
678 if (!cspi_check_ev ("getRangeExtents"))
681 *width = *height = -1;
693 * AccessibleText_getBoundedRanges:
694 * @obj: a pointer to the #AccessibleText object on which to operate.
695 * @x: the 'starting' x coordinate of the bounding box.
696 * @y: the 'starting' y coordinate of the bounding box.
697 * @width: the x extent of the bounding box.
698 * @height: the y extent of the bounding box.
699 * @type: an #AccessibleCoordType indicating the coordinate system to use
700 * for the returned values.
701 * @clipTypeX: an #AccessibleTextClipType indicating how to treat characters that
702 * intersect the bounding box's x extents.
703 * @clipTypeY: an #AccessibleTextClipType indicating how to treat characters that
704 * intersect the bounding box's y extents.
706 * Get the ranges of text from an #AccessibleText object which lie within the
707 * bounds defined by (@x, @y) and (@x+@width, @y+@height).
711 * Returns: a null-terminated list of pointers to AccessibleTextRange structs
712 * detailing the bounded text.
714 AccessibleTextRange **
715 AccessibleText_getBoundedRanges (AccessibleText *obj,
720 AccessibleCoordType type,
721 AccessibleTextClipType clipTypeX,
722 AccessibleTextClipType clipTypeY)
724 Accessibility_Text_RangeList *range_seq;
726 cspi_return_val_if_fail (obj != NULL, NULL);
729 Accessibility_Text_getBoundedRanges (CSPI_OBJREF (obj),
732 get_accessible_text_clip_type (clipTypeX),
733 get_accessible_text_clip_type (clipTypeY),
736 cspi_return_val_if_ev ("getBoundedRanges", NULL);
738 return get_accessible_text_ranges_from_range_seq (range_seq);
742 * AccessibleTextRange_freeRanges:
743 * @ranges: a pointer to an array of AccessibleTextRange structs.
745 * Free the memory used by a list of AccessibleTextRange structs.
746 * The argument passed in should be an array of pointers
747 * AccessibleTextRange structs.
752 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges)
754 /* this was a contiguously allocated block, only free the first element */
760 * AccessibleText_getNSelections:
761 * @obj: a pointer to the #AccessibleText object on which to operate.
763 * Get the number of active non-contiguous selections for an
764 * #AccessibleText object.
766 * Returns: a long integer indicating the current
767 * number of non-contiguous text selections active
768 * within an #AccessibleText object.
771 AccessibleText_getNSelections (AccessibleText *obj)
775 cspi_return_val_if_fail (obj != NULL, -1);
778 Accessibility_Text_getNSelections (CSPI_OBJREF (obj), cspi_ev ());
780 cspi_return_val_if_ev ("getNSelections", -1);
786 * AccessibleText_getSelection:
787 * @obj: a pointer to the #AccessibleText object on which to operate.
788 * @selectionNum: an integer indicating which selection to query.
789 * @startOffset: a pointer to a long integer into which the start offset
790 * of the selection will be returned.
791 * @endOffset: a pointer to a long integer into which the start offset
792 * of the selection will be returned.
794 * Get the bounds of the @selectionNum-th active text selection for an
795 * #AccessibleText object.
798 AccessibleText_getSelection (AccessibleText *obj,
799 long int selectionNum,
800 long int *startOffset,
803 CORBA_long retStartOffset, retEndOffset;
807 *endOffset = *startOffset = -1;
811 Accessibility_Text_getSelection (CSPI_OBJREF (obj),
813 &retStartOffset, &retEndOffset,
816 if (!cspi_check_ev ("getSelection"))
818 *startOffset = *endOffset = -1;
822 *startOffset = retStartOffset;
823 *endOffset = retEndOffset;
828 * AccessibleText_addSelection:
829 * @obj: a pointer to the #AccessibleText object on which to operate.
830 * @startOffset: the starting offset of the desired new selection.
831 * @endOffset: the offset of the first character after the new selection.
833 * Select some text (add a text selection) in an #AccessibleText object.
835 * Returns: #TRUE if successful, #FALSE otherwise.
838 AccessibleText_addSelection (AccessibleText *obj,
839 long int startOffset, long int endOffset)
843 cspi_return_val_if_fail (obj != NULL, FALSE);
846 Accessibility_Text_addSelection (
847 CSPI_OBJREF (obj), startOffset,
848 endOffset, cspi_ev ());
850 cspi_return_val_if_ev ("addSelection", FALSE);
856 * AccessibleText_removeSelection:
857 * @obj: a pointer to the #AccessibleText object on which to operate.
858 * @selectionNum: an integer indicating which (possibly of several)
859 * text selection to remove.
861 * De-select a text selection.
863 * Returns: #TRUE if successful, #FALSE otherwise.
866 AccessibleText_removeSelection (AccessibleText *obj,
867 long int selectionNum)
871 cspi_return_val_if_fail (obj != NULL, FALSE);
874 Accessibility_Text_removeSelection (
875 CSPI_OBJREF (obj), selectionNum, cspi_ev ());
877 cspi_return_val_if_ev ("removeSelection", FALSE);
883 * AccessibleText_setSelection:
884 * @obj: a pointer to the #AccessibleText object on which to operate.
885 * @selectionNum: a zero-offset index indicating which text selection to modify.
886 * @startOffset: a long int, the new starting offset for the selection.
887 * @endOffset: a long int, the desired new offset of the first character
888 * after the selection.
890 * Change the bounds of an existing #AccessibleText text selection.
892 * Returns: #TRUE if successful, #FALSE otherwise.
895 AccessibleText_setSelection (AccessibleText *obj,
896 long int selectionNum,
897 long int startOffset,
902 cspi_return_val_if_fail (obj != NULL, FALSE);
904 retval = Accessibility_Text_setSelection (CSPI_OBJREF (obj),
907 endOffset, cspi_ev ());
909 cspi_return_val_if_ev ("setSelection", FALSE);
916 * AccessibleText_getAttributeRun:
917 * @obj: a pointer to the #AccessibleText object to query.
918 * @offset: a long integer indicating the offset from which the attribute
920 * @startOffset: a #long indicating the start of the desired text range.
921 * @endOffset: a #long indicating the first character past the desired range.
922 * @includeDefaults: a #bool if False, the call should only return those
923 * attributes which are explicitly set on the current attribute
924 * run, omitting any attributes which are inherited from the
929 * Returns: the AttributeSet defined at offset, optionally including the 'default' attributes.
932 AccessibleAttributeSet *
933 AccessibleText_getAttributeRun (AccessibleText *obj,
935 long int *startOffset,
937 long int includeDefaults){
939 CORBA_long retStartOffset, retEndOffset;
940 AccessibleAttributeSet *retval;
941 Accessibility_AttributeSet *attributes;
945 *startOffset = *endOffset = -1;
949 attributes = Accessibility_Text_getAttributeRun (CSPI_OBJREF (obj),
953 (includeDefaults)? TRUE : FALSE,
956 if (!cspi_check_ev ("getAttributeRun"))
958 *startOffset = *endOffset = -1;
963 *startOffset = retStartOffset;
964 *endOffset = retEndOffset;
967 retval = _cspi_attribute_set_from_sequence (attributes);
974 * AccessibleText_getDefaultAttributeSet:
975 * @obj: a pointer to the #AccessibleText object to query.
980 * Returns: an AttributeSet containing the text attributes
981 * which apply to all text in the object by virtue of the
982 * default settings of the document, view, or user agent; e.g.
983 * those attributes which are implied rather than explicitly
984 * applied to the text object. For instance, an object whose
985 * entire text content has been explicitly marked as 'bold'
986 * will report the 'bold' attribute via getAttributeRun(),
987 * whereas an object whose text weight is inspecified may
988 * report the default or implied text weight in the default AttributeSet.
992 AccessibleAttributeSet *
993 AccessibleText_getDefaultAttributeSet (AccessibleText *obj){
994 AccessibleAttributeSet *retval;
995 Accessibility_AttributeSet *attributes;
997 cspi_return_val_if_fail (obj != NULL, NULL);
999 attributes = Accessibility_Text_getDefaultAttributeSet (CSPI_OBJREF (obj), cspi_ev ());
1000 cspi_return_val_if_ev ("getDefaultAttributeSet", NULL);
1002 retval = _cspi_attribute_set_from_sequence (attributes);