summaryrefslogtreecommitdiff
path: root/atspi/atspi-accessible.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-04-03 17:05:48 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-04-30 09:56:37 +0200
commite7be59e469739583226867632378a06aafcd24f4 (patch)
tree9c251cece28be70a2514caac3f0e5f5a4d415aac /atspi/atspi-accessible.c
parent52968ad5f35d77d164bbce538b6ce5be5678eb39 (diff)
downloadat-spi2-core-e7be59e469739583226867632378a06aafcd24f4.tar.gz
Add atspi_accessible_get_accessible_id
Diffstat (limited to 'atspi/atspi-accessible.c')
-rw-r--r--atspi/atspi-accessible.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index e7f1446c..2a0eda10 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -1767,6 +1767,33 @@ atspi_accessible_get_object_locale (AtspiAccessible *accessible, GError **error)
return locale;
}
+/**
+ * atspi_accessible_get_accessible_id:
+ * @obj: an #AtspiAccessible
+ *
+ * Gets the accessible id of the accessible. This is not meant to be presented
+ * to the user, but to be an id which is stable over application development.
+ * Typically, this is the gtkbuilder id.
+ *
+ * Since: 2.34
+ *
+ * Returns: a character string representing the accessible id of the
+ * #AtspiAccessible object or NULL on exception.
+ **/
+gchar*
+atspi_accessible_get_accessible_id (AtspiAccessible *obj, GError **error)
+{
+ gchar *accessible_id;
+
+ g_return_val_if_fail (obj != NULL, NULL);
+
+ if (!_atspi_dbus_get_property (obj, atspi_interface_accessible,
+ "AccessibleId", error, "s", &accessible_id))
+ return NULL;
+
+ return accessible_id;
+}
+
void
free_value (gpointer data)
{