[gtk/a11y/atspi: 15/30] a11y: Add method to extract desktop data
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/a11y/atspi: 15/30] a11y: Add method to extract desktop data
- Date: Sat, 10 Oct 2020 13:28:24 +0000 (UTC)
commit 7661759acd1e377b0828f209dfadca1a37db5c70
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Oct 9 22:38:08 2020 +0100
a11y: Add method to extract desktop data
We are going to need the desktop name and path to populate the parent
property of AtSpiContexts associated to top level widgets.
gtk/a11y/gtkatspiroot.c | 16 ++++++++++++++--
gtk/a11y/gtkatspirootprivate.h | 5 +++++
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtkatspiroot.c b/gtk/a11y/gtkatspiroot.c
index acc98f12a2..d27d979f35 100644
--- a/gtk/a11y/gtkatspiroot.c
+++ b/gtk/a11y/gtkatspiroot.c
@@ -209,8 +209,7 @@ handle_accessible_method (GDBusConnection *connection,
GDBusMethodInvocation *invocation,
gpointer user_data)
{
- g_printerr ("[Accessible] Method '%s' on interface '%s' for object '%s' from '%s'\n",
- method_name, interface_name, object_path, sender);
+ GtkAtSpiRoot *self = user_data;
if (g_strcmp0 (method_name, "GetRole") == 0)
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(u)", ATSPI_ROLE_APPLICATION));
@@ -455,3 +454,16 @@ gtk_at_spi_root_get_cache (GtkAtSpiRoot *self)
return self->cache;
}
+
+void
+gtk_at_spi_root_get_application (GtkAtSpiRoot *self,
+ const char **name,
+ const char **path)
+{
+ g_return_if_fail (GTK_IS_AT_SPI_ROOT (self));
+
+ if (name != NULL)
+ *name = self->desktop_name;
+ if (path != NULL)
+ *path = self->desktop_path;
+}
diff --git a/gtk/a11y/gtkatspirootprivate.h b/gtk/a11y/gtkatspirootprivate.h
index 4e951bbcea..268c8a161f 100644
--- a/gtk/a11y/gtkatspirootprivate.h
+++ b/gtk/a11y/gtkatspirootprivate.h
@@ -39,4 +39,9 @@ gtk_at_spi_root_get_connection (GtkAtSpiRoot *self);
GtkAtSpiCache *
gtk_at_spi_root_get_cache (GtkAtSpiRoot *self);
+void
+gtk_at_spi_root_get_application (GtkAtSpiRoot *self,
+ const char **name,
+ const char **path);
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]