* Copyright 2001, 2002 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
+ * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Library General Public
+ * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#include "atspi-private.h"
/**
* atspi_editable_text_set_attributes:
* @obj: a pointer to the #AtspiEditableText object to modify.
- * @attributes: a character string indicating the attributes to apply to the range,
+ * @attributes: a string indicating the attributes to apply to the range,
* delimited by ':'.
- * @startOffset: a #long indicating the start of the desired text range.
- * @endOffset: a #long indicating the first character past the desired range.
+ * @startOffset: a #gint indicating the start of the desired text range.
+ * @endOffset: a #gint indicating the first character past the desired range.
*
- * Set the attributes applied to a range of text from an #AtspiEditableText
+ * Sets the attributes applied to a range of text from an #AtspiEditableText
* object, and the bounds of the range.
*
* Returns: #TRUE if the operation was successful, otherwise #FALSE.
GError **error
{
dbus_int32_t d_start_pos = start_pos, d_end_pos = end_pos;
- dbus_bool_t retval;
+ dbus_bool_t retval = FALSE;
cspi_return_val_if_fail (obj != NULL, FALSE);
g_return_val_if_fail (obj != NULL, FALSE);
- _atspi_dbus_call (obj, atspi_interface_editable_text, "setTextContents", error, "s=>b", new_contents, &retval);
+ _atspi_dbus_call (obj, atspi_interface_editable_text, "SetTextContents", error, "s=>b", new_contents, &retval);
return retval;
}
/**
* atspi_editable_text_insert_text:
* @obj: a pointer to the #AtspiEditableText object to modify.
- * @position: an integer indicating the character offset at which to insert
+ * @position: a #gint indicating the character offset at which to insert
* the new text.
- * @text: a gchar* pointer to the text to insert, in UTF-8 encoding.
- * @length: (frankly I'm not sure this parameter should be here)
+ * @text: a string representing the text to insert, in UTF-8 encoding.
+ * @length: the number of characters of text to insert, in bytes. If the
+ * byte count of text is less than or equal to length, the entire contents
+ * of text will be inserted.
*
- * Insert text into an #AtspiEditableText object.
+ * Inserts text into an #AtspiEditableText object.
* As with all character offsets, the specified @position may not be the
- * same as the resulting byte offset, since the text is in a
- * variable-width encoding.
+ * same as the resulting byte offset, since the text is in a
+ * variable-width encoding.
*
* Returns: #TRUE if the operation was successful, otherwise #FALSE.
**/
/**
* atspi_editable_text_copy_text:
* @obj: a pointer to the #AtspiEditableText object to modify.
- * @start_pos: an integer indicating the starting character offset
+ * @start_pos: a #gint indicating the starting character offset
* of the text to copy.
- * @end_pos: an integer indicating the offset of the first character
+ * @end_pos: a #gint indicating the offset of the first character
* past the end of the text section to be copied.
*
- * Copy text from an #AtspiEditableText object into the clipboard.
+ * Copies text from an #AtspiEditableText object into the system clipboard.
*
- * see: atspi_editable_text_paste_text
+ * see: #atspi_editable_text_paste_text
*
* Returns: #TRUE if the operation was successful, otherwise #FALSE.
**/
g_return_val_if_fail (obj != NULL, FALSE);
- _atspi_dbus_call (obj, atspi_interface_editable_text, "CopyText", error, "ii", start_pos, end_pos);
+ _atspi_dbus_call (obj, atspi_interface_editable_text, "CopyText", error, "ii", d_start_pos, d_end_pos);
return TRUE;
}
/**
* atspi_editable_text_cut_text:
* @obj: a pointer to the #AtspiEditableText object to modify.
- * @start_pos: an integer indicating the starting character offset
+ * @start_pos: a #gint indicating the starting character offset
* of the text to cut.
- * @end_pos: an integer indicating the offset of the first character
+ * @end_pos: a #gint indicating the offset of the first character
* past the end of the text section to be cut.
*
- * Delete text from an #AtspiEditableText object, copying the
- * excised portion into the clipboard.
+ * Deletes text from an #AtspiEditableText object, copying the
+ * excised portion into the system clipboard.
*
- * see: atspi_editable_text_paste_text
+ * see: #atspi_editable_text_paste_text
*
* Returns: #TRUE if operation was successful, #FALSE otherwise.
**/
/**
* atspi_editable_text_delete_text:
* @obj: a pointer to the #AtspiEditableText object to modify.
- * @start_pos: an integer indicating the starting character offset
+ * @start_pos: a #gint indicating the starting character offset
* of the text to delete.
- * @end_pos: an integer indicating the offset of the first character
+ * @end_pos: a #gint indicating the offset of the first character
* past the end of the text section to be deleted.
*
- * Delete text from an #AtspiEditableText object, without copying the
- * excised portion into the clipboard.
+ * Deletes text from an #AtspiEditableText object, without copying the
+ * excised portion into the system clipboard.
*
- * see: atspi_editable_text_cut_text
+ * see: #atspi_editable_text_cut_text
*
* Returns: #TRUE if the operation was successful, otherwise #FALSE.
**/
/**
* atspi_editable_text_paste_text:
* @obj: a pointer to the #AtspiEditableText object to modify.
- * @position: an integer indicating the character offset at which to insert
+ * @position: a #gint indicating the character offset at which to insert
* the new text.
*
- * Insert text from the clipboard into an #AtspiEditableText object.
+ * Inserts text from the system clipboard into an #AtspiEditableText object.
* As with all character offsets, the specified @position may not be the
* same as the resulting byte offset, since the text is in a
* variable-width encoding.