*
*/
-#define SPI_ATK_PATH_PREFIX_LENGTH 22
-#define SPI_ATK_OBJECT_PATH_PREFIX "/org/at_spi/accessible"
-#define SPI_ATK_OBJECT_PATH_DESKTOP SPI_ATK_OBJECT_PATH_PREFIX "/desktop"
+#define SPI_ATK_PATH_PREFIX_LENGTH 34
+#define SPI_ATK_OBJECT_PATH_PREFIX "/org/freedesktop/atspi/accessible/"
+#define SPI_ATK_OBJECT_PATH_ROOT "root"
-#define SPI_ATK_OBJECT_REFERENCE_TEMPLATE SPI_ATK_OBJECT_PATH_PREFIX "/%d"
+#define SPI_ATK_OBJECT_REFERENCE_TEMPLATE SPI_ATK_OBJECT_PATH_PREFIX "%d"
#define SPI_DBUS_ID "spi-dbus-id"
SpiRegister *spi_global_register = NULL;
+static const gchar * spi_register_root_path = SPI_ATK_OBJECT_PATH_PREFIX SPI_ATK_OBJECT_PATH_ROOT;
+
enum
{
OBJECT_REGISTERED,
!= 0)
return NULL;
- path += SPI_ATK_PATH_PREFIX_LENGTH; /* Skip over the prefix */
+ path += SPI_ATK_PATH_PREFIX_LENGTH; /* Skip over the prefix */
- if (!g_strcmp0 (SPI_ATK_OBJECT_PATH_DESKTOP, path))
- return G_OBJECT (atk_get_root ());
- if (path[0] != '/')
- return NULL;
+ /* Map the root path to the root object. */
+ if (!g_strcmp0 (SPI_ATK_OBJECT_PATH_ROOT, path))
+ return G_OBJECT (spi_global_app_data->root);
- path++;
index = atoi (path);
data = g_hash_table_lookup (reg->ref2ptr, GINT_TO_POINTER (index));
if (data)
if (gobj == NULL)
return NULL;
+ /* Map the root object to the root path. */
+ if (gobj == spi_global_app_data->root)
+ return g_strdup (spi_register_root_path);
+
ref = object_to_ref (gobj);
if (!ref)
{
* within any particular application.
*/
gchar *
-spi_register_desktop_object_path ()
+spi_register_root_object_path ()
{
- return g_strdup (SPI_ATK_OBJECT_PATH_PREFIX SPI_ATK_OBJECT_PATH_DESKTOP);
+ return g_strdup (SPI_ATK_OBJECT_PATH_PREFIX SPI_ATK_OBJECT_PATH_ROOT);
}
/*END------------------------------------------------------------------------*/
spi_register_object_to_ref (GObject * gobj);
gchar *
-spi_register_desktop_object_path ();
+spi_register_root_object_path ();
/*---------------------------------------------------------------------------*/
#include "bridge.h"
#include "event.h"
#include "adaptors.h"
+#include "object.h"
#include "accessible-register.h"
#include "accessible-leasing.h"
DBusMessage *message;
DBusMessageIter iter;
DBusError error;
- const char *uname = NULL;
dbus_error_init (&error);
message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
- SPI_DBUS_PATH_REGISTRY,
- SPI_DBUS_INTERFACE_REGISTRY,
- "RegisterApplication");
+ SPI_DBUS_PATH_ROOT,
+ SPI_DBUS_INTERFACE_SOCKET,
+ "Embed");
dbus_message_set_no_reply (message, TRUE);
- uname = dbus_bus_get_unique_name (app->bus);
- if (!uname)
- {
- g_error ("AT-SPI: Couldn't get unique name for this connection");
- }
-
dbus_message_iter_init_append (message, &iter);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &uname);
+ spi_object_append_reference (&iter, app->root);
dbus_connection_send (app->bus, message, NULL);
if (message)
dbus_message_unref (message);
"/org/at_spi/cache", spi_global_cache);
accpath = droute_add_many (spi_global_app_data->droute,
- "/org/at_spi/accessible",
+ "/org/freedesktop/atspi/accessible",
NULL,
(DRouteGetDatumFunction)
spi_global_register_path_to_object);
{
DBusMessageIter iter_struct;
const char *name = SPI_DBUS_NAME_REGISTRY;
- const char *path = SPI_DBUS_PATH_DESKTOP;
+ const char *path = SPI_DBUS_PATH_ROOT;
dbus_message_iter_open_container (iter, DBUS_TYPE_STRUCT, NULL,
&iter_struct);
#define SPI_DBUS_PATH_REGISTRY "/org/freedesktop/atspi/registry"
#define SPI_DBUS_INTERFACE_REGISTRY "org.freedesktop.atspi.Registry"
-#define SPI_DBUS_PATH_DESKTOP "/org/freedesktop/atspi/accessible/desktop"
-#define SPI_DBUS_INTERFACE_DESKTOP "org.freedesktop.atspi.Desktop"
+#define SPI_DBUS_PATH_NULL "/org/freedesktop/atspi/null"
+#define SPI_DBUS_PATH_ROOT "/org/freedesktop/atspi/root"
#define SPI_DBUS_PATH_DEC "/org/freedesktop/atspi/registry/deviceeventcontroller"
-#define SPI_DBUS_PATH_NULL "/org/freedesktop/atspi/accessible/null"
-
#define SPI_DBUS_INTERFACE_DEC "org.freedesktop.atspi.DeviceEventController"
#define SPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER "org.freedesktop.atspi.DeviceEventListener"
#define SPI_DBUS_INTERFACE_APPLICATION "org.freedesktop.atspi.Application"
#define SPI_DBUS_INTERFACE_COLLECTION "org.freedesktop.atspi.Collection"
#define SPI_DBUS_INTERFACE_COMPONENT "org.freedesktop.atspi.Component"
+#define SPI_DBUS_INTERFACE_DESKTOP "org.freedesktop.atspi.Desktop"
#define SPI_DBUS_INTERFACE_DOCUMENT "org.freedesktop.atspi.Document"
#define SPI_DBUS_INTERFACE_EDITABLE_TEXT "org.freedesktop.atspi.EditableText"
#define SPI_DBUS_INTERFACE_EVENT_KEYBOARD "org.freedesktop.atspi.Event.Keyboard"
#define SPI_DBUS_INTERFACE_TABLE "org.freedesktop.atspi.Table"
#define SPI_DBUS_INTERFACE_TEXT "org.freedesktop.atspi.Text"
#define SPI_DBUS_INTERFACE_VALUE "org.freedesktop.atspi.Value"
+#define SPI_DBUS_INTERFACE_SOCKET "org.freedesktop.atspi.Socket"
DBusMessage *spi_dbus_general_error(DBusMessage *message);
DBusMessage *spi_dbus_return_rect(DBusMessage *message, gint ix, gint iy, gint iwidth, gint iheight);