gtkmoduledir = $(libdir)/$(GTK_MODULE_DIR)
gtkmodule_LTLIBRARIES = libspiatk.la
-libspiatk_la_CFLAGS = $(DBUS_GLIB_CFLAGS) $(ATK_CFLAGS) -I$(top_srcdir)\
+libspiatk_la_CFLAGS = $(DBUS_GLIB_CFLAGS)\
+ $(ATK_CFLAGS)\
+ -I$(top_srcdir)\
+ -I$(top_srcdir)/atk-adaptor/adaptors\
-DATSPI_INTROSPECTION_PATH=\"$(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH)\"
libspiatk_la_LDFLAGS = -no-undefined \
$(top_builddir)/spi-common/libspicommon.la
libspiatk_la_SOURCES = \
- accessible.h \
- accessible.c \
- action.c \
- application.c \
+ accessible-adaptor.c \
+ accessible-marshaller.c \
+ accessible-marshaller.h \
+ accessible-register.c \
+ accessible-register.h \
+ action-adaptor.c \
+ adaptor.h \
+ application-adaptor.c \
bridge.c \
bridge.h \
- collection.c \
- component.c \
- document.c \
- editabletext.c \
+ collection-adaptor.c \
+ component-adaptor.c \
+ document-adaptor.c \
+ editabletext-adaptor.c \
event.c \
- hyperlink.c \
- hypertext.c \
- atk-dbus.c \
- atk-dbus.h \
- image.c \
- selection.c \
- table.c \
- text.c \
- tree.c \
- tree.h \
- value.c
+ event.h \
+ hyperlink-adaptor.c \
+ hypertext-adaptor.c \
+ image-adaptor.c \
+ selection-adaptor.c \
+ table-adaptor.c \
+ text-adaptor.c \
+ tree-adaptor.c \
+ tree-adaptor.h \
+ value-adaptor.c
#include <atk/atk.h>
#include <droute/droute.h>
-#include "atk-dbus.h"
#include "spi-common/spi-dbus.h"
+#include "accessible-marshaller.h"
static dbus_bool_t
impl_get_name (DBusMessageIter *iter, void *user_data)
--- /dev/null
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2008 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "accessible-register.h"
+#include "accessible-marshaller.h"
+
+/*---------------------------------------------------------------------------*/
+
+/*
+ * 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)
+{
+ DBusMessage *reply;
+ gchar *path;
+
+ path = atk_dbus_object_to_path (obj);
+
+ if (unref)
+ g_object_unref (obj);
+
+ reply = dbus_message_new_method_return (message);
+ if (reply)
+ {
+ dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, path,
+ DBUS_TYPE_INVALID);
+ }
+ return reply;
+}
+
+/*---------------------------------------------------------------------------*/
+
+/*
+ * Marshals a variant containing the D-Bus path of an AtkObject into a D-Bus
+ * message.
+ *
+ * Unrefs the object if unref is true.
+ */
+dbus_bool_t
+spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref)
+{
+ char *path;
+
+ path = atk_dbus_object_to_path (obj);
+
+ if (unref)
+ g_object_unref (obj);
+
+ return droute_return_v_object (iter, path);
+}
+
+/*END------------------------------------------------------------------------*/
+
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2001, 2002 Sun Microsystems Inc.,
- * Copyright 2001, 2002 Ximian, Inc.
+ * Copyright 2008 Novell, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef SPI_ACCESSIBLE_H_
-#define SPI_ACCESSIBLE_H_
+#ifndef __ACCESSIBLE_MARSHALLER__
+#define __ACCESSIBLE_MARSHALLER__
+#include <dbus/dbus.h>
#include <atk/atk.h>
-#include <spi-common/spi-types.h>
-G_BEGIN_DECLS
+DBusMessage *
+spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean unref);
-Accessibility_Role spi_accessible_role_from_atk_role (AtkRole role);
+dbus_bool_t
+spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref);
-G_END_DECLS
-
-#endif /* SPI_ACCESSIBLE_H_ */
+#endif /* __ACCESSIBLE_MARSHALLER__ */
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
* Copyright 2008 Novell, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include <string.h>
#include "bridge.h"
-#include "accessible.h"
-#include "atk-dbus.h"
+#include "accessible-register.h"
/* TODO
* Need to add concurrency support.
* removed since the last update.
*/
-/* Amazingly the ATK event callbacks dont have a user
- * data parameter. Instead, with great sadness, we use
- * some global data. Data is declared and initialized
- * in bridge.c.
- */
-
GHashTable *ref2ptr = NULL; /* Used for converting a D-Bus path (Reference) to the object pointer */
static guint counter = 1;
-extern SpiAppData *atk_adaptor_app_data;
-
/*---------------------------------------------------------------------------*/
/*
/*---------------------------------------------------------------------------*/
/*
- * Marshals a single object into a D-Bus message.
- *
- * Unrefs the AtkObject if unref is true.
- */
-DBusMessage *
-spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean unref)
-{
- DBusMessage *reply;
- gchar *path;
-
- path = atk_dbus_object_to_path (obj);
-
- if (unref)
- g_object_unref (obj);
-
- reply = dbus_message_new_method_return (message);
- if (reply)
- {
- dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, path,
- DBUS_TYPE_INVALID);
- }
- return reply;
-}
-
-/*---------------------------------------------------------------------------*/
-
-/*
- * Marshals a variant containing the object reference into the message iter
- * provided.
- *
- * Unrefs the object if unref is true.
- */
-dbus_bool_t
-spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref)
-{
- char *path;
-
- path = atk_dbus_object_to_path (obj);
-
- if (unref)
- g_object_unref (obj);
-
- return droute_return_v_object (iter, path);
-}
-
-/*---------------------------------------------------------------------------*/
-
-/*
* Initializes required global data. The update and removal lists
* and the reference lookup tables.
*
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
* Copyright 2008 Novell, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef __ATK_DBUS__
-#define __ATK_DBUS__
+#ifndef ACCESSIBLE_REGISTER
+#define ACCESSIBLE_REGISTER
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <atk/atk.h>
#include <glib.h>
void
atk_dbus_foreach_registered(GHFunc func, gpointer data);
-void
-atk_dbus_foreach_update_list(GHFunc func, gpointer data);
-
-void
-atk_dbus_foreach_remove_list(GHFunc func, gpointer data);
-
/*---------------------------------------------------------------------------*/
guint
atk_dbus_path_to_object (const char *path);
gchar *
-atk_dbus_ref_to_path (guint ref);
-
-gchar *
atk_dbus_object_to_path (AtkObject *accessible);
-/*---------------------------------------------------------------------------*/
-
-DBusMessage *
-spi_dbus_return_object (DBusMessage *message, AtkObject *obj, gboolean unref);
-
-dbus_bool_t
-spi_dbus_return_v_object (DBusMessageIter *iter, AtkObject *obj, int unref);
-
-#endif /* __ATK_DBUS__ */
+#endif /* ACCESSIBLE_REGISTER */
--- /dev/null
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef ADAPTORS_H
+#define ADAPTORS_H
+
+#include <atk/atk.h>
+#include <droute/droute.h>
+
+Accessibility_Role spi_accessible_role_from_atk_role (AtkRole role);
+
+void spi_initialize_accessible (DRoutePath *path);
+void spi_initialize_action (DRoutePath *path);
+void spi_initialize_application (DRoutePath *path);
+void spi_initialize_collection (DRoutePath *path);
+void spi_initialize_component (DRoutePath *path);
+void spi_initialize_document (DRoutePath *path);
+void spi_initialize_editabletext (DRoutePath *path);
+void spi_initialize_hyperlink (DRoutePath *path);
+void spi_initialize_hypertext (DRoutePath *path);
+void spi_initialize_image (DRoutePath *path);
+void spi_initialize_selection (DRoutePath *path);
+void spi_initialize_table (DRoutePath *path);
+void spi_initialize_text (DRoutePath *path);
+void spi_initialize_value (DRoutePath *path);
+void spi_initialize_tree (DRoutePath *path);
+
+#endif /* ADAPTORS_H */
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2008 Codethink Ltd.
+ * Copyright 2008, 2009 Codethink Ltd.
* Copyright 2001, 2002, 2003 Sun Microsystems Inc.,
* Copyright 2001, 2002, 2003 Ximian, Inc.
*
#include <X11/Xlib.h>
#include <X11/Xatom.h>
-#include <string.h>
-#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include <atk/atk.h>
-#include <atk/atkobject.h>
-#include <atk/atknoopobject.h>
#include <droute/droute.h>
#include "bridge.h"
#include "event.h"
-#include "atk-dbus.h"
+#include "accessible-register.h"
+#include "adaptors.h"
#include "spi-common/spi-dbus.h"
*
* Copyright 2001, 2002, 2003 Sun Microsystems Inc.,
* Copyright 2001, 2002, 2003 Ximian, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef SPI_BRIDGE_H_
-#define SPI_BRIDGE_H_
+#ifndef BRIDGE_H
+#define BRIDGE_H
#include <atk/atk.h>
#include <droute/droute.h>
-G_BEGIN_DECLS
-
typedef struct _SpiAppData SpiAppData;
struct _SpiAppData
{
AtkObject *root;
+
DBusConnection *bus;
DRouteContext *droute;
};
-void spi_initialize_accessible (DRoutePath *path);
-void spi_initialize_action (DRoutePath *path);
-void spi_initialize_application (DRoutePath *path);
-void spi_initialize_collection (DRoutePath *path);
-void spi_initialize_component (DRoutePath *path);
-void spi_initialize_document (DRoutePath *path);
-void spi_initialize_editabletext (DRoutePath *path);
-void spi_initialize_hyperlink (DRoutePath *path);
-void spi_initialize_hypertext (DRoutePath *path);
-void spi_initialize_image (DRoutePath *path);
-void spi_initialize_selection (DRoutePath *path);
-void spi_initialize_table (DRoutePath *path);
-void spi_initialize_text (DRoutePath *path);
-void spi_initialize_value (DRoutePath *path);
-
-void spi_initialize_tree (DRoutePath *path);
-
-G_END_DECLS
+extern SpiAppData *atk_adaptor_app_data;
-#endif /* SPI_BRIDGE_H_ */
+#endif /* BRIDGE_H */
#include <atk/atk.h>
#include <droute/droute.h>
-#include "atk-dbus.h"
+#include "accessible-register.h"
+#include "accessible-marshaller.h"
#include "spi-common/bitarray.h"
#include "spi-common/spi-dbus.h"
#include <atk/atk.h>
#include <droute/droute.h>
-#include "atk-dbus.h"
+#include "accessible-marshaller.h"
#include "spi-common/spi-dbus.h"
static DBusMessage *
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2008, Codethink Ltd.
+ * Copyright 2008, 2009, Codethink Ltd.
* Copyright 2001, 2002, 2003 Sun Microsystems Inc.,
* Copyright 2001, 2002, 2003 Ximian, Inc.
*
#include <droute/droute.h>
#include "bridge.h"
-#include "atk-dbus.h"
+#include "accessible-register.h"
#include "spi-common/spi-dbus.h"
static gint atk_bridge_key_event_listener_id;
static gint atk_bridge_focus_tracker_id;
-/* Amazingly the ATK event callbacks dont have a user
- * data parameter. Instead, with great sadness, we use
- * some global data. Data is declared and initialized
- * in bridge.c.
- */
-extern SpiAppData *atk_adaptor_app_data;
-
/*---------------------------------------------------------------------------*/
#define ITF_EVENT_OBJECT "org.freedesktop.atspi.Event.Object"
*
* Copyright 2001, 2002 Sun Microsystems Inc.,
* Copyright 2001, 2002 Ximian, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef SPI_EVENT_H_
-#define SPI_EVENT_H_
+#ifndef EVENT_H
+#define EVENT_H
-#include <atk/atk.h>
#include <spi-common/spi-types.h>
-G_BEGIN_DECLS
-
void spi_atk_register_event_listeners (void);
void spi_atk_deregister_event_listeners (void);
void spi_atk_tidy_windows (void);
-G_END_DECLS
-
-#endif /* SPI_EVENT_H_ */
+#endif /* EVENT_H */
#include <atk/atk.h>
#include <droute/droute.h>
-#include "atk-dbus.h"
+#include "accessible-marshaller.h"
#include "spi-common/spi-dbus.h"
static dbus_bool_t
#include <config.h>
#include <stdio.h>
#include <string.h>
-#include <libspi/accessible.h>
+
#include <libspi/component.h>
#include <libspi/streamablecontent.h>
#include <atk/atk.h>
#include <droute/droute.h>
-#include "atk-dbus.h"
+#include "accessible-marshaller.h"
#include "spi-common/spi-dbus.h"
static dbus_bool_t
* Copyright 2008 Novell, Inc.
* Copyright 2001, 2002 Sun Microsystems Inc.,
* Copyright 2001, 2002 Ximian, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include <atk/atk.h>
#include <droute/droute.h>
-#include "atk-dbus.h"
-#include "spi-common/spi-dbus.h"
#include "bridge.h"
+#include "accessible-register.h"
+#include "spi-common/spi-dbus.h"
/*---------------------------------------------------------------------------*/
*
* Copyright 2001, 2002 Sun Microsystems Inc.,
* Copyright 2001, 2002 Ximian, Inc.
+ * Copyright 2008, 2009 Codethink Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef SPI_TREE_H_
-#define SPI_TREE_H_
+#ifndef TREE_ADAPTOR_H
+#define TREE_ADAPTOR_H
#include <atk/atk.h>
-#include <spi-common/spi-types.h>
#include <dbus/dbus.h>
-G_BEGIN_DECLS
-
void
spi_emit_cache_update (AtkObject *accessible, DBusConnection *bus);
void
spi_emit_cache_removal (guint ref, DBusConnection *bus);
-G_END_DECLS
-
-#endif /* SPI_ACCESSIBLE_H_ */
+#endif /* TREE_ADAPTOR_H */