#include "accessible-register.h"
static dbus_bool_t
-impl_get_name (DBusMessageIter *iter, void *user_data)
+impl_get_Name (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static dbus_bool_t
-impl_set_name (DBusMessageIter *iter, void *user_data)
+impl_set_Name (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
const char *name = droute_get_v_string (iter);
}
static dbus_bool_t
-impl_get_description (DBusMessageIter *iter, void *user_data)
+impl_get_Description (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static dbus_bool_t
-impl_set_description (DBusMessageIter *iter, void *user_data)
+impl_set_Description (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
const char *description = droute_get_v_string (iter);
}
static dbus_bool_t
-impl_get_parent (DBusMessageIter *iter, void *user_data)
+impl_get_Parent (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static dbus_bool_t
-impl_get_childCount (DBusMessageIter *iter, void *user_data)
+impl_get_ChildCount (DBusMessageIter *iter, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
}
static DBusMessage *
-impl_getChildAtIndex (DBusConnection *bus,
+impl_GetChildAtIndex (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
if (!dbus_message_get_args (message, &error, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID))
return spi_dbus_general_error (message);
child = atk_object_ref_accessible_child (object, i);
- return spi_dbus_return_object (message, child, FALSE);
+ return spi_dbus_return_object (message, child, FALSE, FALSE);
}
static DBusMessage *
-impl_getChildren (DBusConnection *bus,
+impl_GetChildren (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
for (i = 0; i < count; i++)
{
AtkObject *child = atk_object_ref_accessible_child (object, i);
- char *path = atk_dbus_object_to_path (child);
+ char *path = atk_dbus_object_to_path (child, FALSE);
if (path)
{
dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_OBJECT_PATH,
}
static DBusMessage *
-impl_getIndexInParent (DBusConnection *bus,
+impl_GetIndexInParent (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getRelationSet (DBusConnection *bus,
+impl_GetRelationSet (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
if (!reply) return NULL;
set = atk_object_ref_relation_set (object);
dbus_message_iter_init_append (reply, &iter);
- if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(uao)", &iter_array))
+ if (!dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "(ua(so))", &iter_array))
{
goto oom;
}
goto oom;
}
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_UINT32, &type);
- if (!dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "o", &iter_targets))
+ if (!dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "(so)", &iter_targets))
{
goto oom;
}
AtkObject *obj = target->pdata[j];
char *path;
if (!obj) continue;
- path = atk_dbus_object_to_path (obj);
- dbus_message_iter_append_basic (&iter_targets, DBUS_TYPE_OBJECT_PATH, &path);
+ path = atk_dbus_object_to_path (obj, FALSE);
+ if (!path)
+ {
+ g_warning ("Unknown object in relation type %d\n", type);
+ continue;
+ }
+ spi_dbus_append_name_and_path_inner (&iter_targets, NULL, path);
}
dbus_message_iter_close_container (&iter_struct, &iter_targets);
dbus_message_iter_close_container (&iter_array, &iter_struct);
}
static DBusMessage *
-impl_getRole (DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetRole (DBusConnection *bus, DBusMessage *message, void *user_data)
{
AtkObject *object = (AtkObject *) user_data;
gint role;
}
static DBusMessage *
-impl_getRoleName (DBusConnection *bus,
+impl_GetRoleName (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getLocalizedRoleName (DBusConnection *bus,
+impl_GetLocalizedRoleName (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getState (DBusConnection *bus,
+impl_GetState (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getAttributes (DBusConnection *bus,
+impl_GetAttributes (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getApplication (DBusConnection *bus,
+impl_GetApplication (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
AtkObject *root = atk_get_root ();
- return spi_dbus_return_object (message, root, FALSE);
+ return spi_dbus_return_object (message, root, FALSE, FALSE);
}
static DBusMessage *
-impl_getInterfaces (DBusConnection *bus,
+impl_GetInterfaces (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DRouteMethod methods[] = {
- {impl_getChildAtIndex, "getChildAtIndex"},
- {impl_getChildren, "getChildren"},
- {impl_getIndexInParent, "getIndexInParent"},
- {impl_getRelationSet, "getRelationSet"},
- {impl_getRole, "getRole"},
- {impl_getRoleName, "getRoleName"},
- {impl_getLocalizedRoleName, "getLocalizedRoleName"},
- {impl_getState, "getState"},
- {impl_getAttributes, "getAttributes"},
- {impl_getApplication, "getApplication"},
- {impl_getInterfaces, "getInterfaces"},
+ {impl_GetChildAtIndex, "GetChildAtIndex"},
+ {impl_GetChildren, "GetChildren"},
+ {impl_GetIndexInParent, "GetIndexInParent"},
+ {impl_GetRelationSet, "GetRelationSet"},
+ {impl_GetRole, "GetRole"},
+ {impl_GetRoleName, "GetRoleName"},
+ {impl_GetLocalizedRoleName, "GetLocalizedRoleName"},
+ {impl_GetState, "GetState"},
+ {impl_GetAttributes, "GetAttributes"},
+ {impl_GetApplication, "GetApplication"},
+ {impl_GetInterfaces, "GetInterfaces"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_name, impl_set_name, "name"},
- {impl_get_description, impl_set_description, "description"},
- {impl_get_parent, NULL, "parent"},
- {impl_get_childCount, NULL, "childCount"},
+ {impl_get_Name, impl_set_Name, "Name"},
+ {impl_get_Description, impl_set_Description, "Description"},
+ {impl_get_Parent, NULL, "Parent"},
+ {impl_get_ChildCount, NULL, "ChildCount"},
{NULL, NULL, NULL}
};
#include "accessible-register.h"
#include "accessible-marshaller.h"
+#include "bridge.h"
#include "adaptors.h"
/*---------------------------------------------------------------------------*/
+void
+spi_dbus_append_name_and_path_inner (DBusMessageIter *iter, const char *bus_name, const char *path)
+{
+ DBusMessageIter iter_struct;
+
+ if (!bus_name)
+ bus_name = "";
+
+ dbus_message_iter_open_container (iter, DBUS_TYPE_STRUCT, NULL, &iter_struct);
+ dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_STRING, &bus_name);
+ dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
+ dbus_message_iter_close_container (iter, &iter_struct);
+}
+
+void
+spi_dbus_append_name_and_path (DBusMessage *message, DBusMessageIter *iter, AtkObject *obj, gboolean unref)
+{
+ gchar *path;
+ DBusMessageIter iter_struct;
+ const char *bus_name = dbus_message_get_sender (message);
+
+ path = atk_dbus_object_to_path (obj, FALSE);
+
+ if (!path)
+ path = g_strdup (SPI_DBUS_PATH_NULL);
+
+ spi_dbus_append_name_and_path_inner (iter, bus_name, path);
+
+ g_free (path);
+ if (obj && unref)
+ g_object_unref (obj);
+}
+
/*
* Marshals the D-Bus path of an AtkObject into a D-Bus message.
*
* Unrefs the AtkObject if unref is true.
*/
DBusMessage *
-spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean unref)
+spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean do_register, gboolean unref)
+{
+ DBusMessage *reply;
+ reply = dbus_message_new_method_return (message);
+ if (reply)
+ {
+ DBusMessageIter iter;
+ dbus_message_iter_init_append (message, &iter);
+ spi_dbus_append_name_and_path (message, &iter, obj, unref);
+ }
+
+ return reply;
+}
+
+DBusMessage *
+spi_dbus_return_hyperlink (DBusMessage *message, AtkHyperlink *link, AtkObject *container, gboolean unref)
+{
+ return spi_dbus_return_sub_object (message, G_OBJECT (link), G_OBJECT (container), unref);
+}
+
+DBusMessage *
+spi_dbus_return_sub_object (DBusMessage *message, GObject *sub, GObject *container, gboolean unref)
{
DBusMessage *reply;
gchar *path;
- path = atk_dbus_object_to_path (obj);
+ path = atk_dbus_sub_object_to_path (sub, container);
- if (obj && unref)
- g_object_unref (obj);
+ if (sub && unref)
+ g_object_unref (sub);
if (!path)
path = g_strdup (SPI_DBUS_PATH_NULL);
{
char *path;
- path = atk_dbus_object_to_path (obj);
+ path = atk_dbus_object_to_path (obj, FALSE);
+
+ if (!path)
+ path = g_strdup (SPI_DBUS_PATH_NULL);
if (unref)
g_object_unref (obj);
* Marshals the given AtkObject into the provided D-Bus iterator.
*
* The object is marshalled including all its client side cache data.
- * The format of the structure is (ooaoassusau).
- * This is used in the updateTree signal and the getTree method
+ * The format of the structure is (o(so)a(so)assusau).
+ * This is used in the updateTree signal and the GetTree method
* of the org.freedesktop.atspi.Tree interface.
*
* To marshal an object its parent, and all its children must already
* be registered with D-Bus and have been given a D-Bus object path.
*/
void
-spi_atk_append_accessible(AtkObject *obj, gpointer iter)
+spi_atk_append_accessible(AtkObject *obj, gpointer data)
{
- DBusMessageIter *iter_array;
DBusMessageIter iter_struct, iter_sub_array;
dbus_uint32_t states [2];
int count;
+ AtkStateSet *set;
+ DBusMessageIter *iter_array = (DBusMessageIter *)data;
const char *name, *desc;
dbus_uint32_t role;
- iter_array = (DBusMessageIter *) iter;
-
+ set = atk_object_ref_state_set (obj);
dbus_message_iter_open_container (iter_array, DBUS_TYPE_STRUCT, NULL, &iter_struct);
{
AtkObject *parent;
gchar *path, *path_parent;
/* Marshall object path */
- path = atk_dbus_object_to_path (obj);
- dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
+ path = atk_dbus_object_to_path (obj, FALSE);
/* Marshall parent */
parent = atk_object_get_parent(obj);
}
else
{
- path_parent = atk_dbus_object_to_path (parent);
+ path_parent = atk_dbus_object_to_path (parent, FALSE);
if (!path_parent)
{
/* This should only happen if a widget is re-parented to
path_parent = atk_dbus_desktop_object_path ();
}
}
- dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path_parent);
+
+ dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
+ spi_dbus_append_name_and_path_inner (&iter_struct, NULL, path_parent);
g_free(path_parent);
/* Marshall children */
- dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "o", &iter_sub_array);
+ dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "(so)", &iter_sub_array);
+ if (!atk_state_set_contains_state (set, ATK_STATE_MANAGES_DESCENDANTS))
{
gint childcount, i;
gchar *child_path;
child = atk_object_ref_accessible_child (obj, i);
- child_path = atk_dbus_object_to_path (child);
+ child_path = atk_dbus_object_to_path (child, FALSE);
if (child_path)
{
- dbus_message_iter_append_basic (&iter_sub_array, DBUS_TYPE_OBJECT_PATH, &child_path);
+ spi_dbus_append_name_and_path_inner (&iter_sub_array, NULL, child_path);
g_free (child_path);
}
g_object_unref(G_OBJECT(child));
g_free(path);
/* Marshall state set */
- spi_atk_state_to_dbus_array (obj, states);
+ spi_atk_state_set_to_dbus_array (set, states);
dbus_message_iter_open_container (&iter_struct, DBUS_TYPE_ARRAY, "u", &iter_sub_array);
for (count = 0; count < 2; count++)
{
dbus_message_iter_close_container (&iter_struct, &iter_sub_array);
}
dbus_message_iter_close_container (iter_array, &iter_struct);
+ g_object_unref (set);
}
void
#include <dbus/dbus.h>
#include <atk/atk.h>
+void
+spi_dbus_append_name_and_path_inner (DBusMessageIter *iter, const char *bus_name, const char *path);
+
+void
+spi_dbus_append_name_and_path (DBusMessage *message, DBusMessageIter *iter, AtkObject *obj, gboolean unref);
+
+DBusMessage *
+spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean do_register, gboolean unref);
+
+DBusMessage *
+spi_dbus_return_hyperlink (DBusMessage *message, AtkHyperlink *link, AtkObject *container, gboolean unref);
+
DBusMessage *
-spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean unref);
+spi_dbus_return_sub_object (DBusMessage *message, GObject *sub, GObject *container, gboolean unref);
dbus_bool_t
spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref);
static GHashTable *ref2ptr = NULL; /* Used for converting a D-Bus path (Reference) to the object pointer */
+static GHashTable *objects_with_subrefs = NULL;
+static GHashTable *leased_refs = NULL;
+static int leased_refs_count;
static guint reference_counter = 0;
static GStaticMutex recursion_check_guard = G_STATIC_MUTEX_INIT;
static gboolean recursion_check = FALSE;
+static int last_gc_time;
+
+static void deregister_sub_accessible (gpointer key, gpointer obj_data, gpointer iter);
+
+static void deregister_sub_hyperlink (gpointer key, gpointer obj_data, gpointer iter);
static gboolean
recursion_check_and_set ()
/* Reference of 0 not allowed as used as direct key in hash table */
if (reference_counter == 0)
reference_counter++;
+ /* TODO: If we've wrapped, ensure that two objects don't have the same ref */
return reference_counter;
}
* Returns the reference of the object, or 0 if it is not registered.
*/
static guint
+gobject_to_ref (GObject *gobj)
+{
+ return GPOINTER_TO_INT(g_object_get_data (gobj, "dbus-id"));
+}
+
+static guint
object_to_ref (AtkObject *accessible)
{
- return GPOINTER_TO_INT(g_object_get_data (G_OBJECT (accessible), "dbus-id"));
+ return gobject_to_ref (G_OBJECT (accessible));
+}
+
+static guint
+hyperlink_to_ref (AtkHyperlink *link)
+{
+ return gobject_to_ref (G_OBJECT (link));
}
/*
* it is no longer exposed over D-Bus.
*/
static void
-deregister_accessible (gpointer data, GObject *accessible)
+deregister_object (gpointer data, GObject *gobj)
{
guint ref;
- g_return_if_fail (ATK_IS_OBJECT (accessible));
+ GHashTable *subrefs_atk;
+ GHashTable *subrefs_hyperlink;
+ g_return_if_fail (ATK_IS_OBJECT (gobj) || ATK_IS_HYPERLINK (gobj));
+
+ subrefs_atk = (GHashTable *) g_object_get_data (gobj, "dbus-subrefs-atk");
+ subrefs_hyperlink = (GHashTable *) g_object_get_data (gobj, "dbus-subrefs-hyperlink");
+
+ if (subrefs_atk)
+ {
+ g_hash_table_foreach (subrefs_atk, deregister_sub_accessible, data);
+ g_hash_table_unref (subrefs_atk);
+ }
+
+ if (subrefs_hyperlink)
+ {
+ g_hash_table_foreach (subrefs_hyperlink, deregister_sub_hyperlink, data);
+ g_hash_table_unref (subrefs_hyperlink);
+ }
+
+ if (subrefs_atk || subrefs_hyperlink)
+ g_hash_table_remove (objects_with_subrefs, gobj);
+
+ if (ATK_IS_OBJECT (gobj))
+ {
+ ref = object_to_ref (ATK_OBJECT (gobj));
+ if (ref != 0)
+ {
+ spi_emit_cache_removal (ref, atk_adaptor_app_data->bus);
+ g_hash_table_remove(ref2ptr, GINT_TO_POINTER(ref));
+ }
+ }
+ }
- ref = object_to_ref (ATK_OBJECT(accessible));
+static void
+deregister_sub_accessible (gpointer key, gpointer obj_data, gpointer iter)
+{
+ GObject *obj = G_OBJECT (obj_data);
+ deregister_object (NULL, obj);
+ g_hash_table_remove (leased_refs, obj);
+ g_object_unref (obj);
+}
+
+static void
+deregister_sub_hyperlink (gpointer key, gpointer obj_data, gpointer iter)
+{
+ guint ref;
+ GObject *ghyperlink = G_OBJECT (obj_data);
+
+ g_return_if_fail (ATK_IS_HYPERLINK (ghyperlink));
+
+ ref = gobject_to_ref (ghyperlink);
if (ref != 0)
{
- spi_emit_cache_removal (ref, atk_adaptor_app_data->bus);
g_hash_table_remove(ref2ptr, GINT_TO_POINTER(ref));
}
+ g_object_unref (ghyperlink);
+}
+
+static void
+register_gobject (GObject *gobj, GObject *container)
+{
+ guint ref;
+ g_return_if_fail (G_IS_OBJECT(gobj));
+
+ ref = assign_reference();
+
+ g_hash_table_insert (ref2ptr, GINT_TO_POINTER(ref), gobj);
+ g_object_set_data (G_OBJECT(gobj), "dbus-id", GINT_TO_POINTER(ref));
+ g_object_weak_ref(G_OBJECT(gobj), deregister_object, NULL);
+
+ if (container)
+ {
+ GHashTable *subrefs = (GHashTable *) g_object_get_data (G_OBJECT (container), "dbus-subrefs-atk");
+ if (!subrefs)
+ {
+ subrefs = g_hash_table_new(g_direct_hash, g_direct_equal);
+ g_object_set_data (G_OBJECT (container), "dbus-subrefs-atk", subrefs);
+ }
+ g_hash_table_insert (subrefs, GINT_TO_POINTER(ref), gobj);
+ g_hash_table_insert (objects_with_subrefs, gobj, subrefs);
+ }
+
+ if (ATK_IS_HYPERLINK (gobj))
+ g_object_ref (gobj);
+ else if (ATK_IS_OBJECT (gobj))
+ {
+ AtkObject *accessible = ATK_OBJECT (gobj);
+ AtkStateSet *state = atk_object_ref_state_set (accessible);
+ if (atk_state_set_contains_state (state, ATK_STATE_TRANSIENT))
+ {
+ g_object_ref (gobj);
+ }
+ g_object_unref (state);
+ }
}
/*
* Called to register an AtkObject with AT-SPI and expose it over D-Bus.
*/
static void
-register_accessible (AtkObject *accessible)
+register_accessible (AtkObject *accessible, AtkObject *container)
{
- guint ref;
g_return_if_fail (ATK_IS_OBJECT(accessible));
+ register_gobject (G_OBJECT (accessible), G_OBJECT (container));
+}
+
+static void
+register_hyperlink (AtkHyperlink *hyperlink, AtkObject *container)
+{
+ guint ref;
+ g_return_if_fail (ATK_IS_HYPERLINK (hyperlink));
+ g_return_if_fail (container);
+
ref = assign_reference();
- g_hash_table_insert (ref2ptr, GINT_TO_POINTER(ref), accessible);
- g_object_set_data (G_OBJECT(accessible), "dbus-id", GINT_TO_POINTER(ref));
- g_object_weak_ref(G_OBJECT(accessible), deregister_accessible, NULL);
+ g_hash_table_insert (ref2ptr, GINT_TO_POINTER(ref), hyperlink);
+ g_object_set_data (G_OBJECT(hyperlink), "dbus-id", GINT_TO_POINTER(ref));
+ g_object_ref (G_OBJECT (hyperlink));
+
+ GHashTable *subrefs = (GHashTable *) g_object_get_data (G_OBJECT (container), "dbus-subrefs-hyperlink");
+ if (!subrefs)
+ {
+ subrefs = g_hash_table_new(g_direct_hash, g_direct_equal);
+ g_object_set_data (G_OBJECT (container), "dbus-subrefs-hyperlink", GINT_TO_POINTER(ref));
+ }
+ g_hash_table_insert (subrefs, GINT_TO_POINTER(ref), hyperlink);
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
+/* TRUE if we should not keep this object / tell the AT about it
+ * Currently true if TRANSIENT and not SHOWING
+ */
static gboolean
-has_manages_descendants (AtkObject *accessible)
+object_is_moot (AtkObject *accessible)
{
AtkStateSet *state;
gboolean result = FALSE;
* by modifying the tree alot.
*/
state = atk_object_ref_state_set (accessible);
- if (atk_state_set_contains_state (state, ATK_STATE_MANAGES_DESCENDANTS))
+ if ( atk_state_set_contains_state (state, ATK_STATE_TRANSIENT) &&
+ !atk_state_set_contains_state (state, ATK_STATE_SHOWING))
{
-#ifdef SPI_ATK_DEBUG
- g_warning ("AT-SPI: Object with 'Manages descendants' states not currently handled by AT-SPI");
-#endif
result = TRUE;
}
g_object_unref (state);
#ifdef SPI_ATK_DEBUG
non_owned_accessible (current);
#endif
- if (!has_manages_descendants (current))
- g_queue_push_tail (traversal, current);
- else
- g_object_unref (G_OBJECT (current));
+ g_queue_push_tail (traversal, current);
}
}
}
g_queue_push_tail (emit_update, current);
if (!object_to_ref (current))
{
- register_accessible (current);
+ register_accessible (current, NULL);
#ifdef SPI_ATK_DEBUG
g_debug ("REG - %s - %d - %s", atk_object_get_name (current),
atk_object_get_role (current),
/*
* Used to lookup an AtkObject from its D-Bus path.
*/
-AtkObject *
-atk_dbus_path_to_object (const char *path)
+GObject *
+atk_dbus_path_to_gobject (const char *path)
{
guint index;
void *data;
path += SPI_ATK_PATH_PREFIX_LENGTH; /* Skip over the prefix */
if (!g_strcmp0 (SPI_ATK_OBJECT_PATH_DESKTOP, path))
- return atk_get_root();
+ return G_OBJECT (atk_get_root());
if (path[0] != '/')
return NULL;
index = atoi (path);
data = g_hash_table_lookup (ref2ptr, GINT_TO_POINTER(index));
if (data)
- return ATK_OBJECT (data);
+ {
+ GObject *gobj = G_OBJECT (data);
+ g_object_set_data (gobj, "last-ref-time", (gpointer) time (NULL));
+ return gobj;
+ }
else
return NULL;
}
+AtkObject *
+atk_dbus_path_to_object (const char *path)
+{
+ return ATK_OBJECT (atk_dbus_path_to_gobject (path));
+}
+
/*
* TODO WARNING HACK This function is dangerous.
* It should only be called before sending an event on an
/*
* Used to lookup a D-Bus path from the AtkObject.
*/
+static gchar *
+atk_dbus_gobject_to_path_internal (GObject *gobj, gboolean do_register, GObject *container)
+{
+ guint ref;
+
+ ref = gobject_to_ref (gobj);
+ if (!ref && do_register)
+ {
+ register_gobject (gobj, container);
+ ref = gobject_to_ref (gobj);
+ }
+
+ if (!ref)
+ return NULL;
+ else
+ return atk_dbus_ref_to_path (ref);
+}
+
+gchar *
+atk_dbus_object_to_path (AtkObject *accessible, gboolean do_register)
+{
+ AtkObject *container = (accessible && do_register? atk_object_get_parent (accessible): NULL);
+ return atk_dbus_gobject_to_path_internal (G_OBJECT (accessible), do_register, G_OBJECT (container));
+}
+
+gchar *
+atk_dbus_sub_object_to_path (GObject *gobj, GObject *container)
+{
+ return atk_dbus_gobject_to_path_internal (gobj, TRUE, container);
+}
+
gchar *
-atk_dbus_object_to_path (AtkObject *accessible)
+atk_dbus_hyperlink_to_path (AtkHyperlink *hyperlink, AtkObject *container)
{
guint ref;
- ref = object_to_ref (accessible);
+ ref = gobject_to_ref (G_OBJECT (hyperlink));
+ if (!ref && container)
+ {
+ register_hyperlink (hyperlink, container);
+ ref = hyperlink_to_ref (hyperlink);
+ }
+
if (!ref)
return NULL;
else
}
static gboolean
+maybe_expire_lease (gpointer key, gpointer obj_data, gpointer iter)
+{
+ time_t secs = time (NULL) - (time_t)obj_data;
+
+ if (secs < 30)
+ return FALSE;
+ deregister_sub_accessible (key, obj_data, iter);
+ return TRUE;
+}
+
+static void
+expire_old_leases_in (gpointer key, gpointer obj_data, gpointer iter)
+{
+ g_hash_table_foreach_remove ((GHashTable *)obj_data, maybe_expire_lease, NULL);
+}
+
+static void
+expire_old_leases ()
+{
+ g_hash_table_foreach (objects_with_subrefs, expire_old_leases_in, NULL);
+}
+
+static gboolean
tree_update_state_action (GSignalInvocationHint *signal_hint,
guint n_param_values,
const GValue *param_values,
gpointer data,
AtkObject *accessible)
{
+ const gchar *name;
+ gboolean state;
+
+ if (n_param_values < 3)
+ {
+ g_warning ("at-spi: Not enough params in state-changed signal");
+ return TRUE;
+ }
+
+ name = g_value_get_string (param_values + 1);
+ state = g_value_get_boolean (param_values + 2);
+ if (!strcmp (name, "visible"))
+ {
+ AtkStateSet *set = atk_object_ref_state_set (accessible);
+ if (atk_state_set_contains_state (set, ATK_STATE_TRANSIENT))
+ {
+ if (state == 0)
+ {
+ g_hash_table_insert (leased_refs, accessible, (gpointer) time (NULL));
+ leased_refs_count++;
+ /* todo: Set to a high number: 5 for dbg. */
+ if (leased_refs_count > 5)
+ expire_old_leases ();
+ }
+ else
+ {
+ g_hash_table_remove (leased_refs, accessible);
+ leased_refs_count--;
+ }
+ }
+ g_object_unref (set);
+ }
+
update_accessible (accessible);
return TRUE;
}
pname = values[0].property_name;
if (strcmp (pname, "accessible-name") == 0 ||
strcmp (pname, "accessible-description") == 0 ||
- strcmp (pname, "accessible-parent") == 0)
+ strcmp (pname, "accessible-parent") == 0 ||
+ strcmp (pname, "accessible-role") == 0)
{
update_accessible (accessible);
}
const gchar *detail = NULL;
AtkObject *child;
- if (has_manages_descendants (accessible)) return TRUE;
if (signal_hint->detail)
detail = g_quark_to_string (signal_hint->detail);
if (!ref2ptr)
ref2ptr = g_hash_table_new(g_direct_hash, g_direct_equal);
+ if (!objects_with_subrefs)
+ objects_with_subrefs = g_hash_table_new(g_direct_hash, g_direct_equal);
+
+ if (!leased_refs)
+ leased_refs = g_hash_table_new(g_direct_hash, g_direct_equal);
+
#ifdef SPI_ATK_DEBUG
if (g_thread_supported ())
g_message ("AT-SPI: Threads enabled");
/*---------------------------------------------------------------------------*/
+GObject *
+atk_dbus_path_to_gobject (const char *path);
+
AtkObject *
atk_dbus_path_to_object (const char *path);
atk_dbus_object_attempt_registration (AtkObject *accessible);
gchar *
-atk_dbus_object_to_path (AtkObject *accessible);
+atk_dbus_object_to_path (AtkObject *accessible, gboolean do_register);
+
+gchar *
+atk_dbus_sub_object_to_path (GObject *accessible, GObject *container);
+
+gchar *
+atk_dbus_hyperlink_to_path (AtkHyperlink *hyperlink, AtkObject *container);
gchar *
atk_dbus_desktop_object_path ();
#include "common/spi-dbus.h"
static dbus_bool_t
-impl_get_nActions (DBusMessageIter *iter, void *user_data)
+impl_get_NActions (DBusMessageIter *iter, void *user_data)
{
AtkAction *action = (AtkAction *) user_data;
return reply;
}
-static DBusMessage *impl_getActions(DBusConnection *bus, DBusMessage *message, void *user_data)
+static DBusMessage *impl_GetActions(DBusConnection *bus, DBusMessage *message, void *user_data)
{
AtkAction *action = (AtkAction *) user_data;
DBusMessage *reply;
return reply;
}
-static DBusMessage *impl_doAction(DBusConnection *bus, DBusMessage *message, void *user_data)
+static DBusMessage *impl_DoAction(DBusConnection *bus, DBusMessage *message, void *user_data)
{
AtkAction *action = (AtkAction *) user_data;
DBusError error;
DRouteMethod methods[] =
{
- { impl_get_description, "getDescription" },
- { impl_get_name, "getName" },
- { impl_get_keybinding, "getKeyBinding" },
- {impl_getActions, "getActions"},
- {impl_doAction, "doAction"},
+ { impl_get_description, "GetDescription" },
+ { impl_get_name, "GetName" },
+ { impl_get_keybinding, "GetKeyBinding" },
+ {impl_GetActions, "GetActions"},
+ {impl_DoAction, "DoAction"},
{NULL, NULL }
};
static DRouteProperty properties[] =
{
- { impl_get_nActions, NULL, "nActions" },
+ { impl_get_NActions, NULL, "NActions" },
{ NULL, NULL }
};
}
static DBusMessage *
-impl_getLocale (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetLocale (DBusConnection * bus, DBusMessage * message, void *user_data)
{
return NULL;
}
{impl_registerObjectEventListener, "registerObjectEventListener"},
{impl_pause, "pause"},
{impl_resume, "resume"},
- {impl_getLocale, "getLocale"},
+ {impl_GetLocale, "GetLocale"},
{NULL, NULL}
};
message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
SPI_DBUS_PATH_REGISTRY,
SPI_DBUS_INTERFACE_REGISTRY,
- "registerApplication");
+ "RegisterApplication");
dbus_message_set_no_reply (message, TRUE);
uname = dbus_bus_get_unique_name(app->bus);
message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
SPI_DBUS_PATH_REGISTRY,
SPI_DBUS_INTERFACE_REGISTRY,
- "deregisterApplication");
+ "DeregisterApplication");
dbus_message_set_no_reply (message, TRUE);
uname = dbus_bus_get_unique_name(app->bus);
DBusConnection *bus;
AtkObject *root;
gchar *introspection_directory;
+ static gboolean inited = FALSE;
+
+ if (inited)
+ return 0;
+
+ inited = TRUE;
DRoutePath *treepath, *accpath;
accpath = droute_add_many (atk_adaptor_app_data->droute,
"/org/freedesktop/atspi/accessible",
NULL,
- (DRouteGetDatumFunction) atk_dbus_path_to_object);
+ (DRouteGetDatumFunction) atk_dbus_path_to_gobject);
/* Register all interfaces with droute and set up application accessible db */
spi_initialize_tree (treepath);
return 0;
}
+void
+gnome_accessibility_module_init (void)
+{
+ const gchar *load_bridge = g_getenv ("NO_AT_BRIDGE");
+
+ if (!load_bridge || g_ascii_strtod (load_bridge, NULL) == 0)
+ {
+ adaptor_init (NULL, NULL);
+
+ if (g_getenv ("AT_SPI_DEBUG"))
+ {
+ g_print("Atk Accessibility bridge initialized\n");
+ }
+ }
+}
+
+void
+gnome_accessibility_module_shutdown (void)
+{
+ spi_atk_deregister_event_listeners ();
+ exit_func ();
+}
/*END------------------------------------------------------------------------*/
}
static DBusMessage *
-getMatchesFrom (DBusMessage *message,
+GetMatchesFrom (DBusMessage *message,
AtkObject *current_object,
MatchRulePrivate *mrp,
const Accessibility_Collection_SortOrder sortby,
*/
static DBusMessage *
-getMatchesInOrder (DBusMessage *message,
+GetMatchesInOrder (DBusMessage *message,
AtkObject *current_object,
MatchRulePrivate *mrp,
const Accessibility_Collection_SortOrder sortby,
*/
static DBusMessage *
-getMatchesInBackOrder (DBusMessage *message,
+GetMatchesInBackOrder (DBusMessage *message,
AtkObject *current_object,
MatchRulePrivate *mrp,
const Accessibility_Collection_SortOrder sortby,
}
static DBusMessage *
-getMatchesTo (DBusMessage *message,
+GetMatchesTo (DBusMessage *message,
AtkObject *current_object,
MatchRulePrivate *mrp,
const Accessibility_Collection_SortOrder sortby,
}
static DBusMessage *
-impl_getMatchesFrom (DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetMatchesFrom (DBusConnection *bus, DBusMessage *message, void *user_data)
{
char *current_object_path = NULL;
AtkObject *current_object;
switch (tree){
case Accessibility_Collection_TREE_RESTRICT_CHILDREN :
- return getMatchesFrom (message, current_object,
+ return GetMatchesFrom (message, current_object,
&rule, sortby, TRUE, count, traverse);
break;
case Accessibility_Collection_TREE_RESTRICT_SIBLING :
- return getMatchesFrom (message, current_object,
+ return GetMatchesFrom (message, current_object,
&rule, sortby, FALSE, count, traverse);
break;
case Accessibility_Collection_TREE_INORDER :
- return getMatchesInOrder (message, current_object,
+ return GetMatchesInOrder (message, current_object,
&rule, sortby, TRUE, count, traverse);
break;
default : return NULL;
}
static DBusMessage *
-impl_getMatchesTo (DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetMatchesTo (DBusConnection *bus, DBusMessage *message, void *user_data)
{
char *current_object_path = NULL;
AtkObject *current_object;
switch (tree){
case Accessibility_Collection_TREE_RESTRICT_CHILDREN :
- return getMatchesTo (message, current_object,
+ return GetMatchesTo (message, current_object,
&rule, sortby, recurse, TRUE, count, traverse);
break;
case Accessibility_Collection_TREE_RESTRICT_SIBLING :
- return getMatchesTo (message, current_object,
+ return GetMatchesTo (message, current_object,
&rule, sortby, recurse, FALSE, count, traverse);
break;
case Accessibility_Collection_TREE_INORDER :
- return getMatchesInBackOrder (message, current_object,
+ return GetMatchesInBackOrder (message, current_object,
&rule, sortby, count);
break;
default : return NULL;
}
static DBusMessage *
-impl_getMatches(DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetMatches(DBusConnection *bus, DBusMessage *message, void *user_data)
{
AtkObject *obj = atk_dbus_path_to_object (dbus_message_get_path (message));
DBusMessageIter iter;
}
static DRouteMethod methods[] = {
- { impl_getMatchesFrom, "getMatchesFrom" },
- { impl_getMatchesTo, "getMatchesTo" },
- { impl_getMatches, "getMatches" },
+ { impl_GetMatchesFrom, "GetMatchesFrom" },
+ { impl_GetMatchesTo, "GetMatchesTo" },
+ { impl_GetMatches, "GetMatches" },
{NULL, NULL}
};
}
static DBusMessage *
-impl_getAccessibleAtPoint (DBusConnection * bus, DBusMessage * message,
+impl_GetAccessibleAtPoint (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
child =
atk_component_ref_accessible_at_point (component, x, y,
(AtkCoordType) coord_type);
- return spi_dbus_return_object (message, child, TRUE);
+ return spi_dbus_return_object (message, child, TRUE, TRUE);
}
static DBusMessage *
-impl_getExtents (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetExtents (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
DBusError error;
}
static DBusMessage *
-impl_getPosition (DBusConnection * bus, DBusMessage * message,
+impl_GetPosition (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
}
static DBusMessage *
-impl_getSize (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetSize (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
gint iwidth = 0, iheight = 0;
}
static DBusMessage *
-impl_getLayer (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetLayer (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
AtkLayer atklayer;
}
static DBusMessage *
-impl_getMDIZOrder (DBusConnection * bus, DBusMessage * message,
+impl_GetMDIZOrder (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
}
static DBusMessage *
-impl_grabFocus (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GrabFocus (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
dbus_bool_t rv;
#endif
static DBusMessage *
-impl_getAlpha (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetAlpha (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkComponent *component = (AtkComponent *) user_data;
double rv;
static DRouteMethod methods[] = {
{impl_contains, "contains"},
- {impl_getAccessibleAtPoint, "getAccessibleAtPoint"},
- {impl_getExtents, "getExtents"},
- {impl_getPosition, "getPosition"},
- {impl_getSize, "getSize"},
- {impl_getLayer, "getLayer"},
- {impl_getMDIZOrder, "getMDIZOrder"},
- {impl_grabFocus, "grabFocus"},
+ {impl_GetAccessibleAtPoint, "GetAccessibleAtPoint"},
+ {impl_GetExtents, "GetExtents"},
+ {impl_GetPosition, "GetPosition"},
+ {impl_GetSize, "GetSize"},
+ {impl_GetLayer, "GetLayer"},
+ {impl_GetMDIZOrder, "GetMDIZOrder"},
+ {impl_GrabFocus, "GrabFocus"},
//{impl_registerFocusHandler, "registerFocusHandler"},
//{impl_deregisterFocusHandler, "deregisterFocusHandler"},
- {impl_getAlpha, "getAlpha"},
+ {impl_GetAlpha, "GetAlpha"},
{NULL, NULL}
};
#include "accessible-marshaller.h"
static DBusMessage *
-impl_getLocale (DBusConnection *bus,
+impl_GetLocale (DBusConnection *bus,
DBusMessage *message,
void *user_data)
{
}
static DBusMessage *
-impl_getAttributeValue (DBusConnection * bus, DBusMessage * message,
+impl_GetAttributeValue (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkDocument *document = (AtkDocument *) user_data;
}
static DBusMessage *
-impl_getAttributes (DBusConnection * bus, DBusMessage * message,
+impl_GetAttributes (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkDocument *document = (AtkDocument *) user_data;
}
static DRouteMethod methods[] = {
- {impl_getLocale, "getLocale"},
- {impl_getAttributeValue, "getAttributeValue"},
- {impl_getAttributes, "getAttributes"},
+ {impl_GetLocale, "GetLocale"},
+ {impl_GetAttributeValue, "GetAttributeValue"},
+ {impl_GetAttributes, "GetAttributes"},
{NULL, NULL}
};
#include "common/spi-dbus.h"
static DBusMessage *
-impl_setTextContents (DBusConnection * bus, DBusMessage * message,
+impl_SetTextContents (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkEditableText *editable = (AtkEditableText *) user_data;
}
static DBusMessage *
-impl_insertText (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_InsertText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkEditableText *editable = (AtkEditableText *) user_data;
dbus_int32_t position, length;
}
static DBusMessage *
-impl_copyText (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_CopyText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkEditableText *editable = (AtkEditableText *) user_data;
dbus_int32_t startPos, endPos;
}
static DBusMessage *
-impl_cutText (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_CutText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkEditableText *editable = (AtkEditableText *) user_data;
dbus_int32_t startPos, endPos;
}
static DBusMessage *
-impl_deleteText (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_DeleteText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkEditableText *editable = (AtkEditableText *) user_data;
dbus_int32_t startPos, endPos;
}
static DBusMessage *
-impl_pasteText (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_PasteText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkEditableText *editable = (AtkEditableText *) user_data;
dbus_int32_t position;
}
static DRouteMethod methods[] = {
- {impl_setTextContents, "setTextContents"},
- {impl_insertText, "insertText"},
- {impl_copyText, "copyText"},
- {impl_cutText, "cutText"},
- {impl_deleteText, "deleteText"},
- {impl_pasteText, "pasteText"},
+ {impl_SetTextContents, "SetTextContents"},
+ {impl_InsertText, "InsertText"},
+ {impl_CopyText, "CopyText"},
+ {impl_CutText, "CutText"},
+ {impl_DeleteText, "DeleteText"},
+ {impl_PasteText, "PasteText"},
{NULL, NULL}
};
#define ITF_EVENT_OBJECT "org.freedesktop.atspi.Event.Object"
#define ITF_EVENT_WINDOW "org.freedesktop.atspi.Event.Window"
-#define ITF_EVENT_DOCUMENT "org.freedekstop.atspi.Event.Document"
+#define ITF_EVENT_DOCUMENT "org.freedesktop.atspi.Event.Document"
#define ITF_EVENT_FOCUS "org.freedesktop.atspi.Event.Focus"
/*---------------------------------------------------------------------------*/
}
static gboolean
-Accessibility_DeviceEventController_notifyListenersSync(const Accessibility_DeviceEvent *key_event)
+Accessibility_DeviceEventController_NotifyListenersSync(const Accessibility_DeviceEvent *key_event)
{
DBusMessage *message;
DBusError error;
dbus_message_new_method_call(SPI_DBUS_NAME_REGISTRY,
SPI_DBUS_PATH_DEC,
SPI_DBUS_INTERFACE_DEC,
- "notifyListenersSync");
+ "NotifyListenersSync");
dbus_error_init(&error);
if (spi_dbus_marshal_deviceEvent(message, key_event))
spi_init_keystroke_from_atk_key_event (&key_event, event);
- result = Accessibility_DeviceEventController_notifyListenersSync (&key_event);
+ result = Accessibility_DeviceEventController_NotifyListenersSync (&key_event);
if (key_event.event_string) g_free (key_event.event_string);
* the AT-SPI event.
*/
+static gchar *
+DBusSignalName (const gchar *s)
+{
+ gchar *ret = g_strdup (s);
+ gchar *t;
+
+ if (!ret)
+ return NULL;
+ ret [0] = toupper (ret [0]);
+ while ((t = strchr (ret, '-')) != NULL)
+ {
+ memmove (t, t + 1, strlen (t));
+ *t = toupper (*t);
+ }
+ return ret;
+}
+
static void
emit(AtkObject *accessible,
const char *klass,
const void *val)
{
gchar *path;
+ gchar *cname;
/* TODO this is a hack, used becuase child-added events are not guaranteed.
* On recieving an event from a non-registered object we check if it can be safely
return;
}
- spi_dbus_emit_signal (atk_adaptor_app_data->bus, path, klass, major, minor, detail1, detail2, type, val);
+ cname = DBusSignalName (major);
+ spi_dbus_emit_signal (atk_adaptor_app_data->bus, path, klass, cname, minor, detail1, detail2, type, val);
+ g_free (cname);
g_free(path);
}
{
DBusMessage *sig;
DBusMessageIter iter, variant, sub;
- gchar *path, *cname, *t;
+ gchar *path, *cname;
dbus_int32_t dummy = 0;
- path = atk_dbus_object_to_path (accessible);
+ path = atk_dbus_object_to_path (accessible, FALSE);
/* Tough decision here
* We won't send events from accessible
* name in D-Bus (Why not??!?) The names need converting
* on this side, and again on the client side.
*/
- cname = g_strdup(major);
- while ((t = strchr(cname, '-')) != NULL) *t = '_';
+ cname = DBusSignalName (major);
sig = dbus_message_new_signal(path, klass, cname);
g_free(path);
pname = values[0].property_name;
if (strcmp (pname, "accessible-name") == 0 ||
strcmp (pname, "accessible-description") == 0 ||
+ strcmp (pname, "accessible-role") == 0 ||
strcmp (pname, "accessible-parent") == 0)
{
return TRUE;
if (strcmp (pname, "accessible-table-summary") == 0)
{
otemp = atk_table_get_summary(ATK_TABLE (accessible));
- stemp = atk_dbus_object_to_path (otemp);
+ stemp = atk_dbus_object_to_path (otemp, FALSE);
if (stemp != NULL)
emit(accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0, DBUS_TYPE_OBJECT_PATH_AS_STRING, stemp);
}
{
i = g_value_get_int (&(values->new_value));
otemp = atk_table_get_column_header(ATK_TABLE (accessible), i);
- stemp = atk_dbus_object_to_path (otemp);
+ stemp = atk_dbus_object_to_path (otemp, FALSE);
if (stemp != NULL)
emit(accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0, DBUS_TYPE_OBJECT_PATH_AS_STRING, stemp);
}
{
i = g_value_get_int (&(values->new_value));
otemp = atk_table_get_row_header(ATK_TABLE (accessible), i);
- stemp = atk_dbus_object_to_path (otemp);
+ stemp = atk_dbus_object_to_path (otemp, FALSE);
if (stemp != NULL)
emit(accessible, ITF_EVENT_OBJECT, PCHANGE, pname, 0, 0, DBUS_TYPE_OBJECT_PATH_AS_STRING, stemp);
}
minor = g_quark_to_string (signal_hint->detail);
detail1 = atk_object_get_index_in_parent (child);
- s = atk_dbus_object_to_path (child);
+ s = atk_dbus_object_to_path (child, FALSE);
if (s == NULL)
{
g_free (s);
add_signal_listener (link_selected_event_listener, "Gtk:AtkHypertext:link-selected");
add_signal_listener (generic_event_listener, "Gtk:AtkObject:visible-data-changed");
add_signal_listener (generic_event_listener, "Gtk:AtkSelection:selection-changed");
+ add_signal_listener (generic_event_listener, "Gtk:AtkText:text-attributes-changed");
add_signal_listener (generic_event_listener, "Gtk:AtkText:text-caret-moved");
add_signal_listener (generic_event_listener, "Gtk:AtkTable:row-inserted");
add_signal_listener (generic_event_listener, "Gtk:AtkTable:row-reordered");
#include "accessible-marshaller.h"
#include "common/spi-dbus.h"
+static AtkHyperlink *
+get_hyperlink (void *user_data)
+{
+ if (ATK_IS_HYPERLINK (user_data))
+ return ATK_HYPERLINK (user_data);
+ if (ATK_IS_HYPERLINK_IMPL (user_data))
+ return atk_hyperlink_impl_get_hyperlink (ATK_HYPERLINK_IMPL (user_data));
+ return NULL;
+}
+
static dbus_bool_t
-impl_get_nAnchors (DBusMessageIter * iter, void *user_data)
+impl_get_NAnchors (DBusMessageIter * iter, void *user_data)
{
AtkHyperlink *link = (AtkHyperlink *) user_data;
g_return_val_if_fail (ATK_IS_HYPERLINK (user_data), FALSE);
static dbus_bool_t
-impl_get_startIndex (DBusMessageIter * iter,
+impl_get_StartIndex (DBusMessageIter * iter,
void *user_data)
{
- AtkHyperlink *link = (AtkHyperlink *) user_data;
+ AtkHyperlink *link = get_hyperlink (user_data);
g_return_val_if_fail (ATK_IS_HYPERLINK (user_data), FALSE);
return droute_return_v_int32 (iter, atk_hyperlink_get_start_index (link));
}
static dbus_bool_t
-impl_get_endIndex (DBusMessageIter * iter, void *user_data)
+impl_get_EndIndex (DBusMessageIter * iter, void *user_data)
{
- AtkHyperlink *link = (AtkHyperlink *) user_data;
+ AtkHyperlink *link = get_hyperlink (user_data);
g_return_val_if_fail (ATK_IS_HYPERLINK (user_data), FALSE);
return droute_return_v_int32 (iter, atk_hyperlink_get_end_index (link));
}
static DBusMessage *
-impl_getObject (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetObject (DBusConnection * bus, DBusMessage * message, void *user_data)
{
- AtkHyperlink *link = (AtkHyperlink *) user_data;
+ AtkHyperlink *link = get_hyperlink (user_data);
DBusError error;
dbus_int32_t i;
AtkObject *atk_object;
return droute_invalid_arguments_error (message);
}
atk_object = atk_hyperlink_get_object (link, i);
- return spi_dbus_return_object (message, atk_object, FALSE);
+ return spi_dbus_return_sub_object (message, G_OBJECT (atk_object), G_OBJECT (link), FALSE);
}
static DBusMessage *
-impl_getURI (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetURI (DBusConnection * bus, DBusMessage * message, void *user_data)
{
- AtkHyperlink *link = (AtkHyperlink *) user_data;
+ AtkHyperlink *link = get_hyperlink (user_data);
dbus_int32_t i;
DBusError error;
gchar *rv;
droute_not_yet_handled_error (message));
dbus_error_init (&error);
if (!dbus_message_get_args
- (message, &error, DBUS_TYPE_INT32, &i, DBUS_TYPE_INT32, &i,
- DBUS_TYPE_INVALID))
+ (message, &error, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID))
{
return droute_invalid_arguments_error (message);
}
}
static DBusMessage *
-impl_isValid (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_IsValid (DBusConnection * bus, DBusMessage * message, void *user_data)
{
- AtkHyperlink *link = (AtkHyperlink *) user_data;
+ AtkHyperlink *link = get_hyperlink (user_data);
dbus_bool_t rv;
DBusMessage *reply;
}
static DRouteMethod methods[] = {
- {impl_getObject, "getObject"},
- {impl_getURI, "getURI"},
- {impl_isValid, "isValid"},
+ {impl_GetObject, "GetObject"},
+ {impl_GetURI, "GetURI"},
+ {impl_IsValid, "IsValid"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_nAnchors, NULL, "nAnchors"},
- {impl_get_startIndex, NULL, "startIndex"},
- {impl_get_endIndex, NULL, "endIndex"},
+ {impl_get_NAnchors, NULL, "NAnchors"},
+ {impl_get_StartIndex, NULL, "StartIndex"},
+ {impl_get_EndIndex, NULL, "EndIndex"},
{NULL, NULL, NULL}
};
#include <droute/droute.h>
#include "common/spi-dbus.h"
+#include "accessible-marshaller.h"
static DBusMessage *
-impl_getNLinks (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetNLinks (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkHypertext *hypertext = (AtkHypertext *) user_data;
gint rv;
}
static DBusMessage *
-impl_getLink (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetLink (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkHypertext *hypertext = (AtkHypertext *) user_data;
DBusError error;
return droute_invalid_arguments_error (message);
}
link = atk_hypertext_get_link (hypertext, linkIndex);
- return NULL; // TODO
- //return spi_dbus_return_object (message, ATK_OBJECT (link), FALSE);
+ return spi_dbus_return_hyperlink (message, link, ATK_OBJECT(hypertext), TRUE);
}
static DBusMessage *
-impl_getLinkIndex (DBusConnection * bus, DBusMessage * message,
+impl_GetLinkIndex (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkHypertext *hypertext = (AtkHypertext *) user_data;
}
static DRouteMethod methods[] = {
- {impl_getNLinks, "getNLinks"},
- {impl_getLink, "getLink"},
- {impl_getLinkIndex, "getLinkIndex"},
+ {impl_GetNLinks, "GetNLinks"},
+ {impl_GetLink, "GetLink"},
+ {impl_GetLinkIndex, "GetLinkIndex"},
{NULL, NULL}
};
#include "common/spi-dbus.h"
static dbus_bool_t
-impl_get_imageDescription (DBusMessageIter * iter,
+impl_get_ImageDescription (DBusMessageIter * iter,
void *user_data)
{
AtkImage *image = (AtkImage *) user_data;
}
static dbus_bool_t
-impl_get_imageLocale (DBusMessageIter * iter,
+impl_get_ImageLocale (DBusMessageIter * iter,
void *user_data)
{
AtkImage *image = (AtkImage *) user_data;
}
static DBusMessage *
-impl_getImageExtents (DBusConnection * bus, DBusMessage * message,
+impl_GetImageExtents (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkImage *image = (AtkImage *) user_data;
}
static DBusMessage *
-impl_getImagePosition (DBusConnection * bus, DBusMessage * message,
+impl_GetImagePosition (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkImage *image = (AtkImage *) user_data;
}
static DBusMessage *
-impl_getImageSize (DBusConnection * bus, DBusMessage * message,
+impl_GetImageSize (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkImage *image = (AtkImage *) user_data;
}
static DRouteMethod methods[] = {
- {impl_getImageExtents, "getImageExtents"},
- {impl_getImagePosition, "getImagePosition"},
- {impl_getImageSize, "getImageSize"},
+ {impl_GetImageExtents, "GetImageExtents"},
+ {impl_GetImagePosition, "GetImagePosition"},
+ {impl_GetImageSize, "GetImageSize"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_imageDescription, NULL, "imageDescription"},
- {impl_get_imageLocale, NULL, "imageLocale"},
+ {impl_get_ImageDescription, NULL, "ImageDescription"},
+ {impl_get_ImageLocale, NULL, "ImageLocale"},
{NULL, NULL, NULL}
};
types[ATK_RELATION_LABELLED_BY] = Accessibility_RELATION_LABELLED_BY;
types[ATK_RELATION_MEMBER_OF] = Accessibility_RELATION_MEMBER_OF;
types[ATK_RELATION_NODE_CHILD_OF] = Accessibility_RELATION_NODE_CHILD_OF;
+ types[ATK_RELATION_NODE_PARENT_OF] = Accessibility_RELATION_NODE_PARENT_OF;
types[ATK_RELATION_FLOWS_TO] = Accessibility_RELATION_FLOWS_TO;
types[ATK_RELATION_FLOWS_FROM] = Accessibility_RELATION_FLOWS_FROM;
types[ATK_RELATION_SUBWINDOW_OF] = Accessibility_RELATION_SUBWINDOW_OF;
#include "accessible-marshaller.h"
static dbus_bool_t
-impl_get_nSelectedChildren (DBusMessageIter * iter,
+impl_get_NSelectedChildren (DBusMessageIter * iter,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
}
/*static char *
-impl_get_nSelectedChildren_str (void *datum)
+impl_get_NSelectedChildren_str (void *datum)
{
g_return_val_if_fail (ATK_IS_SELECTION (user_data), FALSE);
return g_strdup_printf ("%d",
}*/
static DBusMessage *
-impl_getSelectedChild (DBusConnection * bus, DBusMessage * message,
+impl_GetSelectedChild (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
return droute_invalid_arguments_error (message);
}
atk_object = atk_selection_ref_selection (selection, selectedChildIndex);
- return spi_dbus_return_object (message, atk_object, TRUE);
+ return spi_dbus_return_object (message, atk_object, TRUE, TRUE);
}
static DBusMessage *
-impl_selectChild (DBusConnection * bus, DBusMessage * message,
+impl_SelectChild (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
}
static DBusMessage *
-impl_deselectSelectedChild (DBusConnection * bus, DBusMessage * message,
+impl_DeselectSelectedChild (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
}
static DBusMessage *
-impl_isChildSelected (DBusConnection * bus, DBusMessage * message,
+impl_IsChildSelected (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
}
static DBusMessage *
-impl_selectAll (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_SelectAll (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
dbus_bool_t rv;
}
static DBusMessage *
-impl_clearSelection (DBusConnection * bus, DBusMessage * message,
+impl_ClearSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
}
static DBusMessage *
-impl_deselectChild (DBusConnection * bus, DBusMessage * message,
+impl_DeselectChild (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkSelection *selection = (AtkSelection *) user_data;
}
static DRouteMethod methods[] = {
- {impl_getSelectedChild, "getSelectedChild"},
- {impl_selectChild, "selectChild"},
- {impl_deselectSelectedChild, "deselectSelectedChild"},
- {impl_isChildSelected, "isChildSelected"},
- {impl_selectAll, "selectAll"},
- {impl_clearSelection, "clearSelection"},
- {impl_deselectChild, "deselectChild"},
+ {impl_GetSelectedChild, "GetSelectedChild"},
+ {impl_SelectChild, "SelectChild"},
+ {impl_DeselectSelectedChild, "DeselectSelectedChild"},
+ {impl_IsChildSelected, "IsChildSelected"},
+ {impl_SelectAll, "SelectAll"},
+ {impl_ClearSelection, "ClearSelection"},
+ {impl_DeselectChild, "DeselectChild"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_nSelectedChildren, NULL, "nSelectedChildren"},
+ {impl_get_NSelectedChildren, NULL, "NSelectedChildren"},
{NULL, NULL, NULL}
};
}
/*
- * CORBA Accessibility::StreamableContent::getURI method implementation
+ * CORBA Accessibility::StreamableContent::GetURI method implementation
*/
static CORBA_string
impl_accessibility_streamable_get_uri (PortableServer_Servant servant,
epv->getContentTypes = impl_accessibility_streamable_get_content_types;
epv->getContent = impl_accessibility_streamable_get_content;
epv->getStream = impl_accessibility_streamable_get_stream;
- epv->getURI = impl_accessibility_streamable_get_uri;
+ epv->GetURI = impl_accessibility_streamable_get_uri;
}
static void
#include "common/spi-dbus.h"
static dbus_bool_t
-impl_get_nRows (DBusMessageIter * iter, void *user_data)
+impl_get_NRows (DBusMessageIter * iter, void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
g_return_val_if_fail (ATK_IS_TABLE (user_data), FALSE);
}
static dbus_bool_t
-impl_get_nColumns (DBusMessageIter * iter, void *user_data)
+impl_get_NColumns (DBusMessageIter * iter, void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
g_return_val_if_fail (ATK_IS_TABLE (user_data), FALSE);
}
static dbus_bool_t
-impl_get_caption (DBusMessageIter * iter, void *user_data)
+impl_get_Caption (DBusMessageIter * iter, void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
g_return_val_if_fail (ATK_IS_TABLE (user_data), FALSE);
}
static dbus_bool_t
-impl_get_summary (DBusMessageIter * iter, void *user_data)
+impl_get_Summary (DBusMessageIter * iter, void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
g_return_val_if_fail (ATK_IS_TABLE (user_data), FALSE);
}
static dbus_bool_t
-impl_get_nSelectedRows (DBusMessageIter * iter,
+impl_get_NSelectedRows (DBusMessageIter * iter,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static dbus_bool_t
-impl_get_nSelectedColumns (DBusMessageIter * iter,
+impl_get_NSelectedColumns (DBusMessageIter * iter,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getAccessibleAt (DBusConnection * bus, DBusMessage * message,
+impl_GetAccessibleAt (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
return droute_invalid_arguments_error (message);
}
obj = atk_table_ref_at (table, row, column);
- return spi_dbus_return_object (message, obj, TRUE);
+ return spi_dbus_return_object (message, obj, TRUE, TRUE);
}
static DBusMessage *
-impl_getIndexAt (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetIndexAt (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
dbus_int32_t row, column;
}
static DBusMessage *
-impl_getRowAtIndex (DBusConnection * bus, DBusMessage * message,
+impl_GetRowAtIndex (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getColumnAtIndex (DBusConnection * bus, DBusMessage * message,
+impl_GetColumnAtIndex (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getRowDescription (DBusConnection * bus, DBusMessage * message,
+impl_GetRowDescription (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
dbus_int32_t row;
}
static DBusMessage *
-impl_getColumnDescription (DBusConnection * bus, DBusMessage * message,
+impl_GetColumnDescription (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getRowExtentAt (DBusConnection * bus, DBusMessage * message,
+impl_GetRowExtentAt (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getColumnExtentAt (DBusConnection * bus, DBusMessage * message,
+impl_GetColumnExtentAt (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getRowHeader (DBusConnection * bus, DBusMessage * message,
+impl_GetRowHeader (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
return droute_invalid_arguments_error (message);
}
obj = atk_table_get_row_header (table, row);
- return spi_dbus_return_object (message, obj, FALSE);
+ obj = atk_table_get_row_header (table, row);
+ return spi_dbus_return_object (message, obj, TRUE, FALSE);
}
static DBusMessage *
-impl_getColumnHeader (DBusConnection * bus, DBusMessage * message,
+impl_GetColumnHeader (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
return droute_invalid_arguments_error (message);
}
obj = atk_table_get_column_header (table, column);
- return spi_dbus_return_object (message, obj, FALSE);
+ obj = atk_table_get_column_header (table, column);
+ return spi_dbus_return_object (message, obj, TRUE, FALSE);
}
static DBusMessage *
-impl_getSelectedRows (DBusConnection * bus, DBusMessage * message,
+impl_GetSelectedRows (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getSelectedColumns (DBusConnection * bus, DBusMessage * message,
+impl_GetSelectedColumns (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_isRowSelected (DBusConnection * bus, DBusMessage * message,
+impl_IsRowSelected (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_isColumnSelected (DBusConnection * bus, DBusMessage * message,
+impl_IsColumnSelected (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_isSelected (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_IsSelected (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
dbus_int32_t row, column;
}
static DBusMessage *
-impl_addRowSelection (DBusConnection * bus, DBusMessage * message,
+impl_AddRowSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_addColumnSelection (DBusConnection * bus, DBusMessage * message,
+impl_AddColumnSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_removeRowSelection (DBusConnection * bus, DBusMessage * message,
+impl_RemoveRowSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_removeColumnSelection (DBusConnection * bus, DBusMessage * message,
+impl_RemoveColumnSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
}
static DBusMessage *
-impl_getRowColumnExtentsAtIndex (DBusConnection * bus, DBusMessage * message,
+impl_GetRowColumnExtentsAtIndex (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkTable *table = (AtkTable *) user_data;
reply = dbus_message_new_method_return (message);
if (reply)
{
- dbus_message_append_args (reply, DBUS_TYPE_INT32, row, DBUS_TYPE_INT32,
- column, DBUS_TYPE_INT32, row_extents,
- DBUS_TYPE_INT32, col_extents,
- DBUS_TYPE_BOOLEAN, is_selected,
- DBUS_TYPE_BOOLEAN, &ret, DBUS_TYPE_INVALID);
+ dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &ret,
+ DBUS_TYPE_INT32, &row, DBUS_TYPE_INT32,
+ &column, DBUS_TYPE_INT32, &row_extents,
+ DBUS_TYPE_INT32, &col_extents,
+ DBUS_TYPE_BOOLEAN, &is_selected,
+ DBUS_TYPE_INVALID);
}
return reply;
}
static DRouteMethod methods[] = {
- {impl_getAccessibleAt, "getAccessibleAt"},
- {impl_getIndexAt, "getIndexAt"},
- {impl_getRowAtIndex, "getRowAtIndex"},
- {impl_getColumnAtIndex, "getColumnAtIndex"},
- {impl_getRowDescription, "getRowDescription"},
- {impl_getColumnDescription, "getColumnDescription"},
- {impl_getRowExtentAt, "getRowExtentAt"},
- {impl_getColumnExtentAt, "getColumnExtentAt"},
- {impl_getRowHeader, "getRowHeader"},
- {impl_getColumnHeader, "getColumnHeader"},
- {impl_getSelectedRows, "getSelectedRows"},
- {impl_getSelectedColumns, "getSelectedColumns"},
- {impl_isRowSelected, "isRowSelected"},
- {impl_isColumnSelected, "isColumnSelected"},
- {impl_isSelected, "isSelected"},
- {impl_addRowSelection, "addRowSelection"},
- {impl_addColumnSelection, "addColumnSelection"},
- {impl_removeRowSelection, "removeRowSelection"},
- {impl_removeColumnSelection, "removeColumnSelection"},
- {impl_getRowColumnExtentsAtIndex, "getRowColumnExtentsAtIndex"},
+ {impl_GetAccessibleAt, "GetAccessibleAt"},
+ {impl_GetIndexAt, "GetIndexAt"},
+ {impl_GetRowAtIndex, "GetRowAtIndex"},
+ {impl_GetColumnAtIndex, "GetColumnAtIndex"},
+ {impl_GetRowDescription, "GetRowDescription"},
+ {impl_GetColumnDescription, "GetColumnDescription"},
+ {impl_GetRowExtentAt, "GetRowExtentAt"},
+ {impl_GetColumnExtentAt, "GetColumnExtentAt"},
+ {impl_GetRowHeader, "GetRowHeader"},
+ {impl_GetColumnHeader, "GetColumnHeader"},
+ {impl_GetSelectedRows, "GetSelectedRows"},
+ {impl_GetSelectedColumns, "GetSelectedColumns"},
+ {impl_IsRowSelected, "IsRowSelected"},
+ {impl_IsColumnSelected, "IsColumnSelected"},
+ {impl_IsSelected, "IsSelected"},
+ {impl_AddRowSelection, "AddRowSelection"},
+ {impl_AddColumnSelection, "AddColumnSelection"},
+ {impl_RemoveRowSelection, "RemoveRowSelection"},
+ {impl_RemoveColumnSelection, "RemoveColumnSelection"},
+ {impl_GetRowColumnExtentsAtIndex, "GetRowColumnExtentsAtIndex"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_nRows, NULL, "nRows"},
- {impl_get_nColumns, NULL, "nColumns"},
- {impl_get_caption, NULL, "caption"},
- {impl_get_summary, NULL, "summary"},
- {impl_get_nSelectedRows, NULL, "nSelectedRows"},
- {impl_get_nSelectedColumns, NULL, "nSelectedColumns"},
+ {impl_get_NRows, NULL, "NRows"},
+ {impl_get_NColumns, NULL, "NColumns"},
+ {impl_get_Caption, NULL, "Caption"},
+ {impl_get_Summary, NULL, "Summary"},
+ {impl_get_NSelectedRows, NULL, "nSelectedRows"},
+ {impl_get_NSelectedColumns, NULL, "nSelectedColumns"},
{NULL, NULL, NULL}
};
#include "accessible-marshaller.h"
static dbus_bool_t
-impl_get_characterCount (DBusMessageIter * iter,
+impl_get_CharacterCount (DBusMessageIter * iter,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static dbus_bool_t
-impl_get_caretOffset (DBusMessageIter * iter,
+impl_get_CaretOffset (DBusMessageIter * iter,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getText (DBusConnection * bus, DBusMessage * message, void *user_data)
+impl_GetText (DBusConnection * bus, DBusMessage * message, void *user_data)
{
AtkText *text = (AtkText *) user_data;
dbus_int32_t startOffset, endOffset;
}
static DBusMessage *
-impl_setCaretOffset (DBusConnection * bus, DBusMessage * message,
+impl_SetCaretOffset (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getTextBeforeOffset (DBusConnection * bus, DBusMessage * message,
+impl_GetTextBeforeOffset (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getTextAtOffset (DBusConnection * bus, DBusMessage * message,
+impl_GetTextAtOffset (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getTextAfterOffset (DBusConnection * bus, DBusMessage * message,
+impl_GetTextAfterOffset (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getCharacterAtOffset (DBusConnection * bus, DBusMessage * message,
+impl_GetCharacterAtOffset (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getAttributeValue (DBusConnection * bus, DBusMessage * message,
+impl_GetAttributeValue (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getAttributes (DBusConnection * bus, DBusMessage * message,
+impl_GetAttributes (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getDefaultAttributes (DBusConnection * bus, DBusMessage * message,
+impl_GetDefaultAttributes (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getCharacterExtents (DBusConnection * bus, DBusMessage * message,
+impl_GetCharacterExtents (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getOffsetAtPoint (DBusConnection * bus, DBusMessage * message,
+impl_GetOffsetAtPoint (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getNSelections (DBusConnection * bus, DBusMessage * message,
+impl_GetNSelections (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getSelection (DBusConnection * bus, DBusMessage * message,
+impl_GetSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_addSelection (DBusConnection * bus, DBusMessage * message,
+impl_AddSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_removeSelection (DBusConnection * bus, DBusMessage * message,
+impl_RemoveSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_setSelection (DBusConnection * bus, DBusMessage * message,
+impl_SetSelection (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getRangeExtents (DBusConnection * bus, DBusMessage * message,
+impl_GetRangeExtents (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
#define MAXRANGELEN 512
static DBusMessage *
-impl_getBoundedRanges (DBusConnection * bus, DBusMessage * message,
+impl_GetBoundedRanges (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DBusMessage *
-impl_getAttributeRun (DBusConnection * bus, DBusMessage * message,
+impl_GetAttributeRun (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
DBusError error;
}
static DBusMessage *
-impl_getDefaultAttributeSet (DBusConnection * bus, DBusMessage * message,
+impl_GetDefaultAttributeSet (DBusConnection * bus, DBusMessage * message,
void *user_data)
{
AtkText *text = (AtkText *) user_data;
}
static DRouteMethod methods[] = {
- {impl_getText, "getText"},
- {impl_setCaretOffset, "setCaretOffset"},
- {impl_getTextBeforeOffset, "getTextBeforeOffset"},
- {impl_getTextAtOffset, "getTextAtOffset"},
- {impl_getTextAfterOffset, "getTextAfterOffset"},
- {impl_getCharacterAtOffset, "getCharacterAtOffset"},
- {impl_getAttributeValue, "getAttributeValue"},
- {impl_getAttributes, "getAttributes"},
- {impl_getDefaultAttributes, "getDefaultAttributes"},
- {impl_getCharacterExtents, "getCharacterExtents"},
- {impl_getOffsetAtPoint, "getOffsetAtPoint"},
- {impl_getNSelections, "getNSelections"},
- {impl_getSelection, "getSelection"},
- {impl_addSelection, "addSelection"},
- {impl_removeSelection, "removeSelection"},
- {impl_setSelection, "setSelection"},
- {impl_getRangeExtents, "getRangeExtents"},
- {impl_getBoundedRanges, "getBoundedRanges"},
- {impl_getAttributeRun, "getAttributeRun"},
- {impl_getDefaultAttributeSet, "getDefaultAttributeSet"},
+ {impl_GetText, "GetText"},
+ {impl_SetCaretOffset, "SetCaretOffset"},
+ {impl_GetTextBeforeOffset, "GetTextBeforeOffset"},
+ {impl_GetTextAtOffset, "GetTextAtOffset"},
+ {impl_GetTextAfterOffset, "GetTextAfterOffset"},
+ {impl_GetCharacterAtOffset, "GetCharacterAtOffset"},
+ {impl_GetAttributeValue, "GetAttributeValue"},
+ {impl_GetAttributes, "GetAttributes"},
+ {impl_GetDefaultAttributes, "GetDefaultAttributes"},
+ {impl_GetCharacterExtents, "GetCharacterExtents"},
+ {impl_GetOffsetAtPoint, "GetOffsetAtPoint"},
+ {impl_GetNSelections, "GetNSelections"},
+ {impl_GetSelection, "GetSelection"},
+ {impl_AddSelection, "AddSelection"},
+ {impl_RemoveSelection, "RemoveSelection"},
+ {impl_SetSelection, "SetSelection"},
+ {impl_GetRangeExtents, "GetRangeExtents"},
+ {impl_GetBoundedRanges, "GetBoundedRanges"},
+ {impl_GetAttributeRun, "GetAttributeRun"},
+ {impl_GetDefaultAttributeSet, "GetDefaultAttributeSet"},
{NULL, NULL}
};
static DRouteProperty properties[] = {
- {impl_get_characterCount, NULL, "characterCount"},
- {impl_get_caretOffset, NULL, "caretOffset"},
+ {impl_get_CharacterCount, NULL, "CharacterCount"},
+ {impl_get_CaretOffset, NULL, "CaretOffset"},
{NULL, NULL, NULL}
};
/* For use as a GHFunc */
static void
-append_accessible_hf (gpointer key, gpointer obj_data, gpointer iter)
+append_accessible_hf (gpointer key, gpointer obj_data, gpointer data)
{
- spi_atk_append_accessible (ATK_OBJECT(obj_data), iter);
+ /* Make sure it isn't a hyperlink */
+ if (ATK_IS_OBJECT (obj_data))
+ spi_atk_append_accessible (ATK_OBJECT(obj_data), data);
}
/*---------------------------------------------------------------------------*/
if ((message = dbus_message_new_signal ("/org/freedesktop/atspi/tree",
SPI_DBUS_INTERFACE_TREE,
- "removeAccessible"))) {
+ "RemoveAccessible"))) {
DBusMessageIter iter;
gchar *path;
if ((message = dbus_message_new_signal ("/org/freedesktop/atspi/tree",
SPI_DBUS_INTERFACE_TREE,
- "updateAccessible"))) {
+ "UpdateAccessible"))) {
DBusMessageIter iter;
dbus_message_iter_init_append (message, &iter);
/*---------------------------------------------------------------------------*/
static DBusMessage *
-impl_getRoot (DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetRoot (DBusConnection *bus, DBusMessage *message, void *user_data)
{
AtkObject *root = atk_get_root();
char *path;
DBUS_ERROR_FAILED,
"No root accessible available");
}
- path = atk_dbus_object_to_path (root);
+ path = atk_dbus_object_to_path (root, FALSE);
if (!path)
{
reply = dbus_message_new_error (message,
/*---------------------------------------------------------------------------*/
static DBusMessage *
-impl_getTree (DBusConnection *bus, DBusMessage *message, void *user_data)
+impl_GetTree (DBusConnection *bus, DBusMessage *message, void *user_data)
{
DBusMessage *reply;
DBusMessageIter iter, iter_array;
reply = dbus_message_new_method_return (message);
dbus_message_iter_init_append (reply, &iter);
- dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(ooaoassusau)", &iter_array);
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(o(so)a(so)assusau)", &iter_array);
atk_dbus_foreach_registered(append_accessible_hf, &iter_array);
dbus_message_iter_close_container(&iter, &iter_array);
return reply;
/*---------------------------------------------------------------------------*/
static DRouteMethod methods[] = {
- {impl_getRoot, "getRoot"},
- {impl_getTree, "getTree"},
+ {impl_GetRoot, "GetRoot"},
+ {impl_GetTree, "GetTree"},
{NULL, NULL}
};
#include "common/spi-dbus.h"
static dbus_bool_t
-impl_get_minimumValue (DBusMessageIter * iter,
+impl_get_MinimumValue (DBusMessageIter * iter,
void *user_data)
{
AtkValue *value = (AtkValue *) user_data;
}
static dbus_bool_t
-impl_get_maximumValue (DBusMessageIter * iter,
+impl_get_MaximumValue (DBusMessageIter * iter,
void *user_data)
{
AtkValue *value = (AtkValue *) user_data;
}
static dbus_bool_t
-impl_get_minimumIncrement (DBusMessageIter * iter,
+impl_get_MinimumIncrement (DBusMessageIter * iter,
void *user_data)
{
AtkValue *value = (AtkValue *) user_data;
}
static dbus_bool_t
-impl_get_currentValue (DBusMessageIter * iter,
+impl_get_CurrentValue (DBusMessageIter * iter,
void *user_data)
{
AtkValue *value = (AtkValue *) user_data;
}
static DRouteProperty properties[] = {
- {impl_get_minimumValue, NULL, "minimumValue"},
- {impl_get_maximumValue, NULL, "maximumValue"},
- {impl_get_minimumIncrement, NULL, "minimumIncrement"},
- {impl_get_currentValue, impl_set_currentValue, "currentValue"},
+ {impl_get_MinimumValue, NULL, "MinimumValue"},
+ {impl_get_MaximumValue, NULL, "MaximumValue"},
+ {impl_get_MinimumIncrement, NULL, "MinimumIncrement"},
+ {impl_get_CurrentValue, impl_set_currentValue, "CurrentValue"},
{NULL, NULL, NULL}
};
Accessibility::Hypertext\n
Accessibility::Image\n
Accessibility::Selection\n
- Accessibility::StreamableContent\n
Accessibility::Table\n
Accessibility::Text\n
Accessibility::EditableText\n
/**
*
+Accessibility_COORD_TYPE:
+ * @Accessibility_COORD_TYPE_SCREEN: <![CDATA[]]>
+ * @Accessibility_COORD_TYPE_WINDOW: <![CDATA[]]>
+ *
+ * <![CDATA[ Used by Component, Image, and Text interfaces to specify whether coordinates are relative to the window or the screen. ]]>
+ *
+ * Bitfield/set of flags generated from the AT-SPI specification.
+ */
+typedef enum {
+ Accessibility_COORD_TYPE_SCREEN,
+ Accessibility_COORD_TYPE_WINDOW,
+} Accessibility_COORD_TYPE;
+
+/**
+ * NUM_ACCESSIBILITY_COORD_TYPES:
+ *
+ * 1 higher than the highest valid value of #Accessibility_COORD_TYPE.
+ */
+#define NUM_ACCESSIBILITY_COORD_TYPES (1+1)
+
+/**
+ *
Accessibility_Collection_SortOrder:
* @Accessibility_Collection_SORT_ORDER_INVALID: <![CDATA[]]>
* @Accessibility_Collection_SORT_ORDER_CANONICAL: <![CDATA[]]>
* @Accessibility_LAYER_BACKGROUND: <![CDATA[ The bottom-most layer, over which everything else is painted. The 'desktop background' is generally in this layer. ]]>
* @Accessibility_LAYER_CANVAS: <![CDATA[ The 'background' layer for most content renderers and UI Component containers. ]]>
* @Accessibility_LAYER_WIDGET: <![CDATA[ The layer in which the majority of ordinary 'foreground' widgets reside. ]]>
- * @Accessibility_LAYER_MDI: <![CDATA[ A special layer between LAYER_CANVAS and LAYER_WIDGET, in which the 'pseudo windows' (e.g. the MDI frames) reside. (See Component.getMDIZOrder) ]]>
+ * @Accessibility_LAYER_MDI: <![CDATA[ A special layer between LAYER_CANVAS and LAYER_WIDGET, in which the 'pseudo windows' (e.g. the MDI frames) reside. (See Component.GetMDIZOrder) ]]>
* @Accessibility_LAYER_POPUP: <![CDATA[ A layer for popup window content, above LAYER_WIDGET. ]]>
* @Accessibility_LAYER_OVERLAY: <![CDATA[ The topmost layer. ]]>
* @Accessibility_LAYER_WINDOW: <![CDATA[ The layer in which a toplevel window background usually resides. ]]>
/**
*
-Accessibility_SeekType:
- * @Accessibility_SEEK_SET: <![CDATA[ Seek from the start of the stream or data source. ]]>
- * @Accessibility_SEEK_CURRENT: <![CDATA[ Seek relative to the current position. ]]>
- * @Accessibility_SEEK_END: <![CDATA[ Seek from the end of the file, stream, or data source. ]]>
- *
- * <![CDATA[ Specifies the meaning of a seek 'offset'. Not all SeekTypes are supported by all StreamableContent data sources, for instance some streams may not support seeking from the beginning or other types of 'backwards' seeks. ]]>
- *
- * Bitfield/set of flags generated from the AT-SPI specification.
- */
-typedef enum {
- Accessibility_SEEK_SET,
- Accessibility_SEEK_CURRENT,
- Accessibility_SEEK_END,
-} Accessibility_SeekType;
-
-/**
- * NUM_ACCESSIBILITY_SEEKTYPES:
- *
- * 1 higher than the highest valid value of #Accessibility_SeekType.
- */
-#define NUM_ACCESSIBILITY_SEEKTYPES (2+1)
-
-/**
- *
Accessibility_TEXT_BOUNDARY_TYPE:
* @Accessibility_TEXT_BOUNDARY_CHAR: <![CDATA[ Text is bounded by this character only. Start and end offsets differ by one, by definition, for this value. ]]>
* @Accessibility_TEXT_BOUNDARY_WORD_START: <![CDATA[ Boundary condition is start of a word; i.e. range is from start of one word to the start of another word. ]]>
* @Accessibility_TEXT_BOUNDARY_LINE_START: <![CDATA[ Boundary condition is the start of a line; i.e. range is from start of one line to the start of another. This generally means that an end-of-line character will appear at the end of the range. ]]>
* @Accessibility_TEXT_BOUNDARY_LINE_END: <![CDATA[ Boundary condition is the end of a line; i.e. range is from start of one line to the start of another. This generally means that an end-of-line character will be the first character of the range. ]]>
*
- * <![CDATA[ Specifies the boundary conditions determining a run of text as returned from getTextAtOffset, getTextAfterOffset, and getTextBeforeOffset. ]]>
+ * <![CDATA[ Specifies the boundary conditions determining a run of text as returned from GetTextAtOffset, GetTextAfterOffset, and GetTextBeforeOffset. ]]>
*
* Bitfield/set of flags generated from the AT-SPI specification.
*/
* @Accessibility_KEY_PRESS: <![CDATA[ emulate the pressing of a hardware keyboard key. ]]>
* @Accessibility_KEY_RELEASE: <![CDATA[ emulate the release of a hardware keyboard key. ]]>
* @Accessibility_KEY_PRESSRELEASE: <![CDATA[ a hardware keyboard key is pressed and immediately released. ]]>
- * @Accessibility_KEY_SYM: <![CDATA[ a symbolic key event is generated, without specifying a hardware key. @note if the keysym is not present in the current keyboard map, the DeviceEventController instance has a limited ability to generate such keysyms on-the-fly. Reliability of generateKeyboardEvent calls using out-of-keymap keysyms will vary from system to system, and on the number of different out-of-keymap being generated in quick succession. In practice this is rarely significant, since the keysyms of interest to AT clients and keyboard emulators are usually part of the current keymap, i.e. present on the system keyboard for the current locale (even if a physical hardware keyboard is not connected. ]]>
+ * @Accessibility_KEY_SYM: <![CDATA[ a symbolic key event is generated, without specifying a hardware key. @note if the keysym is not present in the current keyboard map, the DeviceEventController instance has a limited ability to generate such keysyms on-the-fly. Reliability of GenerateKeyboardEvent calls using out-of-keymap keysyms will vary from system to system, and on the number of different out-of-keymap being generated in quick succession. In practice this is rarely significant, since the keysyms of interest to AT clients and keyboard emulators are usually part of the current keymap, i.e. present on the system keyboard for the current locale (even if a physical hardware keyboard is not connected. ]]>
* @Accessibility_KEY_STRING: <![CDATA[ a string is converted to its equivalent keyboard events and emitted. If the string consists of complex character or composed characters which are not in the current keymap, string emission is subject to the out-of-keymap limitations described for KeySynthType::KEY_SYM. In practice this limitation primarily effects Chinese and Japanese locales. ]]>
*
- * <![CDATA[ Used when synthesizing keyboard input via DeviceEventController:generateKeyboardEvent. ]]>
+ * <![CDATA[ Used when synthesizing keyboard input via DeviceEventController:GenerateKeyboardEvent. ]]>
*
* Bitfield/set of flags generated from the AT-SPI specification.
*/
* @Accessibility_RELATION_CONTROLLED_BY: <![CDATA[ Object state, position, etc. is modified/controlled by user interaction with one or more other objects. For instance a viewport or scroll pane may be CONTROLLED_BY scrollbars. ]]>
* @Accessibility_RELATION_MEMBER_OF: <![CDATA[ Object has a grouping relationship (e.g. 'same group as') to one or more other objects. ]]>
* @Accessibility_RELATION_TOOLTIP_FOR: <![CDATA[ Object is a tooltip associated with another object. ]]>
- * @Accessibility_RELATION_NODE_CHILD_OF: <![CDATA[ Reserved for future use. ]]>
+ * @Accessibility_RELATION_NODE_CHILD_OF: <![CDATA[ Object is a child of the target. ]]>
+ * @Accessibility_RELATION_NODE_PARENT_OF: <![CDATA[ Object is a parent of the target. ]]>
* @Accessibility_RELATION_EXTENDED: <![CDATA[ Used to indicate that a relationship exists, but its type is not specified in the enumeration and must be obtained via a call to getRelationTypeName. ]]>
* @Accessibility_RELATION_FLOWS_TO: <![CDATA[ Object renders content which flows logically to another object. For instance, text in a paragraph may flow to another object which is not the 'next sibling' in the accessibility hierarchy. ]]>
* @Accessibility_RELATION_FLOWS_FROM: <![CDATA[ Reciprocal of RELATION_FLOWS_TO. ]]>
Accessibility_RELATION_MEMBER_OF,
Accessibility_RELATION_TOOLTIP_FOR,
Accessibility_RELATION_NODE_CHILD_OF,
+ Accessibility_RELATION_NODE_PARENT_OF,
Accessibility_RELATION_EXTENDED,
Accessibility_RELATION_FLOWS_TO,
Accessibility_RELATION_FLOWS_FROM,
*
* 1 higher than the highest valid value of #Accessibility_RelationType.
*/
-#define NUM_ACCESSIBILITY_RELATIONTYPES (18+1)
+#define NUM_ACCESSIBILITY_RELATIONTYPES (19+1)
/**
*
*/
#define NUM_ACCESSIBILITY_ROLES (90+1)
-/**
- *
-Accessibility_LoginHelper_DeviceReq:
- * @Accessibility_LoginHelper_GUI_EVENTS: <![CDATA[ Needs access to the GUI event subsystem (e.g. Xserver) ]]>
- * @Accessibility_LoginHelper_CORE_KEYBOARD: <![CDATA[ Needs access to the system keyboard events (read and write) ]]>
- * @Accessibility_LoginHelper_CORE_POINTER: <![CDATA[ Needs access to the onscreen pointer (e.g. mouse pointer) ]]>
- * @Accessibility_LoginHelper_EXT_INPUT: <![CDATA[ Reads XInput extended input devices ]]>
- * @Accessibility_LoginHelper_POST_WINDOWS: <![CDATA[ Posts Windows, and needs for toplevel windows to be visible ]]>
- * @Accessibility_LoginHelper_AUDIO_OUT: <![CDATA[ Writes to audio device ]]>
- * @Accessibility_LoginHelper_AUDIO_IN: <![CDATA[ Reads from audio device ]]>
- * @Accessibility_LoginHelper_NETWORK: <![CDATA[ Requires access to general network services, including remote access ]]>
- * @Accessibility_LoginHelper_LOCALHOST: <![CDATA[ Requires network services hosted on LOCALHOST only ]]>
- * @Accessibility_LoginHelper_SERIAL_OUT: <![CDATA[ Writes to a serial port ]]>
- * @Accessibility_LoginHelper_SERIAL_IN: <![CDATA[ !<: Reads from a serial port ]]>
- *
- * <![CDATA[ The system and device access and services which the LoginHelper-implementing assistive technology requires in order to enable the user to use the system. ]]>
- *
- * Bitfield/set of flags generated from the AT-SPI specification.
- */
-typedef enum {
- Accessibility_LoginHelper_GUI_EVENTS,
- Accessibility_LoginHelper_CORE_KEYBOARD,
- Accessibility_LoginHelper_CORE_POINTER,
- Accessibility_LoginHelper_EXT_INPUT,
- Accessibility_LoginHelper_POST_WINDOWS,
- Accessibility_LoginHelper_AUDIO_OUT,
- Accessibility_LoginHelper_AUDIO_IN,
- Accessibility_LoginHelper_NETWORK,
- Accessibility_LoginHelper_LOCALHOST,
- Accessibility_LoginHelper_SERIAL_OUT,
- Accessibility_LoginHelper_SERIAL_IN,
-} Accessibility_LoginHelper_DeviceReq;
-
-/**
- * NUM_ACCESSIBILITY_DEVICEREQS:
- *
- * 1 higher than the highest valid value of #Accessibility_LoginHelper_DeviceReq.
- */
-#define NUM_ACCESSIBILITY_DEVICEREQS (10+1)
-
-/**
- *
-Accessibility_Selector_CommandResult:
- * @Accessibility_Selector_COMMAND_RESULT_INVALID: <![CDATA[ The command was invalid or ill-formed; usually indicates an error condition. ]]>
- * @Accessibility_Selector_COMMAND_RESULT_SUCCESS: <![CDATA[ The command was successfully activated. ]]>
- * @Accessibility_Selector_COMMAND_RESULT_FAILED: <![CDATA[ The command was valid, but could not be activated. This may be due to problems with permissions or error conditions. ]]>
- * @Accessibility_Selector_COMMAND_RESULT_OBSOLETE: <![CDATA[ The command is no longer valid in the current program context. This may mean that the application has changed state in such a way that the specified command it no longer applicable, or because changes to the application state have rendered it ambiguous. Commands should be re-fetched and a new selection made. ]]>
- * @Accessibility_Selector_COMMAND_RESULT_LAST_DEFINED: <![CDATA[ Defines size of enumeration; do not use this value as a parameter. ]]>
- *
- * <![CDATA[ A code returned by a call to activateCommand, indicating the result of the activation request. ]]>
- *
- * Bitfield/set of flags generated from the AT-SPI specification.
- */
-typedef enum {
- Accessibility_Selector_COMMAND_RESULT_INVALID,
- Accessibility_Selector_COMMAND_RESULT_SUCCESS,
- Accessibility_Selector_COMMAND_RESULT_FAILED,
- Accessibility_Selector_COMMAND_RESULT_OBSOLETE,
- Accessibility_Selector_COMMAND_RESULT_LAST_DEFINED,
-} Accessibility_Selector_CommandResult;
-
-/**
- * NUM_ACCESSIBILITY_COMMANDRESULTS:
- *
- * 1 higher than the highest valid value of #Accessibility_Selector_CommandResult.
- */
-#define NUM_ACCESSIBILITY_COMMANDRESULTS (4+1)
-
#ifdef __cplusplus
}
#define SPI_DBUS_INTERFACE_DESKTOP "org.freedesktop.atspi.Desktop"
#define SPI_DBUS_PATH_DEC "/org/freedesktop/atspi/registry/deviceeventcontroller"
-#define SPI_DBUS_PATH_NULL "/org/freedesktop/accessible/null"
+#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"
spi_atk_state_to_dbus_array (AtkObject * object, dbus_uint32_t * array)
{
AtkStateSet *set = atk_object_ref_state_set (object);
+ spi_atk_state_set_to_dbus_array (set, array);
+ g_object_unref (set);
+}
+
+void
+spi_atk_state_set_to_dbus_array (AtkStateSet * set, dbus_uint32_t * array)
+{
int i;
array[0] = 0;
BITARRAY_SET (array, a);
}
}
- g_object_unref (set);
}
AtkStateSet *spi_state_set_cache_from_sequence(const GArray *seq);
AtkState spi_atk_state_from_spi_state (Accessibility_StateType state);
void spi_atk_state_to_dbus_array (AtkObject * object, dbus_uint32_t * array);
+void spi_atk_state_set_to_dbus_array (AtkStateSet *set, dbus_uint32_t * array);
#define spi_state_set_cache_ref(s) g_object_ref (s)
#define spi_state_set_cache_unref(s) g_object_unref (s)
#define spi_state_set_cache_new(seq) spi_state_set_cache_from_sequence (seq)