From 786fc5483a26f0025fc54ecc248be5c87553fd5e Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Wed, 23 Jan 2019 14:25:02 +0100 Subject: [PATCH] 2.30.0 Change-Id: I6adf02d243c5a2300d6a2b6315f6654b10a552fe --- .gitignore | 9 -- INSTALL | 31 ------ Makefile.am | 19 ---- NEWS | 8 ++ README | 50 +++++++-- atk-adaptor/Makefile.am | 54 --------- atk-adaptor/accessible-cache.c | 8 +- atk-adaptor/accessible-stateset.c | 6 +- atk-adaptor/adaptors/Makefile.am | 36 ------ atk-adaptor/adaptors/collection-adaptor.c | 6 +- atk-adaptor/adaptors/component-adaptor.c | 64 +++++++++++ atk-adaptor/adaptors/streamablecontent-adaptor.c | 7 +- atk-adaptor/adaptors/table-cell-adaptor.c | 7 +- atk-adaptor/adaptors/text-adaptor.c | 6 - atk-adaptor/event.c | 14 +-- atk-adaptor/gtk-2.0/Makefile.am | 5 - atk-adaptor/introspection.c | 10 ++ atk-adaptor/meson.build | 12 ++ atk-bridge-2.0.pc.in | 11 -- autogen.sh | 15 --- configure.ac | 135 ----------------------- droute/Makefile.am | 32 ------ droute/droute-test.c | 1 - droute/droute.c | 1 + meson.build | 29 ++--- tests/Makefile.am | 88 --------------- tests/data/Makefile.am | 13 --- tests/dummyatk/Makefile.am | 44 -------- tests/dummyatk/my-atk-action.c | 2 +- tests/dummyatk/my-atk-object.c | 4 +- tests/meson.build | 2 - 31 files changed, 173 insertions(+), 556 deletions(-) delete mode 100644 .gitignore delete mode 100644 INSTALL delete mode 100644 Makefile.am delete mode 100644 atk-adaptor/Makefile.am delete mode 100644 atk-adaptor/adaptors/Makefile.am delete mode 100644 atk-adaptor/gtk-2.0/Makefile.am delete mode 100644 atk-bridge-2.0.pc.in delete mode 100755 autogen.sh delete mode 100644 configure.ac delete mode 100644 droute/Makefile.am delete mode 100644 tests/Makefile.am delete mode 100644 tests/data/Makefile.am delete mode 100644 tests/dummyatk/Makefile.am diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5f797c5..0000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile.in -*Makefile -ChangeLog -*.pyc -aclocal.m4 -autom4te.cache -config.h.in~ -config -configure diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 5bf92ee..0000000 --- a/INSTALL +++ /dev/null @@ -1,31 +0,0 @@ -Install procedure ------------------ - - % gzip -cd at-spi-1.9.0.tar.gz | tar xvf - # unpack the sources - % cd at-spi-1.9.0 # change to the toplevel directory - % ./configure # run the `configure' script - % make # build at-spi - - [ Become root if necessary ] - % make install # install at-spi - -Requirements ------------- - - GNU make - GNU autotools - - pkg-config - - python - - glib - gtk+ - gail - - dbus - dbus-glib - dbus-python - - X - XEVIE (Reccomended) diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 8a72722..0000000 --- a/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -SUBDIRS=droute atk-adaptor - -if ATSPI_TESTS - -SUBDIRS += tests - -endif - -gtk_modulesdir = $(libdir)/gnome-settings-daemon-3.0/gtk-modules/ -gtk_modules_DATA = at-spi2-atk.desktop - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = atk-bridge-2.0.pc - -EXTRA_DIST = $(gtk_modules_DATA) atk-bridge-2.0.pc.in \ - meson.build \ - meson_options.txt - -DISTCHECK_CONFIGURE_FLAGS = --with-tests=yes diff --git a/NEWS b/NEWS index 5142c58..7dde170 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +What's new in at-spi2-atk 2.29.1: + +* Fix a case where we could return without unlocking a mutex (bgo#793625). + +* Add ScrollTo and ScrollToPoint interfaces. + +* Fix various compiler warnings and build issues. + What's new in at-spi2-atk 2.26.1: * meson: Ensure paths written to .pc file are absolute. diff --git a/README b/README index 7a3449c..0bef802 100644 --- a/README +++ b/README @@ -22,12 +22,12 @@ bugs specific to this module. A git repository with the latest development code is available at: - git://git.gnome.org/at-spi2-atk + https://git.gnome.org/browse/at-spi2-atk Code in this repository depends on at-spi2-core resources. The at-spi2-core repository can be found at: - git://git.gnome.org/at-spi2-core + https://git.gnome.org/browse/at-spi2-core More information ---------------- @@ -37,15 +37,14 @@ the results of which are available on the GNOME wiki. Keep in mind that the D-Bus AT-SPI design documents on this page have not been kept up to date. - http://live.gnome.org/GAP/AtSpiDbusInvestigation/ + https://wiki.gnome.org/Accessibility/Documentation/GNOME2/ATSPI2-Investigation Other sources of relevant information about AT-SPI and Accessibility include: - http://live.gnome.org/Accessibility - http://www.sun.com/software/star/gnome/accessibility/architecture.xml - http://accessibility.kde.org/developer/atk.php - http://www.gnome.org/~billh/at-spi-idl/html/ + https://wiki.gnome.org/Accessibility + https://accessibility.kde.org/developer/atk.php + https://people.gnome.org/~billh/at-spi-idl/html/ @@ -60,12 +59,43 @@ as a module. These libraries depend on the at-spi2-core code that contains the daemon for registering applications, D-Bus helper libraries and the AT-SPI D-Bus specifications. +Building this package +--------------------- + +In order to build at-spi2-atk you will need: + + - Python 3.5 + - Meson + - Ninja + +Additionally, you will need the development files for: + + - libdbus + - GLib + - GTK+ 3.x + - ATK + - AT-SPI + +To build and install this package, you will typically need to run `meson` to +configure the build process, and Ninja to run the compilation and installation +instructions: + + # Configure the build and initialize the build directory + meson _build . + + # Enter the build directory + cd _build + + # Build the project + ninja + + # Install the project + sudo ninja install + Tests ----- -To run tests execute autogen.sh with '--with-tests=yes' parameter then -after 'make', type 'make check'. -Test result is available in tests/atk-test.log +To run the test suite, use `meson test` from the build directory. Directory structure ------------------- diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am deleted file mode 100644 index 2e6b935..0000000 --- a/atk-adaptor/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -SUBDIRS= adaptors . gtk-2.0 - -lib_LTLIBRARIES = libatk-bridge-2.0.la - -libatk_bridge_2_0_la_CFLAGS = \ - $(DBUS_CFLAGS) \ - $(ATK_CFLAGS) \ - $(ATSPI_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/atk-adaptor/adaptors \ - $(P2P_CFLAGS) - -atkbridgeincludedir = $(pkgincludedir)/2.0/ -atkbridgeinclude_HEADERS = atk-bridge.h - -libatk_bridge_2_0_la_SOURCES = \ - accessible-leasing.c \ - accessible-leasing.h \ - accessible-cache.c \ - accessible-cache.h \ - accessible-register.c \ - accessible-register.h \ - accessible-stateset.c \ - accessible-stateset.h \ - bitarray.h \ - introspection.c \ - introspection.h \ - bridge.c \ - bridge.h \ - object.c \ - object.h \ - event.c \ - event.h \ - spi-dbus.c \ - spi-dbus.h \ - atk-bridge.h - -libatk_bridge_2_0_la_LIBADD = \ - $(DBUS_LIBS) \ - $(GMODULE_LIBS) \ - $(ATK_LIBS) \ - $(ATSPI_LIBS) \ - $(top_builddir)/droute/libdroute.la \ - $(top_builddir)/atk-adaptor/adaptors/libatk-bridge-adaptors.la - -libatk_bridge_2_0_la_LDFLAGS = \ - $(LT_VERSION_INFO) \ - -export-symbols $(srcdir)/atkbridge.symbols \ - -no-undefined \ - $(AM_LDFLAGS) - -EXTRA_DIST = Makefile.include \ - atkbridge.symbols \ - meson.build diff --git a/atk-adaptor/accessible-cache.c b/atk-adaptor/accessible-cache.c index 5065a00..a52a8e5 100644 --- a/atk-adaptor/accessible-cache.c +++ b/atk-adaptor/accessible-cache.c @@ -324,8 +324,6 @@ child_added_listener (GSignalInvocationHint * signal_hint, const gchar *detail = NULL; - g_rec_mutex_lock (&cache_mutex); - /* * Ensure that only accessibles already in the cache * have their signals processed. @@ -333,6 +331,8 @@ child_added_listener (GSignalInvocationHint * signal_hint, accessible = ATK_OBJECT (g_value_get_object (¶m_values[0])); g_return_val_if_fail (ATK_IS_OBJECT (accessible), TRUE); + g_rec_mutex_lock (&cache_mutex); + if (spi_cache_in (cache, G_OBJECT(accessible))) { #ifdef SPI_ATK_DEBUG @@ -378,10 +378,10 @@ toplevel_added_listener (AtkObject * accessible, { SpiCache *cache = spi_global_cache; - g_rec_mutex_lock (&cache_mutex); - g_return_if_fail (ATK_IS_OBJECT (accessible)); + g_rec_mutex_lock (&cache_mutex); + if (spi_cache_in (cache, G_OBJECT(accessible))) { #ifdef SPI_ATK_DEBUG diff --git a/atk-adaptor/accessible-stateset.c b/atk-adaptor/accessible-stateset.c index 82820de..dc3d6ad 100644 --- a/atk-adaptor/accessible-stateset.c +++ b/atk-adaptor/accessible-stateset.c @@ -23,11 +23,13 @@ /* stateset.c : implements the StateSet interface */ -#include -#include +#include "config.h" + #include "accessible-stateset.h" #include "bitarray.h" +#include + static AtspiStateType *accessible_state_types = NULL; static AtkStateType *atk_state_types = NULL; diff --git a/atk-adaptor/adaptors/Makefile.am b/atk-adaptor/adaptors/Makefile.am deleted file mode 100644 index 4fe8924..0000000 --- a/atk-adaptor/adaptors/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -noinst_LTLIBRARIES = libatk-bridge-adaptors.la - -libatk_bridge_adaptors_la_CFLAGS =\ - $(DBUS_CFLAGS) \ - $(ATK_CFLAGS) \ - $(ATSPI_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_srcdir)/atk-adaptor \ - $(P2P_CFLAGS) - -libatk_bridge_adaptors_la_LIBADD =\ - $(DBUS_LIBS) \ - $(ATK_LIBS) \ - $(ATSPI_LIBS) - -libatk_bridge_adaptors_la_SOURCES =\ - accessible-adaptor.c \ - action-adaptor.c \ - adaptors.h \ - application-adaptor.c \ - cache-adaptor.c \ - collection-adaptor.c \ - component-adaptor.c \ - document-adaptor.c \ - editabletext-adaptor.c \ - hyperlink-adaptor.c \ - hypertext-adaptor.c \ - image-adaptor.c \ - selection-adaptor.c \ - socket-adaptor.c \ - table-adaptor.c \ - table-cell-adaptor.c \ - text-adaptor.c \ - value-adaptor.c - -EXTRA_DIST = meson.build diff --git a/atk-adaptor/adaptors/collection-adaptor.c b/atk-adaptor/adaptors/collection-adaptor.c index b57c5f6..3c9ae66 100644 --- a/atk-adaptor/adaptors/collection-adaptor.c +++ b/atk-adaptor/adaptors/collection-adaptor.c @@ -1163,6 +1163,7 @@ append_accessible_properties (DBusMessageIter *iter, AtkObject *obj, } } +#if 0 static void skip (const char **p) { @@ -1251,6 +1252,7 @@ walkm (DBusMessage *message) dbus_message_iter_init (message, &iter); walk (&iter, sig, FALSE); } +#endif static DBusMessage * impl_GetTree (DBusConnection * bus, @@ -1293,7 +1295,9 @@ impl_GetTree (DBusConnection * bus, append_accessible_properties (&iter_array, object, properties); dbus_message_iter_close_container (&iter, &iter_array); } -//walkm (reply); +#if 0 + walkm (reply); +#endif return reply; } diff --git a/atk-adaptor/adaptors/component-adaptor.c b/atk-adaptor/adaptors/component-adaptor.c index 192a589..974da39 100644 --- a/atk-adaptor/adaptors/component-adaptor.c +++ b/atk-adaptor/adaptors/component-adaptor.c @@ -418,6 +418,68 @@ impl_SetSize (DBusConnection * bus, DBusMessage * message, void *user_data) return reply; } +static DBusMessage * +impl_ScrollTo (DBusConnection * bus, + DBusMessage * message, void *user_data) +{ + AtkComponent *component = (AtkComponent *) user_data; + dbus_uint32_t type; + dbus_bool_t ret; + DBusMessage *reply = NULL; + + g_return_val_if_fail (ATK_IS_COMPONENT (user_data), + droute_not_yet_handled_error (message)); + + if (!dbus_message_get_args + (message, NULL, DBUS_TYPE_UINT32, &type, DBUS_TYPE_INVALID)) + { + return droute_invalid_arguments_error (message); + } + + ret = atk_component_scroll_to (component, type); + + reply = dbus_message_new_method_return (message); + if (reply) + { + dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &ret, + DBUS_TYPE_INVALID); + } + return reply; +} + +static DBusMessage * +impl_ScrollToPoint (DBusConnection * bus, + DBusMessage * message, void *user_data) +{ + AtkComponent *component = (AtkComponent *) user_data; + dbus_uint32_t type; + dbus_int32_t x, y; + dbus_bool_t ret; + DBusMessage *reply = NULL; + + g_return_val_if_fail (ATK_IS_COMPONENT (user_data), + droute_not_yet_handled_error (message)); + + if (!dbus_message_get_args + (message, NULL, DBUS_TYPE_UINT32, &type, + DBUS_TYPE_INT32, &x, + DBUS_TYPE_INT32, &y, + DBUS_TYPE_INVALID)) + { + return droute_invalid_arguments_error (message); + } + + ret = atk_component_scroll_to_point (component, type, x, y); + + reply = dbus_message_new_method_return (message); + if (reply) + { + dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &ret, + DBUS_TYPE_INVALID); + } + return reply; +} + static DRouteMethod methods[] = { {impl_Contains, "Contains"}, {impl_GetAccessibleAtPoint, "GetAccessibleAtPoint"}, @@ -433,6 +495,8 @@ static DRouteMethod methods[] = { {impl_SetExtents, "SetExtents"}, {impl_SetPosition, "SetPosition"}, {impl_SetSize, "SetSize"}, + {impl_ScrollTo, "ScrollTo"}, + {impl_ScrollToPoint, "ScrollToPoint"}, {NULL, NULL} }; diff --git a/atk-adaptor/adaptors/streamablecontent-adaptor.c b/atk-adaptor/adaptors/streamablecontent-adaptor.c index 8192e1a..bcb17df 100644 --- a/atk-adaptor/adaptors/streamablecontent-adaptor.c +++ b/atk-adaptor/adaptors/streamablecontent-adaptor.c @@ -22,13 +22,14 @@ /* streamablecontent.c : implements the StreamableContent interface */ -#include -#include -#include +#include "config.h" #include #include +#include +#include + /* Our parent Gtk object type */ #define PARENT_TYPE SPI_TYPE_BASE diff --git a/atk-adaptor/adaptors/table-cell-adaptor.c b/atk-adaptor/adaptors/table-cell-adaptor.c index 330c633..ca01fd9 100644 --- a/atk-adaptor/adaptors/table-cell-adaptor.c +++ b/atk-adaptor/adaptors/table-cell-adaptor.c @@ -105,19 +105,16 @@ impl_get_Position (DBusMessageIter * iter, void *user_data) { AtkTableCell *cell = (AtkTableCell *) user_data; gint row = -1, column = -1; - dbus_int32_t d_row, d_column; DBusMessageIter iter_struct, iter_variant; g_return_val_if_fail (ATK_IS_TABLE_CELL (user_data), FALSE); if (!atk_table_cell_get_position (cell, &row, &column)) return FALSE; - d_row = row; - d_column = column; dbus_message_iter_open_container (iter, DBUS_TYPE_VARIANT, "(ii)", &iter_variant); dbus_message_iter_open_container (&iter_variant, DBUS_TYPE_STRUCT, NULL, &iter_struct); - dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_INT32, &row); - dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_INT32, &column); + dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_INT32, (dbus_int32_t *) &row); + dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_INT32, (dbus_int32_t *) &column); dbus_message_iter_close_container (&iter_variant, &iter_struct); dbus_message_iter_close_container (iter, &iter_variant); return TRUE; diff --git a/atk-adaptor/adaptors/text-adaptor.c b/atk-adaptor/adaptors/text-adaptor.c index 326e61a..69dbdfa 100644 --- a/atk-adaptor/adaptors/text-adaptor.c +++ b/atk-adaptor/adaptors/text-adaptor.c @@ -356,8 +356,6 @@ impl_GetAttributeValue (DBusConnection * bus, DBusMessage * message, AtkText *text = (AtkText *) user_data; dbus_int32_t offset; char *attributeName; - dbus_int32_t startOffset, endOffset; - dbus_bool_t defined; gint intstart_offset = 0, intend_offset = 0; char *rv = NULL; DBusMessage *reply; @@ -376,9 +374,6 @@ impl_GetAttributeValue (DBusConnection * bus, DBusMessage * message, set = atk_text_get_run_attributes (text, offset, &intstart_offset, &intend_offset); - startOffset = intstart_offset; - endOffset = intend_offset; - defined = FALSE; cur_attr = (GSList *) set; while (cur_attr) { @@ -386,7 +381,6 @@ impl_GetAttributeValue (DBusConnection * bus, DBusMessage * message, if (!strcmp (at->name, attributeName)) { rv = at->value; - defined = TRUE; break; } cur_attr = cur_attr->next; diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c index b539646..739dc2c 100644 --- a/atk-adaptor/event.c +++ b/atk-adaptor/event.c @@ -451,14 +451,6 @@ adapt_minor_for_dbus (const char *source) return ret; } -static void -open_variant (DBusMessageIter *iter, const char *name, const char *type, - DBusMessageIter *out) -{ - dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &name); - dbus_message_iter_open_container (iter, DBUS_TYPE_VARIANT, type, out); -} - /* * Emits an AT-SPI event. * AT-SPI events names are split into three parts: @@ -486,7 +478,7 @@ emit_event (AtkObject *obj, gchar *cname; DBusMessage *sig; - DBusMessageIter iter, iter_dict, iter_dict_entry, iter_variant, iter_array; + DBusMessageIter iter, iter_dict, iter_dict_entry; GArray *properties = NULL; if (!klass) klass = ""; @@ -952,6 +944,8 @@ text_insert_event_listener (GSignalInvocationHint * signal_hint, if (G_VALUE_TYPE (¶m_values[3]) == G_TYPE_STRING) text = g_value_get_string (¶m_values[3]); + else + text = ""; emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2, DBUS_TYPE_STRING_AS_STRING, text, append_basic); @@ -1001,6 +995,8 @@ text_remove_event_listener (GSignalInvocationHint * signal_hint, if (G_VALUE_TYPE (¶m_values[3]) == G_TYPE_STRING) text = g_value_get_string (¶m_values[3]); + else + text = ""; emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2, DBUS_TYPE_STRING_AS_STRING, text, append_basic); diff --git a/atk-adaptor/gtk-2.0/Makefile.am b/atk-adaptor/gtk-2.0/Makefile.am deleted file mode 100644 index 4aac9c3..0000000 --- a/atk-adaptor/gtk-2.0/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ - gtkmoduledir = $(libdir)/gtk-2.0/modules - -include $(top_srcdir)/atk-adaptor/Makefile.include - -libatk_bridge_la_SOURCES = module.c diff --git a/atk-adaptor/introspection.c b/atk-adaptor/introspection.c index 84fec4c..20911a8 100644 --- a/atk-adaptor/introspection.c +++ b/atk-adaptor/introspection.c @@ -260,6 +260,16 @@ const char *spi_org_a11y_atspi_Component = " " " " "" +" " +" " +" " +"" +" " +" " +" " +" " +" " +"" "" ""; diff --git a/atk-adaptor/meson.build b/atk-adaptor/meson.build index 16ca9c7..b5f6fc5 100644 --- a/atk-adaptor/meson.build +++ b/atk-adaptor/meson.build @@ -47,3 +47,15 @@ atk_bridge_module = shared_module('atk-bridge', 'gtk-2.0/module.c', c_args: p2p_cflags, install: true, install_dir: join_paths(get_option('libdir'), 'gtk-2.0', 'modules')) + +pkgconfig = import('pkgconfig') +pkgconfig.generate( + name: 'atk-bridge-2.0', + description: 'ATK/D-Bus Bridge', + version: meson.project_version(), + libraries: libatk_bridge, + requires_private: ['gobject-2.0', 'atspi-2'], + filebase: 'atk-bridge-2.0', + subdirs: 'at-spi2-atk/2.0', + install_dir: join_paths(get_option('libdir'), 'pkgconfig'), +) diff --git a/atk-bridge-2.0.pc.in b/atk-bridge-2.0.pc.in deleted file mode 100644 index 449582f..0000000 --- a/atk-bridge-2.0.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: atk-bridge-2.0 -Description: ATK/D-Bus Bridge -Version: @VERSION@ -Requires.private: gobject-2.0 atspi-2 -Libs: -L${libdir} -latk-bridge-2.0 -Cflags: -I${includedir}/at-spi2-atk/2.0 diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 78dabeb..0000000 --- a/autogen.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. - -olddir=`pwd` -cd "$srcdir" - -# gnome-autogen.sh runs configure, so do likewise. -autoreconf -vif - -cd "$olddir" - -test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 2e30e87..0000000 --- a/configure.ac +++ /dev/null @@ -1,135 +0,0 @@ -AC_INIT([at-spi2-atk], [2.26.1], [accessibility-atspi@lists.linux-foundation.org]) -AC_CONFIG_AUX_DIR(config) - -AT_SPI_ATK_MAJOR_VERSION=0 -AT_SPI_ATK_MINOR_VERSION=3 -AT_SPI_ATK_INTERFACE_AGE=0 -AT_SPI_ATK_BINARY_AGE=0 -AT_SPI_ATK_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION" -AC_SUBST(AT_SPI_ATK_VERSION) - -# libtool versioning -LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION -LT_CURRENT=0 -LT_REVISION=0 -LT_AGE=0 -LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}' -AC_SUBST(LT_VERSION_INFO) -AC_SUBST(LT_RELEASE) -AC_SUBST(LT_CURRENT) -AC_SUBST(LT_REVISION) -AC_SUBST(LT_AGE) - -AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz]) - -# Enable silent build when available (Automake 1.11) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -AC_PROG_CC -AM_DISABLE_STATIC -AM_PROG_LIBTOOL -PKG_PROG_PKG_CONFIG - -GETTEXT_PACKAGE="${PACKAGE}" -AC_SUBST(GETTEXT_PACKAGE) - -AC_CONFIG_HEADERS([config.h]) - -PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.5]) -AC_SUBST(DBUS_LIBS) -AC_SUBST(DBUS_CFLAGS) - -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.32.0]) -AC_SUBST(GLIB_LIBS) -AC_SUBST(GLIB_CFLAGS) - -PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0]) -AC_SUBST(GOBJ_LIBS) -AC_SUBST(GOBJ_CFLAGS) - -PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.0.0]) -AC_SUBST(GMODULE_LIBS) -AC_SUBST(GMODULE_CFLAGS) - -PKG_CHECK_MODULES(ATK, [atk >= 2.25.2]) -AC_SUBST(ATK_LIBS) -AC_SUBST(ATK_CFLAGS) - -PKG_CHECK_MODULES(ATSPI, [atspi-2 >= 2.25.3]) -AC_SUBST(ATSPI_LIBS) -AC_SUBST(ATSPI_CFLAGS) - -AC_ARG_WITH([tests], - [AC_HELP_STRING([--with-tests=yes|no], - [choose if test should be enabled. - @<:@default=no@:>@])], - [build_tests=${withval}], - [build_tests=no]) - -want_tests="no" - -case "${build_tests}" in - yes) - want_tests="yes" - ;; - no*) - ;; - *) - AC_MSG_ERROR([Unknown build tests option: --with-tests=${build_tests}]) - ;; -esac - - -if test "${want_tests}" = "yes"; then - PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.9.1]) - AC_SUBST(XML_LIBS) - AC_SUBST(XML_CFLAGS) -fi -AM_CONDITIONAL([ATSPI_TESTS], [test "${want_tests}" = "yes"]) - -GLIB_GSETTINGS - -AC_ARG_ENABLE(p2p, [ --enable-p2p Allow peer-to-peer DBus connections [default=yes]], enable_p2p="$enableval", enable_p2p=yes) - -#libtool option to strip symbols starting with cspi -LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^cspi]].*"' -AC_SUBST(LIBTOOL_EXPORT_OPTIONS) - -# Extra libraries for sockets added by Willie Walker -# based upon how SunStudio libraries work. -# -if test "$GCC" = yes; then - EXTRA_SOCKET_LIBS="" -else - EXTRA_SOCKET_LIBS="-lsocket -lnsl" -fi -AC_SUBST(EXTRA_SOCKET_LIBS) - -dnl find sizes & alignments -orig_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" -CPPFLAGS=$orig_CPPFLAGS - -if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Werror-implicit-function-declaration" -fi - -if test "x$enable_p2p" = "xno"; then - P2P_CFLAGS=-DDISABLE_P2P -fi - -AC_SUBST(P2P_CFLAGS) - -AC_CONFIG_FILES([Makefile - atk-bridge-2.0.pc - droute/Makefile - atk-adaptor/Makefile - atk-adaptor/adaptors/Makefile - atk-adaptor/gtk-2.0/Makefile - tests/Makefile - tests/data/Makefile - tests/dummyatk/Makefile - ]) - - -AC_OUTPUT diff --git a/droute/Makefile.am b/droute/Makefile.am deleted file mode 100644 index bbee7c5..0000000 --- a/droute/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -noinst_LTLIBRARIES = libdroute.la - -libdroute_la_CFLAGS = $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I$(top_builddir)\ - -I$(top_srcdir) - -libdroute_la_SOURCES =\ - droute.c\ - droute.h\ - droute-variant.c\ - droute-variant.h\ - droute-pairhash.c\ - droute-pairhash.h -libdroute_la_LIBADD = $(DBUS_LIBS) - -TESTS = droute-test - -check_PROGRAMS = droute-test -droute_test_SOURCES = droute-test.c -droute_test_CFLAGS = $(DBUS_CFLAGS) \ - -I$(top_builddir)\ - $(GLIB_CFLAGS) \ - $(ATSPI_CFLAGS) \ - -I$(top_srcdir) - -droute_test_LDFLAGS = libdroute.la\ - $(DBUS_LIBS) \ - $(GLIB_LIBS) \ - $(ATSPI_LIBS) - -EXTRA_DIST = meson.build diff --git a/droute/droute-test.c b/droute/droute-test.c index 1865622..2482550 100644 --- a/droute/droute-test.c +++ b/droute/droute-test.c @@ -258,7 +258,6 @@ do_tests_func (gpointer data) /* --------------------------------------------------------*/ -out: g_main_loop_quit (main_loop); return FALSE; } diff --git a/droute/droute.c b/droute/droute.c index 838aacd..f38a5d8 100644 --- a/droute/droute.c +++ b/droute/droute.c @@ -330,6 +330,7 @@ impl_prop_GetSet (DBusMessage *message, DBusMessage *ret; ret = dbus_message_new_error (message, DBUS_ERROR_FAILED, error.message); dbus_error_free (&error); + return ret; } _DROUTE_DEBUG ("DRoute (handle prop): %s|%s on %s\n", pair.one, pair.two, pathstr); diff --git a/meson.build b/meson.build index 5aae0b4..dbe6f8f 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('at-spi2-atk', 'c', - version: '2.26.1', + version: '2.30.0', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', @@ -17,6 +17,14 @@ host_system = host_machine.system() # XXX: for strcasecmp(); should use g_ascii_strcasecmp() add_project_arguments([ '-D_DEFAULT_SOURCE', ], language: 'c') +# We are using deprecated API; don't warn if we're building stable +# releases, to avoid making the build logs less readable. We keep +# the warnings during development cycles, to remind us we should +# port away from deprecated API +if meson.project_version().split('.').get(1).to_int().is_even() + add_project_arguments([ '-DATK_DISABLE_DEPRECATION_WARNINGS' ], language: 'c') +endif + # XXX: Unused at_spi_conf = configuration_data() at_spi_conf.set('GETTEXT_PACKAGE', meson.project_name()) @@ -30,8 +38,8 @@ libdbus_req_version = '>= 1.5' glib_req_version = '>= 2.32.0' gobject_req_version = '>= 2.0.0' gmodule_req_version = '>= 2.0.0' -atk_req_version = '>= 2.15.4' -atspi_req_version = '>= 2.17.90' +atk_req_version = '>= 2.29.2' +atspi_req_version = '>= 2.29.1' libxml_req_version = '>= 2.9.1' libdbus_dep = dependency('dbus-1', version: libdbus_req_version) @@ -48,21 +56,6 @@ else p2p_cflags = [] endif -import('gnome') - -pkg_conf = configuration_data() -pkg_conf.set('prefix', get_option('prefix')) -pkg_conf.set('exec_prefix', get_option('prefix')) -pkg_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir'))) -pkg_conf.set('includedir', join_paths(get_option('prefix'), get_option('includedir'))) -pkg_conf.set('VERSION', meson.project_version()) - -configure_file(input: 'atk-bridge-2.0.pc.in', - output: 'atk-bridge-2.0.pc', - configuration: pkg_conf, - install: true, - install_dir: join_paths(get_option('libdir'), 'pkgconfig')) - install_data('at-spi2-atk.desktop', install_dir: join_paths(get_option('libdir'), 'gnome-settings-daemon-3.0', 'gtk-modules')) diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 034d8e8..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,88 +0,0 @@ -SUBDIRS = data dummyatk - -noinst_PROGRAMS = atk-test app-test -TESTS = atk-test -lib_LTLIBRARIES =libxmlloader.la libtestutils.la - -atk_test_CFLAGS = $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(ATSPI_CFLAGS) \ - -I$(top_builddir)\ - -I$(top_srcdir)/tests/dummyatk/ \ - -I$(top_builddir)/tests/dummyatk/.libs \ - -I$(top_builddir)/tests/dummyatk/.deps \ - -I$(top_srcdir) \ - -Wall - -atk_test_LDADD = libxmlloader.la \ - libtestutils.la \ - $(GLIB_LIBS) \ - $(ATSPI_LIBS) \ - $(top_builddir)/tests/dummyatk/libdummyatk.la - -atk_test_CPPFLAGS = -DTESTS_BUILD_DIR=\"$(top_builddir)/tests\" \ - -DTESTS_SRC_DIR=\"$(top_srcdir)/tests\" \ - -DTESTS_DATA_DIR=\"$(top_srcdir)/tests/data\" - -atk_test_SOURCES = atk_suite.c \ - atk_suite.h \ - atk_test_accessible.c \ - atk_test_action.c \ - atk_test_component.c \ - atk_test_collection.c \ - atk_test_editable_text.c \ - atk_test_document.c \ - atk_test_hyperlink.c \ - atk_test_hypertext.c \ - atk_test_image.c \ - atk_test_selection.c \ - atk_test_state_set.c \ - atk_test_table.c \ - atk_test_table_cell.c \ - atk_test_text.c \ - atk_test_value.c - -app_test_CFLAGS = -I$(top_builddir) \ - $(GLIB_CFLAGS) \ - $(ATK_CFLAGS) \ - -I$(top_srcdir)/tests/dummyatk \ - -I$(top_srcdir)/atk-adaptor \ - -Wall - -app_test_LDADD = libxmlloader.la \ - libtestutils.la \ - $(GLIB_LIBS) \ - $(ATK_LIBS) \ - $(top_builddir)/tests/dummyatk/libdummyatk.la \ - $(top_builddir)/atk-adaptor/libatk-bridge-2.0.la - -app_test_SOURCES = test-application.c - -libxmlloader_la_CFLAGS = $(GLIB_CFLAGS) \ - $(GOBJ_CFLAGS) \ - $(XML_CFLAGS) \ - $(ATK_CFLAGS) \ - -I$(top_srcdir)/tests/dummyatk/ \ - -Wall - -libxmlloader_la_LIBADD = $(GLIB_LIBS) \ - $(XML_LIBS) \ - $(GOBJ_LIBS) \ - $(top_builddir)/tests/dummyatk/libdummyatk.la \ - $(ATK_LIBS) - -libxmlloader_la_SOURCES = atk-object-xml-loader.c\ - atk-object-xml-loader.h - -libtestutils_la_CFLAGS = -I$(top_builddir) \ - $(GLIB_CFLAGS) \ - $(ATSPI_CFLAGS) \ - -Wall - -libtestutils_la_LIBADD = $(GLIB_LIBS) \ - $(ATSPI_LIBS) - -libtestutils_la_SOURCES = atk_test_util.c \ - atk_test_util.h - -EXTRA_DIST = meson.build diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am deleted file mode 100644 index 7291fd2..0000000 --- a/tests/data/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -EXTRA_DIST = test-accessible.xml \ - test-action.xml \ - test-collection.xml\ - test-component.xml \ - test-document.xml \ - test-editable-text.xml \ - test-hypertext.xml \ - test-image.xml \ - test-selection.xml \ - test-table.xml \ - test-text.xml \ - test-value.xml \ - test.xml diff --git a/tests/dummyatk/Makefile.am b/tests/dummyatk/Makefile.am deleted file mode 100644 index 966e483..0000000 --- a/tests/dummyatk/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -lib_LTLIBRARIES = libdummyatk.la - -libdummyatk_la_CFLAGS = $(ATK_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GOBJ_CFLAGS) \ - -I$(top_srcdir) \ - -Wall - -libdummyatk_la_LDFLAGS = -no-undefined - -libdummyatk_la_LIBADD = $(ATK_LIBS) \ - $(GLIB_LIBS) \ - $(GOBJ_LIBS) - -libdummyatk_la_SOURCES = \ - my-atk-action.c \ - my-atk-action.h \ - my-atk-component.c \ - my-atk-component.h \ - my-atk-document.c \ - my-atk-document.h \ - my-atk-editable-text.c \ - my-atk-editable-text.h \ - my-atk-hyperlink.c \ - my-atk-hyperlink.h \ - my-atk-hypertext.c \ - my-atk-hypertext.h \ - my-atk-image.c \ - my-atk-image.h \ - my-atk-text.c \ - my-atk-text.h \ - my-atk-object.c \ - my-atk-object.h \ - my-atk-table.c \ - my-atk-table.h \ - my-atk-table-cell.c \ - my-atk-table-cell.h \ - my-atk-selection.c \ - my-atk-selection.h \ - my-atk-value.c \ - my-atk-value.h \ - my-atk.h - -EXTRA_DIST = meson.build diff --git a/tests/dummyatk/my-atk-action.c b/tests/dummyatk/my-atk-action.c index 8d688cb..cb272cb 100644 --- a/tests/dummyatk/my-atk-action.c +++ b/tests/dummyatk/my-atk-action.c @@ -218,7 +218,7 @@ void perform_action (AtkObject *obj) static gboolean my_atk_action_do_action (AtkAction *action, gint i) { - g_return_val_if_fail (MY_IS_ATK_ACTION (action), NULL); + g_return_val_if_fail (MY_IS_ATK_ACTION (action), FALSE); perform_action (ATK_OBJECT (action)); diff --git a/tests/dummyatk/my-atk-object.c b/tests/dummyatk/my-atk-object.c index c0b3014..98525b1 100644 --- a/tests/dummyatk/my-atk-object.c +++ b/tests/dummyatk/my-atk-object.c @@ -112,7 +112,7 @@ static AtkRelationSet *my_atk_object_ref_relation_set (AtkObject* accessible) MyAtkObject *obj = MY_ATK_OBJECT (accessible); if (obj->relation_set == NULL) obj->relation_set = atk_relation_set_new (); - return g_object_ref (G_OBJECT (obj->relation_set)); + return g_object_ref (ATK_RELATION_SET (obj->relation_set)); } static AtkStateSet *my_atk_object_ref_state_set (AtkObject *accessible) @@ -120,7 +120,7 @@ static AtkStateSet *my_atk_object_ref_state_set (AtkObject *accessible) MyAtkObject *obj = MY_ATK_OBJECT (accessible); if (obj->state_set == NULL) obj->state_set = atk_state_set_new (); - return g_object_ref (G_OBJECT (obj->state_set)); + return g_object_ref (ATK_STATE_SET (obj->state_set)); } static AtkAttributeSet *my_atk_object_get_attributes (AtkObject *accessible) diff --git a/tests/meson.build b/tests/meson.build index ce6d444..8bb9b8a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -72,6 +72,4 @@ foreach t: tests '-DTESTS_SRC_DIR="@0@"'.format(meson.current_source_dir()), '-DTESTS_DATA_DIR="@0@"'.format(join_paths(meson.current_source_dir(), 'data')), ]) - - test(test_name, test_bin) endforeach -- 2.7.4