[gtk/ebassi/for-master] a11y: Add missing atspi.Application method



commit a52a97f27e436db4253c6c003df54d5e067fa20d
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Nov 16 17:12:36 2020 +0000

    a11y: Add missing atspi.Application method
    
    The GetApplicationBusAddress() method is not listed in the XML, but it's
    implemented by the ATK bridge, and it's part of the introspection data
    exposed by Qt's implementation of AT-SPI.

 gtk/a11y/atspi/Application.xml | 4 ++++
 gtk/a11y/gtkatspiroot.c        | 6 ++++++
 2 files changed, 10 insertions(+)
---
diff --git a/gtk/a11y/atspi/Application.xml b/gtk/a11y/atspi/Application.xml
index 2191f08858..08a5ea5c50 100644
--- a/gtk/a11y/atspi/Application.xml
+++ b/gtk/a11y/atspi/Application.xml
@@ -22,5 +22,9 @@
     <arg direction="in" name="event" type="s"/>
   </method>
 
+  <method name="GetApplicationBusAddress">
+    <arg direction="out" type="s" name="address"/>
+  </method>
+
 </interface>
 </node>
diff --git a/gtk/a11y/gtkatspiroot.c b/gtk/a11y/gtkatspiroot.c
index 9c23bd8e51..925360c9a3 100644
--- a/gtk/a11y/gtkatspiroot.c
+++ b/gtk/a11y/gtkatspiroot.c
@@ -157,6 +157,8 @@ handle_application_method (GDBusConnection       *connection,
                            GDBusMethodInvocation *invocation,
                            gpointer               user_data)
 {
+  GtkAtSpiRoot *self = user_data;
+
   if (g_strcmp0 (method_name, "GetLocale") == 0)
     {
       guint lctype;
@@ -179,6 +181,10 @@ handle_application_method (GDBusConnection       *connection,
       locale = setlocale (types[lctype], NULL);
       g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", locale));
     }
+  else if (g_strcmp0 (method_name, "GetApplicationBusAddress") == 0)
+    {
+      g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", self->bus_address));
+    }
 }
 
 static GVariant *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]