[at-spi2-core] Add atspi_accessible_get_id
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Add atspi_accessible_get_id
- Date: Mon, 18 Apr 2011 20:38:16 +0000 (UTC)
commit 35f7666c4db37d8d20303ff8242182ed22bed4d1
Author: Mike Gorse <mgorse novell com>
Date: Mon Apr 18 15:38:32 2011 -0500
Add atspi_accessible_get_id
atspi/atspi-accessible.c | 23 +++++++++++++++++++++++
atspi/atspi-accessible.h | 2 ++
2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index d163d68..c78af49 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -787,6 +787,29 @@ atspi_accessible_get_toolkit_version (AtspiAccessible *obj, GError **error)
return NULL;
return g_strdup (ret);
}
+/**
+ * atspi_accessible_get_toolkit_version:
+ * @obj: a pointer to the #AtspiAccessible object on which to operate.
+ *
+ * Get the application id for a #AtspiAccessible object.
+ * Only works on application root objects.
+ *
+ * Returns: a gint indicating the id for the #AtspiAccessible object.
+ * or -1 on exception
+ **/
+gint
+atspi_accessible_get_id (AtspiAccessible *obj, GError **error)
+{
+ gint ret = -1;
+
+ g_return_val_if_fail (obj != NULL, -1);
+
+ if (!_atspi_dbus_get_property (obj, atspi_interface_application, "Id", error, "i", &ret))
+ return -1;
+ return ret;
+}
+
+
/* Interface query methods */
static gboolean
diff --git a/atspi/atspi-accessible.h b/atspi/atspi-accessible.h
index e7c0a5e..3dca620 100644
--- a/atspi/atspi-accessible.h
+++ b/atspi/atspi-accessible.h
@@ -97,6 +97,8 @@ gchar * atspi_accessible_get_toolkit_name (AtspiAccessible *obj, GError **error)
gchar * atspi_accessible_get_toolkit_version (AtspiAccessible *obj, GError **error);
+gint atspi_accessible_get_id (AtspiAccessible *obj, GError **error);
+
AtspiAccessible * atspi_accessible_get_application (AtspiAccessible *obj, GError **error);
AtspiAction * atspi_accessible_get_action (AtspiAccessible *obj);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]