diff options
author | Mike Gorse <mgorse@suse.com> | 2013-05-14 10:53:45 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2013-05-15 15:09:00 -0500 |
commit | 5b9c1723c5661b9d573b56af3673b488bf2136d7 (patch) | |
tree | df634deee63a85be88e9c17b1bba61f1eb2b3ad6 /atspi/atspi-accessible.c | |
parent | e2661ee0aa213120ef82002518b6f3cf6fe944b5 (diff) | |
download | at-spi2-core-5b9c1723c5661b9d573b56af3673b488bf2136d7.tar.gz |
Rename various functions to avoid name collisions
Having functions with common suffixes (ie, atspi_text_get_attributes and
atspi_document_get_attributes) results in problems for language
bindings. Deprecating these functions in favor of functions with new
names to avoid these collisions.
https://bugzilla.gnome.org/show_bug.cgi?id=700243
Diffstat (limited to 'atspi/atspi-accessible.c')
-rw-r--r-- | atspi/atspi-accessible.c | 209 |
1 files changed, 209 insertions, 0 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) { |