diff options
-rw-r--r-- | atspi/atspi-accessible.c | 209 | ||||
-rw-r--r-- | atspi/atspi-accessible.h | 24 | ||||
-rw-r--r-- | atspi/atspi-action.c | 38 | ||||
-rw-r--r-- | atspi/atspi-action.h | 11 | ||||
-rw-r--r-- | atspi/atspi-document.c | 40 | ||||
-rw-r--r-- | atspi/atspi-document.h | 8 | ||||
-rw-r--r-- | atspi/atspi-text.c | 55 | ||||
-rw-r--r-- | atspi/atspi-text.h | 8 |
8 files changed, 390 insertions, 3 deletions
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index 534912e4..322ebac1 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -1082,6 +1082,9 @@ atspi_accessible_is_value (AtspiAccessible *obj) * * Returns: (transfer full): a pointer to an #AtspiAction interface * instance, or NULL if @obj does not implement #AtspiAction. + * + * Deprecated: 2.10: Use atspi_accessible_get_action_iface instead. + * Rename to: atspi_accessible_get_action_iface **/ AtspiAction * atspi_accessible_get_action (AtspiAccessible *accessible) @@ -1091,6 +1094,22 @@ atspi_accessible_get_action (AtspiAccessible *accessible) } /** + * atspi_accessible_get_action_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiAction interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiAction interface + * instance, or NULL if @obj does not implement #AtspiAction. + **/ +AtspiAction * +atspi_accessible_get_action_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_action) ? + g_object_ref (ATSPI_ACTION (accessible)) : NULL); +} + +/** * atspi_accessible_get_collection: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1098,6 +1117,9 @@ atspi_accessible_get_action (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiCollection interface * instance, or NULL if @obj does not implement #AtspiCollection. + * + * Deprecated: 2.10: Use atspi_accessible_get_collection_iface instead. + * Rename to: atspi_accessible_get_collection_iface **/ AtspiCollection * atspi_accessible_get_collection (AtspiAccessible *accessible) @@ -1107,6 +1129,22 @@ atspi_accessible_get_collection (AtspiAccessible *accessible) } /** + * atspi_accessible_get_collection_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiCollection interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiCollection interface + * instance, or NULL if @obj does not implement #AtspiCollection. + **/ +AtspiCollection * +atspi_accessible_get_collection_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_collection) ? + g_object_ref (ATSPI_COLLECTION (accessible)) : NULL); +} + +/** * atspi_accessible_get_component: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1114,6 +1152,9 @@ atspi_accessible_get_collection (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiComponent interface * instance, or NULL if @obj does not implement #AtspiComponent. + * + * Deprecated: 2.10: Use atspi_accessible_get_component_iface instead. + * Rename to: atspi_accessible_get_component_iface **/ AtspiComponent * atspi_accessible_get_component (AtspiAccessible *obj) @@ -1123,6 +1164,22 @@ atspi_accessible_get_component (AtspiAccessible *obj) } /** + * atspi_accessible_get_component_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiComponent interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiComponent interface + * instance, or NULL if @obj does not implement #AtspiComponent. + **/ +AtspiComponent * +atspi_accessible_get_component_iface (AtspiAccessible *obj) +{ + return (_atspi_accessible_is_a (obj, atspi_interface_component) ? + g_object_ref (ATSPI_COMPONENT (obj)) : NULL); +} + +/** * atspi_accessible_get_document: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1130,6 +1187,9 @@ atspi_accessible_get_component (AtspiAccessible *obj) * * Returns: (transfer full): a pointer to an #AtspiDocument interface * instance, or NULL if @obj does not implement #AtspiDocument. + * + * Deprecated: 2.10: Use atspi_accessible_get_document_iface instead. + * Rename to: atspi_accessible_get_document_iface **/ AtspiDocument * atspi_accessible_get_document (AtspiAccessible *accessible) @@ -1139,6 +1199,22 @@ atspi_accessible_get_document (AtspiAccessible *accessible) } /** + * atspi_accessible_get_document_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiDocument interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiDocument interface + * instance, or NULL if @obj does not implement #AtspiDocument. + **/ +AtspiDocument * +atspi_accessible_get_document_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_document) ? + g_object_ref (ATSPI_DOCUMENT (accessible)) : NULL); +} + +/** * atspi_accessible_get_editable_text: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1146,6 +1222,9 @@ atspi_accessible_get_document (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiEditableText interface * instance, or NULL if @obj does not implement #AtspiEditableText. + * + * Deprecated: 2.10: Use atspi_accessible_get_editable_text_iface instead. + * Rename to: atspi_accessible_get_editable_text_iface **/ AtspiEditableText * atspi_accessible_get_editable_text (AtspiAccessible *accessible) @@ -1155,6 +1234,22 @@ atspi_accessible_get_editable_text (AtspiAccessible *accessible) } /** + * atspi_accessible_get_editable_text_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiEditableText interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiEditableText interface + * instance, or NULL if @obj does not implement #AtspiEditableText. + **/ +AtspiEditableText * +atspi_accessible_get_editable_text_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_editable_text) ? + g_object_ref (ATSPI_EDITABLE_TEXT (accessible)) : NULL); +} + +/** * atspi_accessible_get_hyperlink: * @obj: a pointer to the #AtspiAccessible object on which to operate. * @@ -1178,6 +1273,9 @@ atspi_accessible_get_hyperlink (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiHypertext interface * instance, or NULL if @obj does not implement #AtspiHypertext. + * + * Deprecated: 2.10: Use atspi_accessible_get_hypertext_iface instead. + * Rename to: atspi_accessible_get_hypertext_iface **/ AtspiHypertext * atspi_accessible_get_hypertext (AtspiAccessible *accessible) @@ -1187,6 +1285,22 @@ atspi_accessible_get_hypertext (AtspiAccessible *accessible) } /** + * atspi_accessible_get_hypertext_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiHypertext interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiHypertext interface + * instance, or NULL if @obj does not implement #AtspiHypertext. + **/ +AtspiHypertext * +atspi_accessible_get_hypertext_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_hypertext) ? + g_object_ref (ATSPI_HYPERTEXT (accessible)) : NULL); +} + +/** * atspi_accessible_get_image: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1194,6 +1308,9 @@ atspi_accessible_get_hypertext (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiImage interface instance, or * NULL if @obj does not implement #AtspiImage. + * + * Deprecated: 2.10: Use atspi_accessible_get_image_iface instead. + * Rename to: atspi_accessible_get_image_iface **/ AtspiImage * atspi_accessible_get_image (AtspiAccessible *accessible) @@ -1203,6 +1320,22 @@ atspi_accessible_get_image (AtspiAccessible *accessible) } /** + * atspi_accessible_get_image_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiImage interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiImage interface instance, or + * NULL if @obj does not implement #AtspiImage. + **/ +AtspiImage * +atspi_accessible_get_image_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_image) ? + g_object_ref (ATSPI_IMAGE (accessible)) : NULL); +} + +/** * atspi_accessible_get_selection: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1210,6 +1343,9 @@ atspi_accessible_get_image (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiSelection interface * instance, or NULL if @obj does not implement #AtspiSelection. + * + * Deprecated: 2.10: Use atspi_accessible_get_selection_iface instead. + * Rename to: atspi_accessible_get_selection_iface **/ AtspiSelection * atspi_accessible_get_selection (AtspiAccessible *accessible) @@ -1218,6 +1354,22 @@ atspi_accessible_get_selection (AtspiAccessible *accessible) g_object_ref (ATSPI_SELECTION (accessible)) : NULL); } +/** + * atspi_accessible_get_selection_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiSelection interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiSelection interface + * instance, or NULL if @obj does not implement #AtspiSelection. + **/ +AtspiSelection * +atspi_accessible_get_selection_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_selection) ? + g_object_ref (ATSPI_SELECTION (accessible)) : NULL); +} + #if 0 /** * atspi_accessible_get_streamable_content: @@ -1244,6 +1396,9 @@ atspi_accessible_get_streamable_content (AtspiAccessible *accessible) * * Returns: (transfer full): a pointer to an #AtspiTable interface instance, or * NULL if @obj does not implement #AtspiTable. + * + * Deprecated: 2.10: Use atspi_accessible_get_table_iface instead. + * Rename to: atspi_accessible_get_table_iface **/ AtspiTable * atspi_accessible_get_table (AtspiAccessible *obj) @@ -1253,6 +1408,22 @@ atspi_accessible_get_table (AtspiAccessible *obj) } /** + * atspi_accessible_get_table_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiTable interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiTable interface instance, or + * NULL if @obj does not implement #AtspiTable. + **/ +AtspiTable * +atspi_accessible_get_table_iface (AtspiAccessible *obj) +{ + return (_atspi_accessible_is_a (obj, atspi_interface_table) ? + g_object_ref (ATSPI_TABLE (obj)) : NULL); +} + +/** * atspi_accessible_get_text: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1260,6 +1431,9 @@ atspi_accessible_get_table (AtspiAccessible *obj) * * Returns: (transfer full): a pointer to an #AtspiText interface instance, or * NULL if @obj does not implement #AtspiText. + * + * Deprecated: 2.10: Use atspi_accessible_get_text_iface instead. + * Rename to: atspi_accessible_get_text_iface **/ AtspiText * atspi_accessible_get_text (AtspiAccessible *obj) @@ -1269,6 +1443,22 @@ atspi_accessible_get_text (AtspiAccessible *obj) } /** + * atspi_accessible_get_text_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiTable interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiText interface instance, or + * NULL if @obj does not implement #AtspiText. + **/ +AtspiText * +atspi_accessible_get_text_iface (AtspiAccessible *obj) +{ + return (_atspi_accessible_is_a (obj, atspi_interface_text) ? + g_object_ref (ATSPI_TEXT (obj)) : NULL); +} + +/** * atspi_accessible_get_value: * @obj: a pointer to the #AtspiAccessible instance to query. * @@ -1276,6 +1466,9 @@ atspi_accessible_get_text (AtspiAccessible *obj) * * Returns: (transfer full): a pointer to an #AtspiValue interface instance, or * NULL if @obj does not implement #AtspiValue. + * + * Deprecated: 2.10: Use atspi_accessible_get_value_iface instead. + * Rename to: atspi_accessible_get_value_iface **/ AtspiValue * atspi_accessible_get_value (AtspiAccessible *accessible) @@ -1284,6 +1477,22 @@ atspi_accessible_get_value (AtspiAccessible *accessible) g_object_ref (ATSPI_VALUE (accessible)) : NULL); } +/** + * atspi_accessible_get_value_iface: + * @obj: a pointer to the #AtspiAccessible instance to query. + * + * Gets the #AtspiTable interface for an #AtspiAccessible. + * + * Returns: (transfer full): a pointer to an #AtspiValue interface instance, or + * NULL if @obj does not implement #AtspiValue. + **/ +AtspiValue * +atspi_accessible_get_value_iface (AtspiAccessible *accessible) +{ + return (_atspi_accessible_is_a (accessible, atspi_interface_value) ? + g_object_ref (ATSPI_VALUE (accessible)) : NULL); +} + static void append_const_val (GArray *array, const gchar *val) { diff --git a/atspi/atspi-accessible.h b/atspi/atspi-accessible.h index f4e2ed39..0358950d 100644 --- a/atspi/atspi-accessible.h +++ b/atspi/atspi-accessible.h @@ -104,6 +104,7 @@ gint atspi_accessible_get_id (AtspiAccessible *obj, GError **error); AtspiAccessible * atspi_accessible_get_application (AtspiAccessible *obj, GError **error); +#ifndef ATSPI_DISABLE_DEPRECATED AtspiAction * atspi_accessible_get_action (AtspiAccessible *obj); AtspiCollection * atspi_accessible_get_collection (AtspiAccessible *obj); @@ -127,6 +128,29 @@ AtspiTable * atspi_accessible_get_table (AtspiAccessible *obj); AtspiText * atspi_accessible_get_text (AtspiAccessible *obj); AtspiValue * atspi_accessible_get_value (AtspiAccessible *obj); +#endif + +AtspiAction * atspi_accessible_get_action_iface (AtspiAccessible *obj); + +AtspiCollection * atspi_accessible_get_collection_iface (AtspiAccessible *obj); + +AtspiComponent * atspi_accessible_get_component_iface (AtspiAccessible *obj); + +AtspiDocument * atspi_accessible_get_document_iface (AtspiAccessible *obj); + +AtspiEditableText * atspi_accessible_get_editable_text_iface (AtspiAccessible *obj); + +AtspiHypertext * atspi_accessible_get_hypertext_iface (AtspiAccessible *obj); + +AtspiImage * atspi_accessible_get_image_iface (AtspiAccessible *obj); + +AtspiSelection * atspi_accessible_get_selection_iface (AtspiAccessible *obj); + +AtspiTable * atspi_accessible_get_table_iface (AtspiAccessible *obj); + +AtspiText * atspi_accessible_get_text_iface (AtspiAccessible *obj); + +AtspiValue * atspi_accessible_get_value_iface (AtspiAccessible *obj); GArray * atspi_accessible_get_interfaces (AtspiAccessible *obj); diff --git a/atspi/atspi-action.c b/atspi/atspi-action.c index 7e498e99..17b6302a 100644 --- a/atspi/atspi-action.c +++ b/atspi/atspi-action.c @@ -52,10 +52,29 @@ atspi_action_get_n_actions (AtspiAction *obj, GError **error) * object implementing #AtspiAction. * * Returns: a UTF-8 string describing the '@i-th' invocable action. + * + * Deprecated: 2.10: Use atspi_action_get_action_description instead. + * Rename to: atspi_action_get_action_description **/ gchar * atspi_action_get_description (AtspiAction *obj, int i, GError **error) { + return atspi_action_get_action_description (obj, i, error); +} + +/** + * atspi_action_get_action_description: + * @obj: a pointer to the #AtspiAction implementor to query. + * @i: an integer indicating which action to query. + * + * Get the description of '@i-th' action invocable on an + * object implementing #AtspiAction. + * + * Returns: a UTF-8 string describing the '@i-th' invocable action. + **/ +gchar * +atspi_action_get_action_description (AtspiAction *obj, int i, GError **error) +{ dbus_int32_t d_i = i; char *retval = NULL; @@ -118,10 +137,29 @@ atspi_action_get_key_binding (AtspiAction *obj, gint i, GError **error) * object implementing #AtspiAction. * * Returns: the non-localized name of the action, as a UTF-8 string. + * + * Deprecated: 2.10: Use atspi_action_get_action_name instead. + * Rename to: atspi_action_get_action_name **/ gchar * atspi_action_get_name (AtspiAction *obj, gint i, GError **error) { + return atspi_action_get_action_name (obj, i, error); +} + +/** + * atspi_action_get_action_name: + * @obj: a pointer to the #AtspiAction implementor to query. + * @i: an integer indicating which action to query. + * + * Get the name of the '@i-th' action invocable on an + * object implementing #AtspiAction. + * + * Returns: the non-localized name of the action, as a UTF-8 string. + **/ +gchar * +atspi_action_get_action_name (AtspiAction *obj, gint i, GError **error) +{ dbus_int32_t d_i = i; char *retval = NULL; diff --git a/atspi/atspi-action.h b/atspi/atspi-action.h index 7d152a7c..99de8af6 100644 --- a/atspi/atspi-action.h +++ b/atspi/atspi-action.h @@ -45,18 +45,23 @@ struct _AtspiAction GTypeInterface parent; }; -gint atspi_action_get_n_actions (AtspiAction *obj, GError **error); +gchar * atspi_action_get_action_description (AtspiAction *obj, int i, GError **error); + +gchar * atspi_action_get_action_name (AtspiAction *obj, gint i, GError **error); -gchar * atspi_action_get_description (AtspiAction *obj, int i, GError **error); +gint atspi_action_get_n_actions (AtspiAction *obj, GError **error); gchar * atspi_action_get_key_binding (AtspiAction *obj, gint i, GError **error); -gchar * atspi_action_get_name (AtspiAction *obj, gint i, GError **error); gchar * atspi_action_get_localized_name (AtspiAction *obj, gint i, GError **error); gboolean atspi_action_do_action (AtspiAction *obj, gint i, GError **error); +#ifndef ATSPI_DISABLE_DEPRECATED +gchar * atspi_action_get_description (AtspiAction *obj, gint i, GError **error); +gchar * atspi_action_get_name (AtspiAction *obj, gint i, GError **error); +#endif G_END_DECLS #endif /* _ATSPI_ACTION_H_ */ diff --git a/atspi/atspi-document.c b/atspi/atspi-document.c index ceee5762..f95925b5 100644 --- a/atspi/atspi-document.c +++ b/atspi/atspi-document.c @@ -53,12 +53,33 @@ atspi_document_get_locale (AtspiDocument *obj, GError **error) * * Returns: a string corresponding to the value of the specified attribute, or * an empty string if the attribute is unspecified for the object. + * + * Deprecated: 2.10: Use atspi_document_get_document_attribute_value instead. + * Rename to: atspi_document_get_document_attribute_value **/ gchar * atspi_document_get_attribute_value (AtspiDocument *obj, gchar *attribute, GError **error) { + return atspi_document_get_document_attribute_value (obj, attribute, error); +} + +/** + * atspi_document_get_document_attribute_value: + * @obj: a pointer to the #AtspiDocument object on which to operate. + * @attribute: a string indicating the name of a specific attribute. + * + * Gets the value of a single attribute, if specified for the document as a whole. + * + * Returns: a string corresponding to the value of the specified attribute, or + * an empty string if the attribute is unspecified for the object. + **/ +gchar * +atspi_document_get_document_attribute_value (AtspiDocument *obj, + gchar *attribute, + GError **error) +{ gchar *retval = NULL; g_return_val_if_fail (obj != NULL, NULL); @@ -81,10 +102,29 @@ atspi_document_get_attribute_value (AtspiDocument *obj, * * Returns: (element-type gchar* gchar*) (transfer full): a #GHashTable * containing the constant attributes of the document, as name-value pairs. + * + * Deprecated: 2.10: Use atspi_document_get_document_attributes instead. + * Rename to: atspi_document_get_document_attributes **/ GHashTable * atspi_document_get_attributes (AtspiDocument *obj, GError **error) { + return atspi_document_get_document_attributes (obj, error); +} + +/** + * atspi_document_get_document_attributes: + * @obj: a pointer to the #AtspiDocument object on which to operate. + * + * Gets all constant attributes for the document as a whole. For attributes + * that change within the document content, see @atspi_text_get_attribute_run instead. + * + * Returns: (element-type gchar* gchar*) (transfer full): a #GHashTable + * containing the constant attributes of the document, as name-value pairs. + **/ +GHashTable * +atspi_document_get_document_attributes (AtspiDocument *obj, GError **error) +{ DBusMessage *message; g_return_val_if_fail (obj != NULL, NULL); diff --git a/atspi/atspi-document.h b/atspi/atspi-document.h index 85ba3389..cb6f9660 100644 --- a/atspi/atspi-document.h +++ b/atspi/atspi-document.h @@ -47,9 +47,17 @@ struct _AtspiDocument gchar * atspi_document_get_locale (AtspiDocument *obj, GError **error); +#ifndef ATSPI_DISABLE_DEPRECATED gchar * atspi_document_get_attribute_value (AtspiDocument *obj, gchar *attribute, GError **error); +#endif +gchar * atspi_document_get_document_attribute_value (AtspiDocument *obj, gchar *attribute, GError **error); + +#ifndef ATSPI_DISABLE_DEPRECATED GHashTable * atspi_document_get_attributes (AtspiDocument *obj, GError **error); +#endif + +GHashTable * atspi_document_get_document_attributes (AtspiDocument *obj, GError **error); G_END_DECLS diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c index 733260d7..244000d2 100644 --- a/atspi/atspi-text.c +++ b/atspi/atspi-text.c @@ -154,6 +154,9 @@ atspi_text_get_caret_offset (AtspiText *obj, GError **error) * * Returns: (element-type gchar* gchar*) (transfer full): a #GHashTable * describing the attributes at the given character offset. + * + * Deprecated: 2.10: Use atspi_text_get_text_attributes instead. + * Rename to: atspi_text_get_text_attributes **/ GHashTable * atspi_text_get_attributes (AtspiText *obj, @@ -162,6 +165,34 @@ atspi_text_get_attributes (AtspiText *obj, gint *end_offset, GError **error) { + return atspi_text_get_text_attributes (obj, offset, start_offset, end_offset, error); +} + +/** + * atspi_text_get_text_attributes: + * @obj: a pointer to the #AtspiText object to query. + * @offset: a #gint indicating the offset from which the attribute + * search is based. + * @start_offset: (out): a #gint pointer indicating the start of the desired text + * range. + * @end_offset: (out): a #gint pointer indicating the first character past the desired + * range. + * + * Gets the attributes applied to a range of text from an #AtspiText + * object. The text attributes correspond to CSS attributes + * where possible. + * <em>DEPRECATED</em> + * + * Returns: (element-type gchar* gchar*) (transfer full): a #GHashTable + * describing the attributes at the given character offset. + **/ +GHashTable * +atspi_text_get_text_attributes (AtspiText *obj, + gint offset, + gint *start_offset, + gint *end_offset, + GError **error) +{ dbus_int32_t d_offset = offset; dbus_int32_t d_start_offset, d_end_offset; DBusMessage *reply; @@ -258,6 +289,9 @@ atspi_text_get_attribute_run (AtspiText *obj, * * Returns: the value of a given attribute at the given offset, or NULL if * not present. + * + * Deprecated: 2.10: Use atspi_text_get_text_attribute_value instead. + * Rename to: atspi_text_get_text_attribute_value **/ gchar * atspi_text_get_attribute_value (AtspiText *obj, @@ -265,6 +299,27 @@ atspi_text_get_attribute_value (AtspiText *obj, gchar *attribute_value, GError **error) { + return atspi_text_get_text_attribute_value (obj, offset, attribute_value, + error); +} + +/** + * atspi_text_get_text_attribute_value: + * @obj: a pointer to the #AtspiText object to query. + * @offset: The character offset at which to query the attribute. + * @attribute_name: The attribute to query. + * + * Gets the value of a named attribute at a given offset. + * + * Returns: the value of a given attribute at the given offset, or NULL if + * not present. + **/ +gchar * +atspi_text_get_text_attribute_value (AtspiText *obj, + gint offset, + gchar *attribute_value, + GError **error) +{ gchar *retval = NULL; g_return_val_if_fail (obj != NULL, NULL); diff --git a/atspi/atspi-text.h b/atspi/atspi-text.h index 21e2db3f..f027e9a1 100644 --- a/atspi/atspi-text.h +++ b/atspi/atspi-text.h @@ -89,11 +89,19 @@ gchar * atspi_text_get_text (AtspiText *obj, gint start_offset, gint end_offset, gint atspi_text_get_caret_offset (AtspiText *obj, GError **error); +#ifndef ATSPI_DISABLE_DEPRECATED GHashTable *atspi_text_get_attributes (AtspiText *obj, gint offset, gint *start_offset, gint *end_offset, GError **error); +#endif + +GHashTable *atspi_text_get_text_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); +#ifndef ATSPI_DISABLE_DEPRECATED gchar * atspi_text_get_attribute_value (AtspiText *obj, gint offset, gchar *attribute_name, GError **error); +#endif + +gchar * atspi_text_get_text_attribute_value (AtspiText *obj, gint offset, gchar *attribute_name, GError **error); GHashTable * atspi_text_get_default_attributes (AtspiText *obj, GError **error); |