![]() |
![]() |
![]() |
libatspi Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Known Implementations |
AtspiRange; #define ATSPI_TYPE_RANGE AtspiRange * atspi_range_copy (AtspiRange *src
); AtspiTextRange; #define ATSPI_TYPE_TEXT_RANGE GType atspi_text_get_type (); AtspiText; GType atspi_text_range_get_type (); gint atspi_text_get_character_count (AtspiText *obj
,GError **error
); gchar * atspi_text_get_text (AtspiText *obj
,gint start_offset
,gint end_offset
,GError **error
); gint atspi_text_get_caret_offset (AtspiText *obj
,GError **error
); GHashTable * atspi_text_get_attributes (AtspiText *obj
,gint offset
,gint *start_offset
,gint *end_offset
,GError **error
); GHashTable * atspi_text_get_attribute_run (AtspiText *obj
,gint offset
,gboolean include_defaults
,gint *start_offset
,gint *end_offset
,GError **error
); gchar * atspi_text_get_attribute_value (AtspiText *obj
,gint offset
,gchar *attribute_name
,GError **error
); GHashTable * atspi_text_get_default_attributes (AtspiText *obj
,GError **error
); gboolean atspi_text_set_caret_offset (AtspiText *obj
,gint new_offset
,GError **error
); AtspiTextRange * atspi_text_get_text_before_offset (AtspiText *obj
,gint offset
,AtspiTextBoundaryType type
,GError **error
); AtspiTextRange * atspi_text_get_text_at_offset (AtspiText *obj
,gint offset
,AtspiTextBoundaryType type
,GError **error
); AtspiTextRange * atspi_text_get_text_after_offset (AtspiText *obj
,gint offset
,AtspiTextBoundaryType type
,GError **error
); guint atspi_text_get_character_at_offset (AtspiText *obj
,gint offset
,GError **error
); AtspiRect * atspi_text_get_character_extents (AtspiText *obj
,gint offset
,AtspiCoordType type
,GError **error
); gint atspi_text_get_offset_at_point (AtspiText *obj
,gint x
,gint y
,AtspiCoordType type
,GError **error
); AtspiRect * atspi_text_get_range_extents (AtspiText *obj
,gint start_offset
,gint end_offset
,AtspiCoordType type
,GError **error
); GArray * atspi_text_get_bounded_ranges (AtspiText *obj
,gint x
,gint y
,gint width
,gint height
,AtspiCoordType type
,AtspiTextClipType clipTypeX
,AtspiTextClipType clipTypeY
,GError **error
); gint atspi_text_get_n_selections (AtspiText *obj
,GError **error
); AtspiRange * atspi_text_get_selection (AtspiText *obj
,gint selection_num
,GError **error
); gboolean atspi_text_add_selection (AtspiText *obj
,gint start_offset
,gint end_offset
,GError **error
); gboolean atspi_text_remove_selection (AtspiText *obj
,gint selection_num
,GError **error
); gboolean atspi_text_set_selection (AtspiText *obj
,gint selection_num
,gint start_offset
,gint end_offset
,GError **error
);
#define ATSPI_TYPE_RANGE atspi_range_get_type ()
The GType for a boxed type holding a range within a text bock.
typedef struct { gint start_offset; gint end_offset; gchar *content; } AtspiTextRange;
#define ATSPI_TYPE_TEXT_RANGE atspi_text_range_get_type ()
The GType for a boxed type holding a range within a text bock.
gint atspi_text_get_character_count (AtspiText *obj
,GError **error
);
Get the character count of an AccessibleText object.
|
a pointer to the AtspiText object to query. |
|
|
Returns : |
a long integer indicating the total number of characters in the AccessibleText object. |
gchar * atspi_text_get_text (AtspiText *obj
,gint start_offset
,gint end_offset
,GError **error
);
Get a range of text from an AtspiText object. The number of bytes in the returned string may exceed end_offset-start_offset, since UTF-8 is a variable-width encoding.
|
a pointer to the AtspiText object to query. |
|
a long indicating the start of the desired text range. |
|
a long indicating the first character past the desired range. |
|
|
Returns : |
a text string containing characters from start_offset
to end_offset -1, inclusive, encoded as UTF-8.
|
gint atspi_text_get_caret_offset (AtspiText *obj
,GError **error
);
Get the current offset of the text caret in an AtspiText object.
|
a pointer to the AtspiText object to query. |
|
|
Returns : |
a long integer indicating the current position of the text caret. |
GHashTable * atspi_text_get_attributes (AtspiText *obj
,gint offset
,gint *start_offset
,gint *end_offset
,GError **error
);
Get the attributes applied to a range of text from an AtspiText object, and the bounds of the range. The text attributes correspond to CSS attributes where possible,
|
a pointer to the AtspiText object to query. |
|
a long integer indicating the offset from which the attribute search is based. |
|
a gint indicating the start of the desired text range.. out. |
|
a gint indicating the first character past the desired range.. out. |
|
|
Returns : |
a GHashTable describing the attributes at the given character offset. element-type gchar* gchar*. transfer full gchar* gchar*. |
GHashTable * atspi_text_get_attribute_run (AtspiText *obj
,gint offset
,gboolean include_defaults
,gint *start_offset
,gint *end_offset
,GError **error
);
|
a pointer to the AtspiText object to query. |
|
an integer indicating the offset from which the attribute search is based. |
|
a bool if False, the call should only return those attributes which are explicitly set on the current attribute run, omitting any attributes which are inherited from the default values. |
|
a gint indicating the start of the desired text range.. out. |
|
a gint indicating the first character past the desired range.. out. |
|
|
Returns : |
the AttributeSet defined at offset, optionally including the 'default' attributes.. element-type gchar* gchar*. transfer full gchar* gchar*. |
gchar * atspi_text_get_attribute_value (AtspiText *obj
,gint offset
,gchar *attribute_name
,GError **error
);
|
a pointer to the AtspiText object to query. |
|
The character offset at which to query the attribute. |
|
The attribute to query. |
|
|
Returns : |
the value of a given attribute at the given offset, or NULL if not present. |
GHashTable * atspi_text_get_default_attributes (AtspiText *obj
,GError **error
);
Get the default attributes applied to an AtspiText object. The text attributes correspond to CSS attributes where possible, keys and values are delimited from one another via ":", and the delimiter between key/value pairs is ";". Thus "font-size:10;foreground-color:0,0,0" would be a valid return string. The combination of this attribute set and the attributes reported by atspi_text_getAttributes describes the entire set of text attributes over a range.
|
a pointer to the AtspiText object to query. |
|
|
Returns : |
a GHashTable containing the default attributes applied to a text object, (exclusive of explicitly-set attributes), encoded as UTF-8.. element-type gchar* gchar*. transfer full gchar* gchar*. |
gboolean atspi_text_set_caret_offset (AtspiText *obj
,gint new_offset
,GError **error
);
Set the text caret position for an AtspiText object.
|
a pointer to the AtspiText object on which to operate. |
|
the offset to which the text caret is to be moved. |
|
|
Returns : |
TRUE if successful, FALSE otherwise. |
AtspiTextRange * atspi_text_get_text_before_offset (AtspiText *obj
,gint offset
,AtspiTextBoundaryType type
,GError **error
);
Get delimited text from an AtspiText object which precedes a given text offset.
|
a pointer to the AtspiText object on which to operate. |
|
an integer indicating the offset from which the delimiter search is based. |
|
an AtspiTextBoundaryType indicating whether the desired text string is a word, sentence, line, or attribute run. |
|
|
Returns : |
an AtspiTextRange containing a UTF-8 string representing the delimited text, both of whose delimiting boundaries are before the current offset, or an empty string if no such text exists. |
AtspiTextRange * atspi_text_get_text_at_offset (AtspiText *obj
,gint offset
,AtspiTextBoundaryType type
,GError **error
);
Get delimited text from an AtspiText object which includes a given text offset.
|
a pointer to the AtspiText object on which to operate. |
|
a long integer indicating the offset from which the delimiter search is based. |
|
an AtspiTextBoundaryType indicating whether the desired text string is a word, sentence, line, or attribute run. |
|
|
Returns : |
an AtspiTextRange containing a UTF-8 string representing the delimited text, whose delimiting boundaries bracket the current offset, or an empty string if no such text exists. |
AtspiTextRange * atspi_text_get_text_after_offset (AtspiText *obj
,gint offset
,AtspiTextBoundaryType type
,GError **error
);
Get delimited text from an AtspiText object which follows a given text offset.
|
a pointer to the AtspiText object on which to operate. |
|
an integer indicating the offset from which the delimiter search is based. |
|
an AtspiTextBoundaryType indicating whether the desired text string is a word, sentence, line, or attribute run. |
|
|
Returns : |
an AtspiTextRange containing a UTF-8 string representing the delimited text, both of whose delimiting boundaries are after or inclusive of the current offset, or an empty string if no such text exists. |
guint atspi_text_get_character_at_offset (AtspiText *obj
,gint offset
,GError **error
);
Get the character at a given offset for an AtspiText object.
|
a pointer to the AtspiText object on which to operate. |
|
a long integer indicating the text offset where the desired character is located. |
|
|
Returns : |
an unsigned long integer which represents the UCS-4 unicode code point of the given character, or 0xFFFFFFFF if the character in question cannot be represented in the UCS-4 encoding. |
AtspiRect * atspi_text_get_character_extents (AtspiText *obj
,gint offset
,AtspiCoordType type
,GError **error
);
|
a pointer to the AtspiText object on which to operate. |
|
an integer indicating the offset of the text character for whom boundary information is requested. |
|
an AccessibleCoordType indicating the coordinate system to use for the returned values. |
|
|
Returns : |
A AtspiRect specifying the position and size of the character. Get the bounding box containing the glyph representing the character at a particular text offset. |
gint atspi_text_get_offset_at_point (AtspiText *obj
,gint x
,gint y
,AtspiCoordType type
,GError **error
);
Get the character offset into the text at a given point.
|
a pointer to the AtspiText object on which to operate. |
|
the x coordinate of the point to be queried. |
|
the y coordinate of the point to be queried. |
|
an AtspiCoordType indicating the coordinate system in which the values should be returned. |
|
|
Returns : |
the offset (as an integer) at the point (x , y )
in the specified coordinate system.
|
AtspiRect * atspi_text_get_range_extents (AtspiText *obj
,gint start_offset
,gint end_offset
,AtspiCoordType type
,GError **error
);
|
a pointer to the AtspiText object on which to operate. |
|
an integer indicating the offset of the first text character for whom boundary information is requested. |
|
an integer indicating the offset of the text character after the last character for whom boundary information is requested. |
|
an AtspiCoordType indicating the coordinate system to use for the returned values. |
|
|
Returns : |
A AtspiRect giving the position and size of the specified range of text. Get the bounding box for text within a range in an AtspiText object. |
GArray * atspi_text_get_bounded_ranges (AtspiText *obj
,gint x
,gint y
,gint width
,gint height
,AtspiCoordType type
,AtspiTextClipType clipTypeX
,AtspiTextClipType clipTypeY
,GError **error
);
Get the ranges of text from an AtspiText object which lie within the
bounds defined by (x
, y
) and (x
+width
, y
+height
).
|
a pointer to the AtspiText object on which to operate. |
|
the 'starting' x coordinate of the bounding box. |
|
the 'starting' y coordinate of the bounding box. |
|
the x extent of the bounding box. |
|
the y extent of the bounding box. |
|
an AccessibleCoordType indicating the coordinate system to use for the returned values. |
|
an AtspiTextClipType indicating how to treat characters that intersect the bounding box's x extents. |
|
an AtspiTextClipType indicating how to treat characters that intersect the bounding box's y extents. |
|
|
Returns : |
a null-terminated list of pointers to AtspiTextRange structs detailing the bounded text.. transfer full. element-type AtspiTextRange*. |
gint atspi_text_get_n_selections (AtspiText *obj
,GError **error
);
Get the number of active non-contiguous selections for an AtspiText object.
AtspiRange * atspi_text_get_selection (AtspiText *obj
,gint selection_num
,GError **error
);
|
|
|
|
|
|
Returns : |
gboolean atspi_text_add_selection (AtspiText *obj
,gint start_offset
,gint end_offset
,GError **error
);
Select some text (add a text selection) in an AtspiText object.
|
a pointer to the AtspiText object on which to operate. |
|
the starting offset of the desired new selection. |
|
the offset of the first character after the new selection. |
|
|
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean atspi_text_remove_selection (AtspiText *obj
,gint selection_num
,GError **error
);
De-select a text selection.
|
a pointer to the AtspiText object on which to operate. |
|
an integer indicating which (possibly of several) text selection to remove. |
|
|
Returns : |
TRUE if successful, FALSE otherwise. |
gboolean atspi_text_set_selection (AtspiText *obj
,gint selection_num
,gint start_offset
,gint end_offset
,GError **error
);
Change the bounds of an existing AtspiText text selection.
|
a pointer to the AtspiText object on which to operate. |
|
a zero-offset index indicating which text selection to modify. |
|
a long int, the new starting offset for the selection. |
|
a long int, the desired new offset of the first character after the selection. |
|
|
Returns : |
TRUE if successful, FALSE otherwise. |