atspi-editabletext

## atspi-editabletext atspi-editabletext — An interface that provides methods for modifying textual content of components which support editing. |

## Synopsis

                        AtspiEditableText;
    gboolean            atspi_editable_text_set_attributes  (AtspiEditableText *obj,
                                                             const char *attributes,
                                                             gint start_pos,
                                                             gint end_pos);
    gboolean            atspi_editable_text_insert_text     (AtspiEditableText *obj,
                                                             gint position,
                                                             const gchar *text,
                                                             gint length,
                                                             GError **error);
    gboolean            atspi_editable_text_copy_text       (AtspiEditableText *obj,
                                                             gint start_pos,
                                                             gint end_pos,
                                                             GError **error);
    gboolean            atspi_editable_text_cut_text        (AtspiEditableText *obj,
                                                             gint start_pos,
                                                             gint end_pos,
                                                             GError **error);
    gboolean            atspi_editable_text_delete_text     (AtspiEditableText *obj,
                                                             gint start_pos,
                                                             gint end_pos,
                                                             GError **error);
    gboolean            atspi_editable_text_paste_text      (AtspiEditableText *obj,
                                                             gint position,
                                                             GError **error);

## Object Hierarchy

      GInterface
       +----AtspiEditableText

## Known Implementations

AtspiEditableText is implemented by AtspiAccessible.

## Description

Derived from atspi-text, the atspi-editabletext interface provides methods for modifying textual content of components which support editing. EditableText also interacts with the system clipboard via copy, cut, and paste methods.

## Details

### AtspiEditableText

    typedef struct _AtspiEditableText AtspiEditableText;

### atspi_editable_text_set_attributes ()

    gboolean            atspi_editable_text_set_attributes  (AtspiEditableText *obj,
                                                             const char *attributes,
                                                             gint start_pos,
                                                             gint end_pos);

Sets the attributes applied to a range of text from an AtspiEditableText object, and the bounds of the range.

`obj` : | a pointer to the AtspiEditableText object to modify.
`attributes` : | a string indicating the attributes to apply to the range, delimited by ':'.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### atspi_editable_text_insert_text ()

    gboolean            atspi_editable_text_insert_text     (AtspiEditableText *obj,
                                                             gint position,
                                                             const gchar *text,
                                                             gint length,
                                                             GError **error);

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.

`obj` : | a pointer to the AtspiEditableText object to modify.
`position` : | a gint indicating the character offset at which to insert the new text.
`text` : | a string representing the text to insert, in UTF-8 encoding.
`length` : | the number of characters of text to insert. If the character count of text is less than or equal to length, the entire contents of text will be inserted.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### atspi_editable_text_copy_text ()

    gboolean            atspi_editable_text_copy_text       (AtspiEditableText *obj,
                                                             gint start_pos,
                                                             gint end_pos,
                                                             GError **error);

Copies text from an AtspiEditableText object into the system clipboard.

see: atspi_editable_text_paste_text

`obj` : | a pointer to the AtspiEditableText object to modify.
`start_pos` : | a gint indicating the starting character offset of the text to copy.
`end_pos` : | a gint indicating the offset of the first character past the end of the text section to be copied.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### atspi_editable_text_cut_text ()

    gboolean            atspi_editable_text_cut_text        (AtspiEditableText *obj,
                                                             gint start_pos,
                                                             gint end_pos,
                                                             GError **error);

Deletes text from an AtspiEditableText object, copying the excised portion into the system clipboard.

see: atspi_editable_text_paste_text

`obj` : | a pointer to the AtspiEditableText object to modify.
`start_pos` : | a gint indicating the starting character offset of the text to cut.
`end_pos` : | a gint indicating the offset of the first character past the end of the text section to be cut.
Returns : | TRUE if operation was successful, FALSE otherwise.

### atspi_editable_text_delete_text ()

    gboolean            atspi_editable_text_delete_text     (AtspiEditableText *obj,
                                                             gint start_pos,
                                                             gint end_pos,
                                                             GError **error);

Deletes text from an AtspiEditableText object, without copying the excised portion into the system clipboard.

see: atspi_editable_text_cut_text

`obj` : | a pointer to the AtspiEditableText object to modify.
`start_pos` : | a gint indicating the starting character offset of the text to delete.
`end_pos` : | a gint indicating the offset of the first character past the end of the text section to be deleted.
Returns : | TRUE if the operation was successful, otherwise FALSE.

### atspi_editable_text_paste_text ()

    gboolean            atspi_editable_text_paste_text      (AtspiEditableText *obj,
                                                             gint position,
                                                             GError **error);

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.

`obj` : | a pointer to the AtspiEditableText object to modify.
`position` : | a gint indicating the character offset at which to insert the new text.
Returns : | TRUE if the operation was successful, otherwise FALSE.