/*---------------------------------------------------------------------------*/
-#define ITF_EVENT_OBJECT "org.freedesktop.atspi.Event.Object"
-#define ITF_EVENT_WINDOW "org.freedesktop.atspi.Event.Window"
-#define ITF_EVENT_DOCUMENT "org.freedesktop.atspi.Event.Document"
-#define ITF_EVENT_FOCUS "org.freedesktop.atspi.Event.Focus"
+#define ITF_EVENT_OBJECT "org.a11y.atspi.Event.Object"
+#define ITF_EVENT_WINDOW "org.a11y.atspi.Event.Window"
+#define ITF_EVENT_DOCUMENT "org.a11y.atspi.Event.Document"
+#define ITF_EVENT_FOCUS "org.a11y.atspi.Event.Focus"
/*---------------------------------------------------------------------------*/
dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL);
closure.loop = g_main_loop_new (NULL, FALSE);
- g_main_loop_run (closure.loop);
+ if (getenv ("AT_SPI_CLIENT"))
+ {
+ g_main_loop_run (closure.loop);
+ }
+ else
+ {
+ closure.reply = NULL;
+ while (!closure.reply)
+ {
+ if (!dbus_connection_read_write_dispatch (spi_global_app_data->bus, 1000))
+ return NULL;
+ }
+ }
g_main_loop_unref (closure.loop);
return closure.reply;
dbus_message_iter_init_append(sig, &iter);
- spi_object_append_reference (&iter, spi_global_app_data->root);
dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &minor);
dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &detail1);
dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &detail2);
-
append_variant (&iter, type, val);
+ spi_object_append_reference (&iter, spi_global_app_data->root);
dbus_connection_send(bus, sig, NULL);
dbus_message_unref(sig);
+
+ if (g_strcmp0 (cname, "ChildrenChanged") != 0)
+ spi_object_lease_if_needed (G_OBJECT (obj));
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
-#define PCHANGE "property_change"
+#define PCHANGE "PropertyChange"
/*
* This handler handles the following ATK signals and
emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
DBUS_TYPE_STRING_AS_STRING, s1, append_basic);
}
- if (strcmp (pname, "accessible-description") == 0)
+ else if (strcmp (pname, "accessible-description") == 0)
{
s1 = atk_object_get_description (accessible);
if (s1 != NULL)
emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
DBUS_TYPE_STRING_AS_STRING, s1, append_basic);
}
- if (strcmp (pname, "accessible-parent") == 0)
+ else if (strcmp (pname, "accessible-parent") == 0)
{
otemp = atk_object_get_parent (accessible);
if (otemp != NULL)
emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
"(so)", otemp, append_object);
}
- if (strcmp (pname, "accessible-table-summary") == 0)
+ else if (strcmp (pname, "accessible-role") == 0)
+ {
+ i = atk_object_get_role (accessible);
+ emit_event (accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0,
+ DBUS_TYPE_UINT32_AS_STRING, GINT_TO_POINTER(i), append_basic);
+ }
+ else if (strcmp (pname, "accessible-table-summary") == 0)
{
otemp = atk_table_get_summary (ATK_TABLE (accessible));
if (otemp != NULL)
AtkObject *child;
GSignalQuery signal_query;
const gchar *name, *minor;
- gchar *s;
gint detail1;
g_signal_query (signal_hint->signal_id, &signal_query);
emit_event (accessible, ITF_EVENT_OBJECT, name, "", detail1, 0,
"(so)", child, append_object);
- g_free (s);
return TRUE;
}
/*
* Children changed signal converter and forwarder.
*
- * Klass (Interface) org.freedesktop.atspi.Event.Object
+ * Klass (Interface) org.a11y.atspi.Event.Object
* Major is the signal name.
* Minor is 'add' or 'remove'
* detail1 is the index.
const gchar *name, *minor;
gint detail1, detail2 = 0;
- AtkObject *accessible, *ao;
+ AtkObject *accessible, *ao=NULL;
gpointer child;
g_signal_query (signal_hint->signal_id, &signal_query);
/*
* Generic signal converter and forwarder.
*
- * Klass (Interface) org.freedesktop.atspi.Event.Object
+ * Klass (Interface) org.a11y.atspi.Event.Object
* Major is the signal name.
* Minor is NULL.
* detail1 is 0.