2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #include <cspi/spi-private.h>
26 * AccessibleEditableText_ref:
27 * @obj: a pointer to the #AccessibleEditableText object on which to operate.
29 * Increment the reference count for an #AccessibleEditableText object.
30 * Since AccessibleEditableText is derived from AccessibleText,
31 * this is the same as AccessibleText_ref().
34 AccessibleEditableText_ref (AccessibleEditableText *obj)
36 cspi_object_ref (obj);
40 * AccessibleEditableText_unref:
41 * @obj: a pointer to the #AccessibleEditableText object on which to operate.
43 * Decrement the reference count for an #AccessibleEdiitableText object.
44 * Since AccessibleEditableText is derived from AccessibleText,
45 * this is the same as AccessibleText_unref().
48 AccessibleEditableText_unref (AccessibleEditableText *obj)
50 cspi_object_unref (obj);
54 * AccessibleEditableText_setAttributes:
55 * @obj: a pointer to the #AccessibleEditableText object to modify.
56 * @attributes: a character string indicating the attributes to apply to the range,
58 * @startOffset: a #long indicating the start of the desired text range.
59 * @endOffset: a #long indicating the first character past the desired range.
61 * Set the attributes applied to a range of text from an #AccessibleEditableText
62 * object, and the bounds of the range.
64 * Returns: #TRUE if the operation was successful, otherwise #FALSE.
67 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
68 const char *attributes,
74 cspi_return_val_if_fail (obj != NULL, FALSE);
77 Accessibility_EditableText_setAttributes (CSPI_OBJREF (obj),
82 cspi_return_val_if_ev ("setAttributes", FALSE);
88 * AccessibleEditableText_setTextContents:
89 * @obj: a pointer to the #AccessibleEditableText object to modify.
90 * @newContents: a character string, encoded in UTF-8, which is to
91 * become the new text contents of the #AccessibleEditableText object.
93 * Replace the entire text contents of an #AccessibleEditableText object.
95 * Returns: #TRUE if the operation was successful, otherwise #FALSE.
98 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
99 const char *newContents)
103 cspi_return_val_if_fail (obj != NULL, FALSE);
105 retval = Accessibility_EditableText_setTextContents (CSPI_OBJREF (obj),
106 newContents, cspi_ev ());
108 cspi_return_val_if_ev ("setTextContents", FALSE);
114 * AccessibleEditableText_insertText:
115 * @obj: a pointer to the #AccessibleEditableText object to modify.
116 * @position: an integer indicating the character offset at which to insert
118 * @text: a char* pointer to the text to insert, in UTF-8 encoding.
119 * @length: (frankly I'm not sure this parameter should be here)
121 * Insert text into an #AccessibleEditableText object.
122 * As with all character offsets, the specified @position may not be the
123 * same as the resulting byte offset, since the text is in a
124 * variable-width encoding.
126 * Returns: #TRUE if the operation was successful, otherwise #FALSE.
129 AccessibleEditableText_insertText (AccessibleEditableText *obj,
136 cspi_return_val_if_fail (obj != NULL, FALSE);
138 retval = Accessibility_EditableText_insertText (CSPI_OBJREF (obj),
142 cspi_return_val_if_ev ("insertText", FALSE);
148 * AccessibleEditableText_copyText:
149 * @obj: a pointer to the #AccessibleEditableText object to modify.
150 * @startPos: an integer indicating the starting character offset
151 * of the text to copy.
152 * @endPos: an integer indicating the offset of the first character
153 * past the end of the text section to be copied.
155 * Copy text from an #AccessibleEditableText object into the clipboard.
157 * @see: AccessibleEditableText_pasteText
159 * Returns: #TRUE if the operation was successful, otherwise #FALSE.
162 AccessibleEditableText_copyText (AccessibleText *obj,
166 cspi_return_val_if_fail (obj != NULL, FALSE);
168 Accessibility_EditableText_copyText (
169 CSPI_OBJREF (obj), startPos,
172 cspi_return_val_if_ev ("copyText", FALSE);
178 * AccessibleEditableText_cutText:
179 * @obj: a pointer to the #AccessibleEditableText object to modify.
180 * @startPos: an integer indicating the starting character offset
181 * of the text to cut.
182 * @endPos: an integer indicating the offset of the first character
183 * past the end of the text section to be cut.
185 * Delete text from an #AccessibleEditableText object, copying the
186 * excised portion into the clipboard.
188 * @see: AccessibleEditableText_pasteText
190 * Returns: #TRUE if operation was successful, #FALSE otherwise.
193 AccessibleEditableText_cutText (AccessibleEditableText *obj,
199 cspi_return_val_if_fail (obj != NULL, FALSE);
201 retval = Accessibility_EditableText_cutText (
203 startPos, endPos, cspi_ev ());
205 cspi_return_val_if_ev ("cutText", FALSE);
211 * AccessibleEditableText_deleteText:
212 * @obj: a pointer to the #AccessibleEditableText object to modify.
213 * @startPos: an integer indicating the starting character offset
214 * of the text to delete.
215 * @endPos: an integer indicating the offset of the first character
216 * past the end of the text section to be deleted.
218 * Delete text from an #AccessibleEditableText object, without copying the
219 * excised portion into the clipboard.
221 * @see: AccessibleEditableText_cutText
223 * Returns: #TRUE if the operation was successful, otherwise #FALSE.
226 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
232 cspi_return_val_if_fail (obj != NULL, FALSE);
234 retval = Accessibility_EditableText_deleteText (
236 startPos, endPos, cspi_ev ());
238 cspi_return_val_if_ev ("deleteText", FALSE);
244 * AccessibleEditableText_pasteText:
245 * @obj: a pointer to the #AccessibleEditableText object to modify.
246 * @position: an integer indicating the character offset at which to insert
249 * Insert text from the clipboard into an #AccessibleEditableText object.
250 * As with all character offsets, the specified @position may not be the
251 * same as the resulting byte offset, since the text is in a
252 * variable-width encoding.
254 * Returns: #TRUE if the operation was successful, otherwise #FALSE.
257 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
262 cspi_return_val_if_fail (obj != NULL, FALSE);
264 retval = Accessibility_EditableText_pasteText (
265 CSPI_OBJREF (obj), position, cspi_ev ());
267 cspi_return_val_if_ev ("pasteText", FALSE);