From: Mark Doffman Date: Fri, 16 May 2008 20:21:32 +0000 (+0100) Subject: 2008-05-16 Mark Doffman X-Git-Tag: AT_SPI2_ATK_2_12_0~705 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e86d81ec4a46fd2222c5880b3dcb507ce2f9aca;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git 2008-05-16 Mark Doffman Assorted changed to get the reorganized source tree working. *atk-adaptor/ Move the object registry functionality from spi-dbus here as it was not used by the registryd. *spi-common/ Move object registry funtionality out to adaptor. *configure.ac droute/Makefile.am xml/Makefile.am Provide a matching install path and default search path for the introspection files. *xml/introspection/org.freedesktop.atspi.Tree Remove as this file is not autogenerated. --- diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am index 18efb50..3b0a5e2 100644 --- a/atk-adaptor/Makefile.am +++ b/atk-adaptor/Makefile.am @@ -10,7 +10,7 @@ libspiatk_la_LDFLAGS = -no-undefined \ libspiatk_la_LIBADD = $(DBUS_GLIB_LIBS) \ $(ATK_LIBS) \ - $(top_builddir)/droute/libdroute.la \ + $(top_builddir)/droute/libdroute.la\ $(top_builddir)/spi-common/libspicommon.la libspiatk_la_SOURCES = \ diff --git a/atk-adaptor/accessible.h b/atk-adaptor/accessible.h index 4ebf8b4..958f4ec 100644 --- a/atk-adaptor/accessible.h +++ b/atk-adaptor/accessible.h @@ -47,7 +47,7 @@ void spi_initialize_selection(DRouteData *data); void spi_initialize_table(DRouteData *data); void spi_initialize_text(DRouteData *data); void spi_initialize_value(DRouteData *data); -void spi_initialize_introspectable(DRouteData *data); +void spi_initialize_introspectable(DRouteData *data, DRouteGetDatumFunction verify_object); void spi_dbus_initialize(DRouteData *data); AtkObject *spi_dbus_get_object(const char *path); diff --git a/atk-adaptor/atk-dbus.c b/atk-adaptor/atk-dbus.c index ac5e3c2..93605c1 100644 --- a/atk-adaptor/atk-dbus.c +++ b/atk-adaptor/atk-dbus.c @@ -26,7 +26,46 @@ #include "accessible.h" -extern GHashTable *path2ptr; +GHashTable *path2ptr; +static guint objindex; + +static void +deregister_object (gpointer data, GObject *obj) +{ + spi_dbus_notify_remove(ATK_OBJECT(obj), NULL); + g_hash_table_remove (path2ptr, &obj); +} + +static guint +register_object (GObject * obj) +{ + gint *new_int; + + if (!path2ptr) + { + path2ptr = g_hash_table_new_full (g_int_hash, g_int_equal, g_free, NULL); + if (!path2ptr) + return ++objindex; + } + objindex++; + while (g_hash_table_lookup (path2ptr, &objindex)) + { + objindex++; + /* g_object_get_data returning 0 means no data, so handle wrap-around */ + if (objindex == 0) + objindex++; + } + new_int = (gint *)g_malloc(sizeof(gint)); + if (new_int) + { + *new_int = objindex; + g_hash_table_insert (path2ptr, new_int, obj); + } + g_object_set_data (G_OBJECT (obj), "dbus-id", (gpointer) objindex); + g_object_weak_ref(G_OBJECT(obj), deregister_object, NULL); + spi_dbus_notify_change(obj, TRUE, NULL); + return objindex; +} AtkObject * spi_dbus_get_object (const char *path) @@ -105,7 +144,7 @@ spi_dbus_initialize (DRouteData * data) spi_initialize_table (data); spi_initialize_text (data); spi_initialize_value (data); - spi_initialize_introspectable(data); + spi_initialize_introspectable(data, (DRouteGetDatumFunction) spi_dbus_get_object); } static GString * diff --git a/configure.ac b/configure.ac index 978cd69..e4226d0 100644 --- a/configure.ac +++ b/configure.ac @@ -90,9 +90,10 @@ if test x$enable_xevie = xyes ; then fi AC_ARG_VAR([DEFAULT_ATSPI_INTROSPECTION_PATH], - [Set the default path for the DBus introspection XML]) + [Set the default path for the install ofDBus introspection XML + relative to the pkgdatadir.]) if test -z "$DEFAULT_ATSPI_INTROSPECTION_PATH"; then - DEFAULT_ATSPI_INTROSPECTION_PATH=atspi/dbus + DEFAULT_ATSPI_INTROSPECTION_PATH=dbus fi AC_ARG_VAR([GTK_MODULE_DIR], diff --git a/droute/Makefile.am b/droute/Makefile.am index 39dccbc..2071b8f 100644 --- a/droute/Makefile.am +++ b/droute/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libdroute.la libdroute_la_CFLAGS = $(DBUS_GLIB_CFLAGS) $(ATK_CFLAGS)\ - -DATSPI_INTROSPECTION_PATH=\"$(DEFAULT_ATSPI_INTROSPECTION_PATH)\"\ + -DATSPI_INTROSPECTION_PATH=\"$(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH)\"\ -I$(top_builddir)\ -I$(top_srcdir) diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index f5d6fb6..24969f5 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -61,7 +61,6 @@ #include "deviceeventcontroller.h" #include "reentrant-list.h" -#include "libspi/keymasks.h" KeySym ucs2keysym (long ucs); long keysym2ucs(KeySym keysym); diff --git a/registryd/registry.c b/registryd/registry.c index 92b481f..3dc13d6 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -39,10 +39,6 @@ /* Our parent GObject type */ #define PARENT_TYPE G_OBJECT_TYPE -<<<<<<< HEAD:registryd/registry.c -======= - ->>>>>>> 6d509d490749c6bac3149a5ec45862352ffcf290:registryd/registry.c int _dbg = 0; diff --git a/spi-common/Makefile.am b/spi-common/Makefile.am index 216c378..a64d602 100644 --- a/spi-common/Makefile.am +++ b/spi-common/Makefile.am @@ -1,10 +1,12 @@ noinst_LTLIBRARIES = libspicommon.la -libspicommon_la_CFLAGS = $(DBUS_GLIB_CFLAGS) $(ATK_CFLAGS)\ +libspicommon_la_CFLAGS = $(DBUS_GLIB_CFLAGS)\ -DATSPI_INTROSPECTION_PATH=\"$(DEFAULT_ATSPI_INTROSPECTION_PATH)\"\ -I$(top_builddir)\ -I$(top_srcdir) +libspicommon_la_LIBADD = $(DBUS_GLIB_LIBS) + BUILT_SOURCES = generated-types.h CLEANFILES = generated-types.h diff --git a/spi-common/spi-dbus.c b/spi-common/spi-dbus.c index 4e176e1..bd099d0 100644 --- a/spi-common/spi-dbus.c +++ b/spi-common/spi-dbus.c @@ -29,47 +29,6 @@ #include "spi-types.h" -GHashTable *path2ptr; -static guint objindex; - -static void -deregister_object (gpointer data, GObject *obj) -{ - spi_dbus_notify_remove(ATK_OBJECT(obj), NULL); - g_hash_table_remove (path2ptr, &obj); -} - -static guint -register_object (GObject * obj) -{ - gint *new_int; - - if (!path2ptr) - { - path2ptr = g_hash_table_new_full (g_int_hash, g_int_equal, g_free, NULL); - if (!path2ptr) - return ++objindex; - } - objindex++; - while (g_hash_table_lookup (path2ptr, &objindex)) - { - objindex++; - /* g_object_get_data returning 0 means no data, so handle wrap-around */ - if (objindex == 0) - objindex++; - } - new_int = (gint *)g_malloc(sizeof(gint)); - if (new_int) - { - *new_int = objindex; - g_hash_table_insert (path2ptr, new_int, obj); - } - g_object_set_data (G_OBJECT (obj), "dbus-id", (gpointer) objindex); - g_object_weak_ref(G_OBJECT(obj), deregister_object, NULL); - spi_dbus_notify_change(obj, TRUE, NULL); - return objindex; -} - DBusMessage * spi_dbus_general_error (DBusMessage * message) { diff --git a/xml/Makefile.am b/xml/Makefile.am index 64b9207..5654674 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -37,5 +37,5 @@ INTROSPECT_FILES = $(addprefix introspection/,$(patsubst %.xml,%,$(filter org.fr $(INTROSPECT_FILES): introspection/%: %.xml ../tools/spec-to-introspect.xsl xsltproc ../tools/spec-to-introspect.xsl $< |sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g' >$@ -introspectdir = $(pkgdatadir)/dbus +introspectdir = $(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH) dist_introspect_DATA = $(INTROSPECT_FILES) diff --git a/xml/introspection/org.freedesktop.atspi.Tree b/xml/introspection/org.freedesktop.atspi.Tree deleted file mode 100644 index 7171efb..0000000 --- a/xml/introspection/org.freedesktop.atspi.Tree +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - -