summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rwxr-xr-xautogen.sh23
-rw-r--r--configure.ac2
-rw-r--r--dbind/dbind.c63
-rw-r--r--dbind/dbind.h9
-rw-r--r--m4/dbind.m4 (renamed from acinclude.m4)0
-rw-r--r--registryd/Makefile.am1
-rw-r--r--registryd/registry.c2
-rw-r--r--spi-common/generated-types.h33
-rw-r--r--spi-common/spi-dbus.c137
-rw-r--r--spi-common/spi-dbus.h10
-rw-r--r--spi-common/spi-stateset.c199
-rw-r--r--spi-common/spi-stateset.h50
13 files changed, 55 insertions, 476 deletions
diff --git a/Makefile.am b/Makefile.am
index 067574e5..e56e9b5d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
SUBDIRS=xml tools dbind droute spi-common registryd
+ACLOCAL_AMFLAGS=-I m4
+
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/autogen.sh b/autogen.sh
index fdc9e530..d347f662 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,9 +9,6 @@ test "$srcdir" || srcdir=.
test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53
test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9
test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.5
-test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.12
-test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0
-test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.30
test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0
test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0
test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0
@@ -328,24 +325,6 @@ if $want_libtool; then
require_m4macro libtool.m4
fi
-if $want_gettext; then
- version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
- "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz"
- require_m4macro gettext.m4
-fi
-
-if $want_glib_gettext; then
- version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
- "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz"
- require_m4macro glib-gettext.m4
-fi
-
-if $want_intltool; then
- version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
- "http://ftp.gnome.org/pub/GNOME/sources/intltool/"
- require_m4macro intltool.m4
-fi
-
if $want_pkg_config; then
version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
"'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz"
@@ -485,7 +464,7 @@ for configure_ac in $configure_files; do
fi
done
-conf_flags="--enable-maintainer-mode"
+conf_flags=
if test x$NOCONFIGURE = x; then
printbold Running $srcdir/configure $conf_flags "$@" ...
diff --git a/configure.ac b/configure.ac
index 69c38da2..a1b760d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
AC_INIT([at-spi-core], [1.9.0], [accessibility-atspi@lists.linux-foundation.org])
AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_MACRO_DIR([m4])
AT_SPI_CORE_MAJOR_VERSION=1
AT_SPI_CORE_MINOR_VERSION=23
@@ -13,6 +14,7 @@ AC_SUBST(AT_SPI_CORE_MICRO_VERSION)
AC_SUBST(AT_SPI_CORE_INTERFACE_AGE)
AC_SUBST(AT_SPI_CORE_BINARY_AGE)
+
# libtool versioning
LT_RELEASE=$AT_SPI_CORE_MAJOR_VERSION.$AT_SPI_CORE_MINOR_VERSION
LT_CURRENT=10
diff --git a/dbind/dbind.c b/dbind/dbind.c
index 512133dd..f85371d3 100644
--- a/dbind/dbind.c
+++ b/dbind/dbind.c
@@ -150,36 +150,20 @@ dbind_method_call_reentrant (DBusConnection *cnx,
/*---------------------------------------------------------------------------*/
-/**
- * dbind_emit_signal:
- *
- * @cnx: A D-Bus Connection used to make the method call.
- * @path: The D-Bus object path that this signal is emitted from.
- * @interface: The D-Bus interface used to scope the method name.
- * @signal: Name of signal to emit.
- * @opt_error: D-Bus error.
- * @arg_types: Variable length arguments interleaving D-Bus argument types
- * and pointers to argument data.
- *
- * Emits a D-Bus signal using the supplied signal name and argument data.
- **/
dbus_bool_t
-dbind_emit_signal (DBusConnection *cnx,
- const char *path,
- const char *interface,
- const char *signal,
- DBusError *opt_error,
- const char *arg_types,
- ...)
+dbind_emit_signal_va (DBusConnection *cnx,
+ const char *path,
+ const char *interface,
+ const char *signal,
+ DBusError *opt_error,
+ const char *arg_types,
+ va_list args)
{
dbus_bool_t success = FALSE;
DBusMessage *msg = NULL;
DBusMessageIter iter;
DBusError *err, real_err;
char *p;
- va_list args;
-
- va_start (args, arg_types);
if (opt_error)
err = opt_error;
@@ -200,7 +184,6 @@ dbind_emit_signal (DBusConnection *cnx,
success = TRUE;
out:
- va_end (args);
if (msg)
dbus_message_unref (msg);
@@ -211,4 +194,36 @@ out:
return success;
}
+/**
+ * dbind_emit_signal:
+ *
+ * @cnx: A D-Bus Connection used to make the method call.
+ * @path: The D-Bus object path that this signal is emitted from.
+ * @interface: The D-Bus interface used to scope the method name.
+ * @signal: Name of signal to emit.
+ * @opt_error: D-Bus error.
+ * @arg_types: Variable length arguments interleaving D-Bus argument types
+ * and pointers to argument data.
+ *
+ * Emits a D-Bus signal using the supplied signal name and argument data.
+ **/
+dbus_bool_t
+dbind_emit_signal (DBusConnection *cnx,
+ const char *path,
+ const char *interface,
+ const char *signal,
+ DBusError *opt_error,
+ const char *arg_types,
+ ...)
+{
+ dbus_bool_t success = FALSE;
+ va_list args;
+
+ va_start (args, arg_types);
+ success = dbind_emit_signal_va (cnx, path, interface, signal, opt_error, arg_types, args);
+ va_end (args);
+
+ return success;
+}
+
/*END------------------------------------------------------------------------*/
diff --git a/dbind/dbind.h b/dbind/dbind.h
index c3e1d568..cc318c48 100644
--- a/dbind/dbind.h
+++ b/dbind/dbind.h
@@ -26,6 +26,15 @@ dbind_method_call_reentrant (DBusConnection *cnx,
...);
dbus_bool_t
+dbind_emit_signal_va (DBusConnection *cnx,
+ const char *path,
+ const char *interface,
+ const char *signal,
+ DBusError *opt_error,
+ const char *arg_types,
+ va_list args);
+
+dbus_bool_t
dbind_emit_signal (DBusConnection *cnx,
const char *path,
const char *interface,
diff --git a/acinclude.m4 b/m4/dbind.m4
index 6eb7916d..6eb7916d 100644
--- a/acinclude.m4
+++ b/m4/dbind.m4
diff --git a/registryd/Makefile.am b/registryd/Makefile.am
index 19b745bb..aa56b735 100644
--- a/registryd/Makefile.am
+++ b/registryd/Makefile.am
@@ -15,6 +15,7 @@ at_spi_registryd_LDADD = $(DBUS_GLIB_LIBS) \
$(XTST_LIBS) \
$(XEVIE_LIBS) \
$(top_builddir)/droute/libdroute.la\
+ $(top_builddir)/dbind/libdbind.la\
$(top_builddir)/spi-common/libspicommon.la
at_spi_registryd_SOURCES = \
diff --git a/registryd/registry.c b/registryd/registry.c
index 2751e909..e6d9d790 100644
--- a/registryd/registry.c
+++ b/registryd/registry.c
@@ -59,7 +59,7 @@ static void emit(SpiRegistry *reg, const char *itf, const char *name, int ftype,
va_list arg;
va_start(arg, ftype);
- spi_dbus_emit_valist(reg->bus, SPI_DBUS_PATH_REGISTRY, itf, name, ftype, arg);
+ dbind_emit_signal_va (reg->bus, SPI_DBUS_PATH_REGISTRY, itf, name, NULL, ftype, arg);
va_end(arg);
}
diff --git a/spi-common/generated-types.h b/spi-common/generated-types.h
index c165cf62..bf07c708 100644
--- a/spi-common/generated-types.h
+++ b/spi-common/generated-types.h
@@ -761,39 +761,6 @@ typedef enum {
#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.
diff --git a/spi-common/spi-dbus.c b/spi-common/spi-dbus.c
index f8591567..e2693f5e 100644
--- a/spi-common/spi-dbus.c
+++ b/spi-common/spi-dbus.c
@@ -29,62 +29,6 @@
#include "spi-types.h"
-/*
-DBusMessage *
-spi_dbus_general_error (DBusMessage * message)
-{
- return dbus_message_new_error (message,
- "org.freedesktop.atspi.GeneralError",
- "General error");
-}
-*/
-
-
-DBusMessage *
-spi_dbus_return_rect (DBusMessage * message, gint ix, gint iy, gint iwidth,
- gint iheight)
-{
- DBusMessage *reply;
- dbus_uint32_t x, y, width, height;
-
- x = ix;
- y = iy;
- width = iwidth;
- height = iheight;
- reply = dbus_message_new_method_return (message);
- if (reply)
- {
- DBusMessageIter iter, sub;
- dbus_message_iter_init_append (reply, &iter);
- if (!dbus_message_iter_open_container
- (&iter, DBUS_TYPE_STRUCT, NULL, &sub))
- goto oom;
- dbus_message_iter_append_basic (&sub, DBUS_TYPE_INT32, &x);
- dbus_message_iter_append_basic (&sub, DBUS_TYPE_INT32, &y);
- dbus_message_iter_append_basic (&sub, DBUS_TYPE_INT32, &width);
- dbus_message_iter_append_basic (&sub, DBUS_TYPE_INT32, &height);
- if (!dbus_message_iter_close_container (&iter, &sub))
- goto oom;
- }
- return reply;
-oom:
- /* todo: return an error */
- return reply;
-}
-
-void spi_dbus_emit_valist(DBusConnection *bus, const char *path, const char *interface, const char *name, int first_arg_type, va_list args)
-{
- DBusMessage *sig;
-
- sig = dbus_message_new_signal(path, interface, name);
- if (first_arg_type != DBUS_TYPE_INVALID)
- {
- dbus_message_append_args_valist(sig, first_arg_type, args);
- }
- dbus_connection_send(bus, sig, NULL);
- dbus_message_unref(sig);
-}
-
dbus_bool_t spi_dbus_message_iter_get_struct(DBusMessageIter *iter, ...)
{
va_list args;
@@ -171,84 +115,3 @@ provide_defaults(const gint type,
return val;
}
}
-
-void
-spi_dbus_emit_signal(DBusConnection *bus, const char *path,
- const char *klass,
- const char *major,
- const char *minor,
- dbus_int32_t detail1,
- dbus_int32_t detail2,
- const char *type,
- const void *val)
-{
- gchar *cname, *t;
- DBusMessage *sig;
- DBusMessageIter iter, sub;
- if (!klass) klass = "";
- if (!major) major = "";
- if (!minor) minor = "";
- if (!type) type = "u";
-
- /*
- * This is very annoying, but as '-' isn't a legal signal
- * 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 = '_';
-
- sig = dbus_message_new_signal(path, klass, cname);
- g_free(cname);
-
- dbus_message_iter_init_append(sig, &iter);
-
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &minor);
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &detail1);
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &detail2);
-
- dbus_message_iter_open_container(&iter, DBUS_TYPE_VARIANT, type, &sub);
- /*
- * I need to convert the string signature to an integer type signature.
- * DBUS_TYPE_INT32 is defined as 'i' whereas the string is "i".
- * I should just be able to cast the first character of the string to an
- * integer.
- */
- val = provide_defaults((int) *type, val);
- dbus_message_iter_append_basic(&sub, (int) *type, &val);
- dbus_message_iter_close_container(&iter, &sub);
-
- dbus_connection_send(bus, sig, NULL);
- dbus_message_unref(sig);
-}
-
-/*
-dbus_bool_t spi_dbus_get_simple_property (DBusConnection *bus, const char *dest, const char *path, const char *interface, const char *prop, int *type, void *ptr, DBusError *error)
-{
- DBusMessage *message, *reply;
- DBusMessageIter iter, iter_variant;
- int typ;
-
- dbus_error_init (error);
- message = dbus_message_new_method_call (dest, path, "org.freedesktop.DBus.Properties", "get");
- if (!message) return FALSE;
- if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &interface, DBUS_TYPE_STRING, &prop, DBUS_TYPE_INVALID))
- {
- return FALSE;
- }
- reply = dbus_connection_send_with_reply_and_block (bus, message, 1000, error);
- dbus_message_unref (message);
- if (!reply) return FALSE;
- dbus_message_iter_init (reply, &iter);
- dbus_message_iter_recurse (&iter, &iter_variant);
- typ = dbus_message_iter_get_arg_type (&iter_variant);
- if (type) *type = typ;
- if (typ == DBUS_TYPE_INVALID || typ == DBUS_TYPE_STRUCT || typ == DBUS_TYPE_ARRAY)
- {
- return FALSE;
- }
- dbus_message_iter_get_basic (&iter_variant, ptr);
- dbus_message_unref (reply);
- return TRUE;
-}
-*/
diff --git a/spi-common/spi-dbus.h b/spi-common/spi-dbus.h
index 85a5877c..311712a6 100644
--- a/spi-common/spi-dbus.h
+++ b/spi-common/spi-dbus.h
@@ -62,19 +62,9 @@ extern int _dbg;
#define SPI_DBUS_INTERFACE_TEXT "org.freedesktop.atspi.Text"
#define SPI_DBUS_INTERFACE_VALUE "org.freedesktop.atspi.Value"
-DBusMessage *spi_dbus_general_error(DBusMessage *message);
-DBusMessage *spi_dbus_return_rect(DBusMessage *message, gint ix, gint iy, gint iwidth, gint iheight);
-
-void spi_dbus_emit_valist(DBusConnection *bus, const char *path, const char *interface, const char *name, int first_arg_type, va_list args);
dbus_bool_t spi_dbus_message_iter_get_struct(DBusMessageIter *iter, ...);
dbus_bool_t spi_dbus_message_iter_append_struct(DBusMessageIter *iter, ...);
dbus_bool_t spi_dbus_marshall_deviceEvent(DBusMessage *message, const Accessibility_DeviceEvent *e);
dbus_bool_t spi_dbus_demarshall_deviceEvent(DBusMessage *message, Accessibility_DeviceEvent *e);
-dbus_bool_t spi_dbus_get_simple_property (DBusConnection *bus, const char *dest, const char *path, const char *interface, const char *prop, int *type, void *ptr, DBusError *error);
-void spi_dbus_emit_signal(DBusConnection *bus, const char *path, const char *klass, const char *major, const char *minor, dbus_int32_t detail1, dbus_int32_t detail2, const char *type, const void *val);
-/*
-void spi_dbus_add_disconnect_match (DBusConnection *bus, const char *name);
-void spi_dbus_remove_disconnect_match (DBusConnection *bus, const char *name);
-*/
#endif /* SPI_DBUS_H_ */
diff --git a/spi-common/spi-stateset.c b/spi-common/spi-stateset.c
deleted file mode 100644
index 4acf2032..00000000
--- a/spi-common/spi-stateset.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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.
- */
-
-/* stateset.c : implements the StateSet interface */
-
-#include <config.h>
-#include <stdio.h>
-#include "spi-stateset.h"
-#include "bitarray.h"
-
-
-static Accessibility_StateType *accessible_state_types = NULL;
-static AtkStateType *atk_state_types = NULL;
-
-
-static gboolean
-spi_init_state_type_tables (void)
-{
- gint i;
-
- if (accessible_state_types || atk_state_types)
- return FALSE;
- if (!accessible_state_types)
- accessible_state_types = g_new (Accessibility_StateType, ATK_STATE_LAST_DEFINED);
- if (!atk_state_types)
- atk_state_types = g_new (AtkStateType, Accessibility_STATE_LAST_DEFINED);
- g_return_val_if_fail (accessible_state_types, FALSE);
- g_return_val_if_fail (atk_state_types, FALSE);
-
- for (i = 0; i < Accessibility_STATE_LAST_DEFINED; i++)
- {
- atk_state_types[i] = ATK_STATE_INVALID;
- }
-
- for (i=0; i < ATK_STATE_LAST_DEFINED; i++)
- {
- accessible_state_types[i] = Accessibility_STATE_INVALID;
- }
-
- accessible_state_types[ATK_STATE_ACTIVE] = Accessibility_STATE_ACTIVE;
- atk_state_types[Accessibility_STATE_ACTIVE] = ATK_STATE_ACTIVE;
- accessible_state_types[ATK_STATE_ARMED] = Accessibility_STATE_ARMED;
- atk_state_types[Accessibility_STATE_ARMED] = ATK_STATE_ARMED;
- accessible_state_types[ATK_STATE_BUSY] = Accessibility_STATE_BUSY;
- atk_state_types[Accessibility_STATE_BUSY] = ATK_STATE_BUSY;
- accessible_state_types[ATK_STATE_CHECKED] = Accessibility_STATE_CHECKED;
- atk_state_types[Accessibility_STATE_CHECKED] = ATK_STATE_CHECKED;
- accessible_state_types[ATK_STATE_DEFUNCT] = Accessibility_STATE_DEFUNCT;
- atk_state_types[Accessibility_STATE_DEFUNCT] = ATK_STATE_DEFUNCT;
- accessible_state_types[ATK_STATE_EDITABLE] = Accessibility_STATE_EDITABLE;
- atk_state_types[Accessibility_STATE_EDITABLE] = ATK_STATE_EDITABLE;
- accessible_state_types[ATK_STATE_ENABLED] = Accessibility_STATE_ENABLED;
- atk_state_types[Accessibility_STATE_ENABLED] = ATK_STATE_ENABLED;
- accessible_state_types[ATK_STATE_EXPANDABLE] = Accessibility_STATE_EXPANDABLE;
- atk_state_types[Accessibility_STATE_EXPANDABLE] = ATK_STATE_EXPANDABLE;
- accessible_state_types[ATK_STATE_EXPANDED] = Accessibility_STATE_EXPANDED;
- atk_state_types[Accessibility_STATE_EXPANDED] = ATK_STATE_EXPANDED;
- accessible_state_types[ATK_STATE_FOCUSABLE] = Accessibility_STATE_FOCUSABLE;
- atk_state_types[Accessibility_STATE_FOCUSABLE] = ATK_STATE_FOCUSABLE;
- accessible_state_types[ATK_STATE_FOCUSED] = Accessibility_STATE_FOCUSED;
- atk_state_types[Accessibility_STATE_FOCUSED] = ATK_STATE_FOCUSED;
- accessible_state_types[ATK_STATE_HORIZONTAL] = Accessibility_STATE_HORIZONTAL;
- atk_state_types[Accessibility_STATE_HORIZONTAL] = ATK_STATE_HORIZONTAL;
- accessible_state_types[ATK_STATE_ICONIFIED] = Accessibility_STATE_ICONIFIED;
- atk_state_types[Accessibility_STATE_ICONIFIED] = ATK_STATE_ICONIFIED;
- accessible_state_types[ATK_STATE_MODAL] = Accessibility_STATE_MODAL;
- atk_state_types[Accessibility_STATE_MODAL] = ATK_STATE_MODAL;
- accessible_state_types[ATK_STATE_MULTI_LINE] = Accessibility_STATE_MULTI_LINE;
- atk_state_types[Accessibility_STATE_MULTI_LINE] = ATK_STATE_MULTI_LINE;
- accessible_state_types[ATK_STATE_MULTISELECTABLE] = Accessibility_STATE_MULTISELECTABLE;
- atk_state_types[Accessibility_STATE_MULTISELECTABLE] = ATK_STATE_MULTISELECTABLE;
- accessible_state_types[ATK_STATE_OPAQUE] = Accessibility_STATE_OPAQUE;
- atk_state_types[Accessibility_STATE_OPAQUE] = ATK_STATE_OPAQUE;
- accessible_state_types[ATK_STATE_PRESSED] = Accessibility_STATE_PRESSED;
- atk_state_types[Accessibility_STATE_PRESSED] = ATK_STATE_PRESSED;
- accessible_state_types[ATK_STATE_RESIZABLE] = Accessibility_STATE_RESIZABLE;
- atk_state_types[Accessibility_STATE_RESIZABLE] = ATK_STATE_RESIZABLE;
- accessible_state_types[ATK_STATE_SELECTABLE] = Accessibility_STATE_SELECTABLE;
- atk_state_types[Accessibility_STATE_SELECTABLE] = ATK_STATE_SELECTABLE;
- accessible_state_types[ATK_STATE_SELECTED] = Accessibility_STATE_SELECTED;
- atk_state_types[Accessibility_STATE_SELECTED] = ATK_STATE_SELECTED;
- accessible_state_types[ATK_STATE_SENSITIVE] = Accessibility_STATE_SENSITIVE;
- atk_state_types[Accessibility_STATE_SENSITIVE] = ATK_STATE_SENSITIVE;
- accessible_state_types[ATK_STATE_SHOWING] = Accessibility_STATE_SHOWING;
- atk_state_types[Accessibility_STATE_SHOWING] = ATK_STATE_SHOWING;
- accessible_state_types[ATK_STATE_SINGLE_LINE] = Accessibility_STATE_SINGLE_LINE;
- atk_state_types[Accessibility_STATE_SINGLE_LINE] = ATK_STATE_SINGLE_LINE;
- accessible_state_types[ATK_STATE_STALE] = Accessibility_STATE_STALE;
- atk_state_types[Accessibility_STATE_STALE] = ATK_STATE_STALE;
- accessible_state_types[ATK_STATE_TRANSIENT] = Accessibility_STATE_TRANSIENT;
- atk_state_types[Accessibility_STATE_TRANSIENT] = ATK_STATE_TRANSIENT;
- accessible_state_types[ATK_STATE_VERTICAL] = Accessibility_STATE_VERTICAL;
- atk_state_types[Accessibility_STATE_VERTICAL] = ATK_STATE_VERTICAL;
- accessible_state_types[ATK_STATE_VISIBLE] = Accessibility_STATE_VISIBLE;
- atk_state_types[Accessibility_STATE_VISIBLE] = ATK_STATE_VISIBLE;
- accessible_state_types[ATK_STATE_MANAGES_DESCENDANTS] = Accessibility_STATE_MANAGES_DESCENDANTS;
- atk_state_types[Accessibility_STATE_MANAGES_DESCENDANTS] = ATK_STATE_MANAGES_DESCENDANTS;
- accessible_state_types[ATK_STATE_INDETERMINATE] = Accessibility_STATE_INDETERMINATE;
- atk_state_types[Accessibility_STATE_INDETERMINATE] = ATK_STATE_INDETERMINATE;
- accessible_state_types[ATK_STATE_TRUNCATED] = Accessibility_STATE_TRUNCATED;
- atk_state_types[Accessibility_STATE_TRUNCATED] = ATK_STATE_TRUNCATED;
- accessible_state_types[ATK_STATE_REQUIRED] = Accessibility_STATE_REQUIRED;
- atk_state_types[Accessibility_STATE_REQUIRED] = ATK_STATE_REQUIRED;
- accessible_state_types[ATK_STATE_INVALID_ENTRY] = Accessibility_STATE_INVALID_ENTRY;
- atk_state_types[Accessibility_STATE_INVALID_ENTRY] = ATK_STATE_INVALID_ENTRY;
- accessible_state_types[ATK_STATE_SUPPORTS_AUTOCOMPLETION] = Accessibility_STATE_SUPPORTS_AUTOCOMPLETION;
- atk_state_types[Accessibility_STATE_SUPPORTS_AUTOCOMPLETION] = ATK_STATE_SUPPORTS_AUTOCOMPLETION;
- accessible_state_types[ATK_STATE_SELECTABLE_TEXT] = Accessibility_STATE_SELECTABLE_TEXT;
- atk_state_types[Accessibility_STATE_SELECTABLE_TEXT] = ATK_STATE_SELECTABLE_TEXT;
- accessible_state_types[ATK_STATE_DEFAULT] = Accessibility_STATE_IS_DEFAULT;
- atk_state_types[Accessibility_STATE_IS_DEFAULT] = ATK_STATE_DEFAULT;
- accessible_state_types[ATK_STATE_VISITED] = Accessibility_STATE_VISITED;
- atk_state_types[Accessibility_STATE_VISITED] = ATK_STATE_VISITED;
-
-
- return TRUE;
-}
-
-static inline AtkState
-state_spi_to_atk (Accessibility_StateType state)
-{
- guint idx = state;
- if (idx < Accessibility_STATE_LAST_DEFINED)
- return atk_state_types [idx];
- else
- return ATK_STATE_INVALID;
-}
-
-AtkState
-spi_atk_state_from_spi_state (Accessibility_StateType state)
-{
- spi_init_state_type_tables ();
- return state_spi_to_atk (state);
-}
-
-AtkStateSet *
-spi_state_set_cache_from_sequence (const GArray *seq)
-{
- int i;
- AtkStateSet *set;
- AtkStateType *states;
-
- spi_init_state_type_tables ();
-
- states = g_newa (AtkStateType, seq->len);
- for (i = 0; i < seq->len; i++)
- states [i] = state_spi_to_atk (g_array_index (seq, dbus_int32_t, i));
-
- set = atk_state_set_new ();
- atk_state_set_add_states (set, states, seq->len);
-
- g_array_free (seq, TRUE);
- return set;
-}
-
-void
-spi_atk_state_to_dbus_array (AtkObject * object, dbus_uint32_t * array)
-{
- AtkStateSet *set = atk_object_ref_state_set (object);
- int i;
-
- array[0] = 0;
- array[1] = 0;
- if (!set)
- return;
- spi_init_state_type_tables ();
-
- g_assert (ATK_STATE_LAST_DEFINED <= 64);
- for (i = 0; i < ATK_STATE_LAST_DEFINED; i++)
- {
- if (atk_state_set_contains_state (set, i))
- {
- int a = accessible_state_types[i];
- g_assert (a < 64);
- BITARRAY_SET (array, a);
- }
- }
- g_object_unref (set);
-}
diff --git a/spi-common/spi-stateset.h b/spi-common/spi-stateset.h
deleted file mode 100644
index 802e0a0b..00000000
--- a/spi-common/spi-stateset.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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 SPI_STATE_SET_H_
-#define SPI_STATE_SET_H_
-
-#include "spi-types.h"
-#include <atk/atkstateset.h>
-
-G_BEGIN_DECLS
-
-/* private - internal API to abstract away atk API */
-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);
-#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)
-#define spi_state_set_cache_contains(s,a) atk_state_set_contains_state (ATK_STATE_SET (s), \
- spi_atk_state_from_spi_state (a))
-#define spi_state_set_cache_add(s,a) atk_state_set_add_state (ATK_STATE_SET (s), \
- spi_atk_state_from_spi_state (a))
-#define spi_state_set_cache_remove(s,a) atk_state_set_remove_state (ATK_STATE_SET (s), \
- spi_atk_state_from_spi_state (a))
-#define spi_state_set_cache_xor(a,b) atk_state_set_xor_sets (ATK_STATE_SET (a), ATK_STATE_SET (b))
-#define spi_state_set_cache_is_empty(a) atk_state_set_is_empty (ATK_STATE_SET (a))
-
-G_END_DECLS
-
-#endif /* SPI_STATE_SET_H_ */