Atspi.EditableText

g Atspi.EditableText Atspi.EditableText GObject.GInterface GObject.GInterface GObject.GInterface->Atspi.EditableText

Implementations:

Atspi.Accessible

Methods

copy_text (start_pos, end_pos)

cut_text (start_pos, end_pos)

delete_text (start_pos, end_pos)

insert_text (position, text, length)

paste_text (position)

set_text_contents (new_contents)

Virtual Methods

None

Properties

None

Signals

None

Fields

None

Class Details

class Atspi.EditableText
Bases:

GObject.GInterface

copy_text(start_pos, end_pos)
Parameters:
  • start_pos (int) – a int indicating the starting character offset of the text to copy.

  • end_pos (int) – a int indicating the offset of the first character past the end of the text section to be copied.

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Copies text from an Atspi.EditableText object into the system clipboard.

see: Atspi.EditableText.paste_text

cut_text(start_pos, end_pos)
Parameters:
  • start_pos (int) – a int indicating the starting character offset of the text to cut.

  • end_pos (int) – a int indicating the offset of the first character past the end of the text section to be cut.

Raises:

GLib.Error

Returns:

True if operation was successful, False otherwise.

Return type:

bool

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

see: Atspi.EditableText.paste_text

delete_text(start_pos, end_pos)
Parameters:
  • start_pos (int) – a int indicating the starting character offset of the text to delete.

  • end_pos (int) – a int indicating the offset of the first character past the end of the text section to be deleted.

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

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

see: Atspi.EditableText.cut_text

insert_text(position, text, length)
Parameters:
  • position (int) – a int indicating the character offset at which to insert the new text.

  • text (str) – a string representing the text to insert, in UTF-8 encoding.

  • length (int) – 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.

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Inserts text into an Atspi.EditableText 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.

paste_text(position)
Parameters:

position (int) – a int indicating the character offset at which to insert the new text.

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Inserts text from the system clipboard into an Atspi.EditableText 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.

set_text_contents(new_contents)
Parameters:

new_contents (str) – a character string, encoded in UTF-8, which is to become the new text contents of the Atspi.EditableText object.

Raises:

GLib.Error

Returns:

True if the operation was successful, otherwise False.

Return type:

bool

Replace the entire text contents of an Atspi.EditableText object.