diff options
author | Mike Gorse <mgorse@novell.com> | 2011-05-23 18:04:01 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@novell.com> | 2011-05-23 18:32:12 -0500 |
commit | 0c73fcca6252a95beea2fcf6d5ea39c0e5e16b6f (patch) | |
tree | 8c88d76fca0c7cbd8df9c2706e0a50d0dd877872 | |
parent | 4cfcc3967bc4cc7d3ea9636ed9d733f0d44e6848 (diff) | |
download | at-spi2-core-0c73fcca6252a95beea2fcf6d5ea39c0e5e16b6f.tar.gz |
Fix get_toolkit_version, and add get_atspi_version for accessibles
-rw-r--r-- | atspi/atspi-accessible.c | 25 | ||||
-rw-r--r-- | atspi/atspi-accessible.h | 2 | ||||
-rw-r--r-- | idl/application.didl | 4 | ||||
-rw-r--r-- | xml/Application.xml | 1 |
4 files changed, 31 insertions, 1 deletions
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index d9bdeef6..90acb55f 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -782,7 +782,30 @@ atspi_accessible_get_toolkit_version (AtspiAccessible *obj, GError **error) g_return_val_if_fail (obj != NULL, NULL); - if (!_atspi_dbus_get_property (obj, atspi_interface_application, "ToolkitVersion", error, "s", &ret)) + if (!_atspi_dbus_get_property (obj, atspi_interface_application, "Version", error, "s", &ret)) + return NULL; + return ret; +} + +/** + * atspi_accessible_get_atspi_version: + * @obj: a pointer to the #AtspiAccessible object on which to operate. + * + * Get the AT-SPI IPC specification version supported by the application + * pointed to by the #AtspiAccessible object. + * Only works on application root objects. + * + * Returns: a UTF-8 string indicating the AT-SPI ersion for the #AtspiAccessible object. + * or NULL on exception + **/ +gchar * +atspi_accessible_get_atspi_version (AtspiAccessible *obj, GError **error) +{ + gchar *ret = NULL; + + g_return_val_if_fail (obj != NULL, NULL); + + if (!_atspi_dbus_get_property (obj, atspi_interface_application, "AtspiVersion", error, "s", &ret)) return NULL; return ret; } diff --git a/atspi/atspi-accessible.h b/atspi/atspi-accessible.h index 72c2bbec..60972aab 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); +gchar * atspi_accessible_get_atspi_version (AtspiAccessible *obj, GError **error); + gint atspi_accessible_get_id (AtspiAccessible *obj, GError **error); AtspiAccessible * atspi_accessible_get_application (AtspiAccessible *obj, GError **error); diff --git a/idl/application.didl b/idl/application.didl index 19383f6b..546fcfda 100644 --- a/idl/application.didl +++ b/idl/application.didl @@ -11,6 +11,10 @@ interface org.freestandards.atspi.Application { /* A string indicating the version of the applications accessibility bridge. */ read property string Version; + /* A string indicating the version of the AT-SPI specification + supported by the application */ + read property string AtspiVersion; + /* Gets the locale in which the application is currently running. */ method GetLocale { LocaleType locale_type; diff --git a/xml/Application.xml b/xml/Application.xml index 0fbb92bc..04a2e708 100644 --- a/xml/Application.xml +++ b/xml/Application.xml @@ -6,6 +6,7 @@ <property name="Version" type="s" access="read"/> + <property name="AtspiVersion" type="s" access="read"/> <property name="Id" type="i" access="read"/> <method name="GetLocale"> |