From 989826b4b2a97edadaf738d87074473b62b0299c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Fri, 7 Feb 2020 07:38:29 +0100 Subject: [PATCH] 2.34.1 Change-Id: I86b2bb750bd271d3d985ba5b37c590d31849bbf8 --- .gitignore | 7 - COPYING | 224 ++++++++++++----------- INSTALL | 31 ---- MAINTAINERS | 3 +- Makefile.am | 16 -- NEWS | 99 +++++++++- README | 50 ++++- at-spi2-atk.doap | 10 +- atk-adaptor/Makefile.am | 53 ------ atk-adaptor/accessible-cache.c | 25 +-- atk-adaptor/accessible-cache.h | 12 +- atk-adaptor/accessible-leasing.c | 17 +- atk-adaptor/accessible-leasing.h | 12 +- atk-adaptor/accessible-register.c | 12 +- atk-adaptor/accessible-register.h | 12 +- atk-adaptor/accessible-stateset.c | 18 +- atk-adaptor/accessible-stateset.h | 14 +- atk-adaptor/adaptors/Makefile.am | 34 ---- atk-adaptor/adaptors/accessible-adaptor.c | 30 ++- atk-adaptor/adaptors/action-adaptor.c | 12 +- atk-adaptor/adaptors/adaptors.h | 12 +- atk-adaptor/adaptors/application-adaptor.c | 12 +- atk-adaptor/adaptors/cache-adaptor.c | 15 +- atk-adaptor/adaptors/collection-adaptor.c | 34 ++-- atk-adaptor/adaptors/component-adaptor.c | 76 +++++++- atk-adaptor/adaptors/document-adaptor.c | 12 +- atk-adaptor/adaptors/editabletext-adaptor.c | 12 +- atk-adaptor/adaptors/hyperlink-adaptor.c | 12 +- atk-adaptor/adaptors/hypertext-adaptor.c | 12 +- atk-adaptor/adaptors/image-adaptor.c | 12 +- atk-adaptor/adaptors/meson.build | 31 ++++ atk-adaptor/adaptors/selection-adaptor.c | 12 +- atk-adaptor/adaptors/socket-adaptor.c | 50 +++-- atk-adaptor/adaptors/streamablecontent-adaptor.c | 19 +- atk-adaptor/adaptors/table-adaptor.c | 12 +- atk-adaptor/adaptors/table-cell-adaptor.c | 25 ++- atk-adaptor/adaptors/text-adaptor.c | 89 +++++++-- atk-adaptor/adaptors/value-adaptor.c | 12 +- atk-adaptor/atk-bridge.h | 13 +- atk-adaptor/atkbridge.symbols | 1 + atk-adaptor/bitarray.h | 12 +- atk-adaptor/bridge.c | 76 ++++---- atk-adaptor/bridge.h | 15 +- atk-adaptor/event.c | 102 ++++++----- atk-adaptor/event.h | 16 +- atk-adaptor/gtk-2.0/Makefile.am | 5 - atk-adaptor/gtk-2.0/module.c | 12 +- atk-adaptor/introspection.c | 24 +++ atk-adaptor/meson.build | 62 +++++++ atk-adaptor/object.c | 18 +- atk-adaptor/object.h | 12 +- atk-adaptor/spi-dbus.c | 12 +- atk-adaptor/spi-dbus.h | 12 +- atk-bridge-2.0.pc.in | 11 -- autogen.sh | 15 -- configure.ac | 135 -------------- droute/Makefile.am | 30 --- droute/droute-pairhash.c | 12 +- droute/droute-pairhash.h | 12 +- droute/droute-test.c | 1 - droute/droute-variant.c | 12 +- droute/droute-variant.h | 12 +- droute/droute.c | 13 +- droute/droute.h | 12 +- droute/meson.build | 18 ++ meson.build | 64 +++++++ meson_options.txt | 4 + tests/Makefile.am | 86 --------- tests/atk-object-xml-loader.c | 12 +- tests/atk-object-xml-loader.h | 12 +- tests/atk_suite.c | 12 +- tests/atk_suite.h | 12 +- tests/atk_test_accessible.c | 16 +- tests/atk_test_action.c | 14 +- tests/atk_test_collection.c | 14 +- tests/atk_test_component.c | 14 +- tests/atk_test_document.c | 14 +- tests/atk_test_editable_text.c | 14 +- tests/atk_test_hyperlink.c | 14 +- tests/atk_test_hypertext.c | 14 +- tests/atk_test_image.c | 14 +- tests/atk_test_selection.c | 14 +- tests/atk_test_state_set.c | 14 +- tests/atk_test_table.c | 14 +- tests/atk_test_table_cell.c | 56 +++--- tests/atk_test_text.c | 14 +- tests/atk_test_util.c | 92 +++++++--- tests/atk_test_util.h | 15 +- tests/atk_test_value.c | 22 +-- tests/data/Makefile.am | 4 - tests/data/test-value.xml | 2 +- tests/dummyatk/Makefile.am | 42 ----- tests/dummyatk/meson.build | 23 +++ tests/dummyatk/my-atk-action.c | 14 +- tests/dummyatk/my-atk-action.h | 12 +- tests/dummyatk/my-atk-component.c | 12 +- tests/dummyatk/my-atk-component.h | 12 +- tests/dummyatk/my-atk-document.c | 12 +- tests/dummyatk/my-atk-document.h | 12 +- tests/dummyatk/my-atk-editable-text.c | 12 +- tests/dummyatk/my-atk-editable-text.h | 12 +- tests/dummyatk/my-atk-hyperlink.c | 12 +- tests/dummyatk/my-atk-hyperlink.h | 12 +- tests/dummyatk/my-atk-hypertext.c | 12 +- tests/dummyatk/my-atk-hypertext.h | 12 +- tests/dummyatk/my-atk-image.c | 12 +- tests/dummyatk/my-atk-image.h | 12 +- tests/dummyatk/my-atk-object.c | 16 +- tests/dummyatk/my-atk-object.h | 12 +- tests/dummyatk/my-atk-selection.c | 12 +- tests/dummyatk/my-atk-selection.h | 12 +- tests/dummyatk/my-atk-table-cell.c | 14 +- tests/dummyatk/my-atk-table-cell.h | 12 +- tests/dummyatk/my-atk-table.c | 12 +- tests/dummyatk/my-atk-table.h | 12 +- tests/dummyatk/my-atk-text.c | 12 +- tests/dummyatk/my-atk-text.h | 12 +- tests/dummyatk/my-atk-value.c | 12 +- tests/dummyatk/my-atk-value.h | 12 +- tests/dummyatk/my-atk.h | 12 +- tests/meson.build | 82 +++++++++ tests/test-application.c | 12 +- 122 files changed, 1574 insertions(+), 1319 deletions(-) delete mode 100644 INSTALL delete mode 100644 Makefile.am delete mode 100644 atk-adaptor/Makefile.am delete mode 100644 atk-adaptor/adaptors/Makefile.am create mode 100644 atk-adaptor/adaptors/meson.build delete mode 100644 atk-adaptor/gtk-2.0/Makefile.am create mode 100644 atk-adaptor/meson.build 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 create mode 100644 droute/meson.build create mode 100644 meson.build create mode 100644 meson_options.txt delete mode 100644 tests/Makefile.am delete mode 100644 tests/data/Makefile.am delete mode 100644 tests/dummyatk/Makefile.am create mode 100644 tests/dummyatk/meson.build create mode 100644 tests/meson.build diff --git a/.gitignore b/.gitignore index 5f797c5..aef62f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,2 @@ -Makefile.in -*Makefile ChangeLog *.pyc -aclocal.m4 -autom4te.cache -config.h.in~ -config -configure diff --git a/COPYING b/COPYING index b8f9ad6..4362b49 100644 --- a/COPYING +++ b/COPYING @@ -1,13 +1,14 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] Preamble @@ -16,97 +17,109 @@ freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs @@ -145,7 +158,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -254,8 +267,8 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or + + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit @@ -282,23 +295,31 @@ of these things: Library will not necessarily be able to recompile the application to use the modified definitions.) - b) Accompany the work with a written offer, valid for at + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. - c) If distribution of the work is made by offering access to copy + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. - d) Verify that the user has already received a copy of these + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. @@ -308,7 +329,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -347,9 +368,9 @@ Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to +You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -390,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. +versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. @@ -401,7 +422,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -435,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest @@ -453,19 +474,18 @@ convey the exclusion of warranty; and each file should have at least the Copyright (C) This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 2.1 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. + Lesser 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. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. 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/MAINTAINERS b/MAINTAINERS index e776ae0..34024c3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1,2 +1 @@ - -Mike Gorse +Mike Gorse diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 889e76c..0000000 --- a/Makefile.am +++ /dev/null @@ -1,16 +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 - diff --git a/NEWS b/NEWS index b6ad565..874dd6d 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,101 @@ -What's new in at-spi2-atk 2.20.1: +What's new in at-spi2-atk 2.34.1: -* emit_event: Fix out-of-bounds memory access if class is NULL (bgo#758935). +* socket_embed_hook: Make plug_id parameter const. -* Remove a debug print. +What's new in at-spi2-atk 2.34.0: + +* Updated doap. + +What's new in at-spi2-atk 2.33.92: + +* License is now lGPL-2.1+. +* Several test fixes (thanks to Samuel THibault). +* Initialize desktop name/path early; needed since we now defer + registration. + +What's new in at-spi2-atk 2.33.91: + +* Defer registration until the main loop is entered. This fixes an issue + where a Python application could import gtk but not enter the main loop, + resulting in the application registering with AT-SPI but not responding + to queries. + +* Make sure return values are initialized for some functions. + +What's new in at-spi2-atk 2.33.2: + +* Add support for ROLE_CONTENT_DELETION and ROLE_CONTENT_INSERTION + +* Fix a build issue where libgobject might not have been linked, resulting in + undefined symbols. + +What's new in at-spi2-atk 2.33.1: + +* Document atk_bridge_adaptor_init error messages. + +* Add atk_bridge_set_event_context. + +* Add AccessibleId property. + +What's new in at-spi2-atk 2.31.92: + +* Fix a crash when retrieveing headers from table cells. + +What's new in at-spi2-atk 2.31.2: + +* Add ScrollSubstringTo and ScrollSubstringToPoint interfaces. + +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. + +* Package a couple of missing meson.build files. + +What's new in at-spi2-atk 2.25.3: + +* Add error-message, error-for, details, and details-for relation types + +* Add Meson build system (thanks to Emmanuele Bassi). + +What's new in at-spi2-atk 2.25.2: + +* Fix use after free when returned objects hold only one ref (bgo#781716). + +* Add some missing roles to correspond with atk (description list, + description term, description value, and footnote). + +What's new in at-spi2-atk 2.25.1: + +* Fix position getter for table cells. + +* Fix memory corruption when deleting an event from the list of events + for which there are registered listeners (bgo#781658). + +What's new in at-spi2-atk 2.24.0: + +* test: remove atk_table_cell_get_column_index test, as the + at-spi2-core function no longer exists (and never worked anyhow). + +What's new in at-spi2-atk 2.22.0: + +* Remove some inadverrtently-committed debugging code. + +What's new in at-spi2-atk 2.21.91: +What's new in at-spi2-atk 2.21.91: + +* atk_bridge_adaptor_init: return -1 if NO_AT_BRIDGE is set (bgo#770574). + +What's new in at-spi2-atk 2.21.4: + +* emit_event: Fix out-of-bounds memory access if class is NULL. * Collection: fix missing return value (bgo#758934). 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/at-spi2-atk.doap b/at-spi2-atk.doap index 435b9cc..7a51b8a 100644 --- a/at-spi2-atk.doap +++ b/at-spi2-atk.doap @@ -8,19 +8,15 @@ GTK+ module for bridging AT-SPI to ATK at-spi2-atk is the library used to bridge ATK to AT-SPI, allowing applications exposing information via ATK to interface with clients that use AT-SPI. This module provides the necessary inter-process communication to allow accessibility-oriented software to operate. + + + C - Mark Doffman - - markdoffman - - - - Mike Gorse mgorse diff --git a/atk-adaptor/Makefile.am b/atk-adaptor/Makefile.am deleted file mode 100644 index 2bb3c6b..0000000 --- a/atk-adaptor/Makefile.am +++ /dev/null @@ -1,53 +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 diff --git a/atk-adaptor/accessible-cache.c b/atk-adaptor/accessible-cache.c index 5065a00..a28a7a5 100644 --- a/atk-adaptor/accessible-cache.c +++ b/atk-adaptor/accessible-cache.c @@ -5,19 +5,19 @@ * Copyright 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -26,6 +26,7 @@ #include "accessible-cache.h" #include "accessible-register.h" #include "bridge.h" +#include "event.h" SpiCache *spi_global_cache = NULL; @@ -324,8 +325,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 +332,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 @@ -358,7 +359,7 @@ child_added_listener (GSignalInvocationHint * signal_hint, g_queue_push_tail (cache->add_traversal, child); if (cache->add_pending_idle == 0) - cache->add_pending_idle = g_idle_add (add_pending_items, cache); + cache->add_pending_idle = spi_idle_add (add_pending_items, cache); } #ifdef SPI_ATK_DEBUG recursion_check_unset (); @@ -378,10 +379,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 @@ -400,7 +401,7 @@ toplevel_added_listener (AtkObject * accessible, g_queue_push_tail (cache->add_traversal, child); if (cache->add_pending_idle == 0) - cache->add_pending_idle = g_idle_add (add_pending_items, cache); + cache->add_pending_idle = spi_idle_add (add_pending_items, cache); #ifdef SPI_ATK_DEBUG recursion_check_unset (); #endif diff --git a/atk-adaptor/accessible-cache.h b/atk-adaptor/accessible-cache.h index 2f5be06..dfd9d68 100644 --- a/atk-adaptor/accessible-cache.h +++ b/atk-adaptor/accessible-cache.h @@ -5,19 +5,19 @@ * Copyright 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ACCESSIBLE_CACHE_H diff --git a/atk-adaptor/accessible-leasing.c b/atk-adaptor/accessible-leasing.c index dcddb0b..65b8bfc 100644 --- a/atk-adaptor/accessible-leasing.c +++ b/atk-adaptor/accessible-leasing.c @@ -5,19 +5,19 @@ * Copyright 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -25,6 +25,7 @@ #include #include "accessible-leasing.h" +#include "event.h" #ifdef SPI_ATK_DEBUG #include "accessible-cache.h" @@ -161,8 +162,8 @@ add_expiry_timeout (SpiLeasing * leasing) /* The current time is implicitly rounded down here by ignoring the us */ g_get_current_time (&t); next_expiry = elem->expiry_s - t.tv_sec; - leasing->expiry_func_id = g_timeout_add_seconds (next_expiry, - expiry_func, leasing); + leasing->expiry_func_id = spi_timeout_add_seconds (next_expiry, + expiry_func, leasing); } /*---------------------------------------------------------------------------*/ diff --git a/atk-adaptor/accessible-leasing.h b/atk-adaptor/accessible-leasing.h index af01a78..7e982a7 100644 --- a/atk-adaptor/accessible-leasing.h +++ b/atk-adaptor/accessible-leasing.h @@ -6,19 +6,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ACCESSIBLE_LEASING_H diff --git a/atk-adaptor/accessible-register.c b/atk-adaptor/accessible-register.c index 7ca416f..49603f5 100644 --- a/atk-adaptor/accessible-register.c +++ b/atk-adaptor/accessible-register.c @@ -6,19 +6,19 @@ * Copyright 2008, 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/accessible-register.h b/atk-adaptor/accessible-register.h index 5a62ebb..e250065 100644 --- a/atk-adaptor/accessible-register.h +++ b/atk-adaptor/accessible-register.h @@ -6,19 +6,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ACCESSIBLE_REGISTER_H diff --git a/atk-adaptor/accessible-stateset.c b/atk-adaptor/accessible-stateset.c index 82820de..b7888e3 100644 --- a/atk-adaptor/accessible-stateset.c +++ b/atk-adaptor/accessible-stateset.c @@ -6,28 +6,30 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* 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/accessible-stateset.h b/atk-adaptor/accessible-stateset.h index e27e3c5..c856c06 100644 --- a/atk-adaptor/accessible-stateset.h +++ b/atk-adaptor/accessible-stateset.h @@ -6,22 +6,22 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ -#ifndef ACCESSSIBLE_STATE_SET_H_ +#ifndef ACCESSIBLE_STATE_SET_H_ #define ACCESSIBLE_STATE_SET_H_ #include diff --git a/atk-adaptor/adaptors/Makefile.am b/atk-adaptor/adaptors/Makefile.am deleted file mode 100644 index 7624b57..0000000 --- a/atk-adaptor/adaptors/Makefile.am +++ /dev/null @@ -1,34 +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 diff --git a/atk-adaptor/adaptors/accessible-adaptor.c b/atk-adaptor/adaptors/accessible-adaptor.c index 058b116..baafda5 100644 --- a/atk-adaptor/adaptors/accessible-adaptor.c +++ b/atk-adaptor/adaptors/accessible-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -182,7 +182,8 @@ impl_GetChildAtIndex (DBusConnection * bus, } child = atk_object_ref_accessible_child (object, i); reply = spi_object_return_reference (message, child); - g_object_unref (child); + if (child) + g_object_unref (child); return reply; } @@ -264,6 +265,10 @@ spi_init_relation_type_table (AtspiRelationType * types) types[ATK_RELATION_DESCRIPTION_FOR] = ATSPI_RELATION_DESCRIPTION_FOR; types[ATK_RELATION_DESCRIBED_BY] = ATSPI_RELATION_DESCRIBED_BY; + types[ATK_RELATION_DETAILS] = ATSPI_RELATION_DETAILS; + types[ATK_RELATION_DETAILS_FOR] = ATSPI_RELATION_DETAILS_FOR; + types[ATK_RELATION_ERROR_MESSAGE] = ATSPI_RELATION_ERROR_MESSAGE; + types[ATK_RELATION_ERROR_FOR] = ATSPI_RELATION_ERROR_FOR; types[ATK_RELATION_NODE_PARENT_OF] = ATSPI_RELATION_NODE_PARENT_OF; return TRUE; @@ -523,6 +528,16 @@ impl_GetInterfaces (DBusConnection * bus, return reply; } +static dbus_bool_t +impl_get_AccessibleId (DBusMessageIter * iter, void *user_data) +{ + AtkObject *object = (AtkObject *) user_data; + + g_return_val_if_fail (ATK_IS_OBJECT (user_data), FALSE); + + return droute_return_v_string (iter, atk_object_get_accessible_id (object)); +} + static DRouteMethod methods[] = { {impl_GetChildAtIndex, "GetChildAtIndex"}, {impl_GetChildren, "GetChildren"}, @@ -545,6 +560,7 @@ static DRouteProperty properties[] = { {impl_get_Parent, NULL, "Parent"}, {impl_get_ChildCount, NULL, "ChildCount"}, {impl_get_Attributes, NULL, "Attributes"}, + {impl_get_AccessibleId, NULL, "AccessibleId"}, {NULL, NULL, NULL} }; diff --git a/atk-adaptor/adaptors/action-adaptor.c b/atk-adaptor/adaptors/action-adaptor.c index a6c409d..784d136 100644 --- a/atk-adaptor/adaptors/action-adaptor.c +++ b/atk-adaptor/adaptors/action-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/adaptors.h b/atk-adaptor/adaptors/adaptors.h index 395114b..711658c 100644 --- a/atk-adaptor/adaptors/adaptors.h +++ b/atk-adaptor/adaptors/adaptors.h @@ -6,19 +6,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ADAPTORS_H diff --git a/atk-adaptor/adaptors/application-adaptor.c b/atk-adaptor/adaptors/application-adaptor.c index ae4c260..3b68729 100644 --- a/atk-adaptor/adaptors/application-adaptor.c +++ b/atk-adaptor/adaptors/application-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/cache-adaptor.c b/atk-adaptor/adaptors/cache-adaptor.c index cd93609..2f86d09 100644 --- a/atk-adaptor/adaptors/cache-adaptor.c +++ b/atk-adaptor/adaptors/cache-adaptor.c @@ -8,19 +8,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -70,6 +70,9 @@ get_toolkit_name (AtkObject *obj) if (!toolkit_name) toolkit_name = atk_get_toolkit_name (); + if (!toolkit_name) + return "no toolkit name set yet"; + /* TODO: query object attributes */ return toolkit_name; } diff --git a/atk-adaptor/adaptors/collection-adaptor.c b/atk-adaptor/adaptors/collection-adaptor.c index 42ea073..a6ec282 100644 --- a/atk-adaptor/adaptors/collection-adaptor.c +++ b/atk-adaptor/adaptors/collection-adaptor.c @@ -5,19 +5,19 @@ * Copyright 2007 IBM Corp. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* collection.c: implements the Collection interface */ @@ -494,9 +494,12 @@ sort_order_canonical (MatchRulePrivate * mrp, GList * ls, { AtkObject *child = atk_object_ref_accessible_child (obj, i); - g_object_unref (child); + if (!child) + continue; + if (prev && child == pobj) { + g_object_unref (child); return kount; } @@ -517,6 +520,7 @@ sort_order_canonical (MatchRulePrivate * mrp, GList * ls, kount = sort_order_canonical (mrp, ls, kount, max, child, 0, TRUE, pobj, recurse, traverse); + g_object_unref (child); } return kount; } @@ -559,19 +563,23 @@ sort_order_rev_canonical (MatchRulePrivate * mrp, GList * ls, and get it's last descendant. First, get the previous sibling */ nextobj = atk_object_ref_accessible_child (parent, indexinparent - 1); - g_object_unref (nextobj); /* Now, drill down the right side to the last descendant */ - while (atk_object_get_n_accessible_children (nextobj) > 0) + while (nextobj && atk_object_get_n_accessible_children (nextobj) > 0) { - nextobj = atk_object_ref_accessible_child (nextobj, + AtkObject *follow; + + follow = atk_object_ref_accessible_child (nextobj, atk_object_get_n_accessible_children (nextobj) - 1); g_object_unref (nextobj); + nextobj = follow; } /* recurse with the last descendant */ kount = sort_order_rev_canonical (mrp, ls, kount, max, nextobj, TRUE, pobj); + if (nextobj) + g_object_unref (nextobj); } else if (max == 0 || kount < max) { @@ -1155,6 +1163,7 @@ append_accessible_properties (DBusMessageIter *iter, AtkObject *obj, } } +#if 0 static void skip (const char **p) { @@ -1243,6 +1252,7 @@ walkm (DBusMessage *message) dbus_message_iter_init (message, &iter); walk (&iter, sig, FALSE); } +#endif static DBusMessage * impl_GetTree (DBusConnection * bus, @@ -1285,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..11bded0 100644 --- a/atk-adaptor/adaptors/component-adaptor.c +++ b/atk-adaptor/adaptors/component-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -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/document-adaptor.c b/atk-adaptor/adaptors/document-adaptor.c index 020512b..cf2783d 100644 --- a/atk-adaptor/adaptors/document-adaptor.c +++ b/atk-adaptor/adaptors/document-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/editabletext-adaptor.c b/atk-adaptor/adaptors/editabletext-adaptor.c index 2e264fc..b82fdec 100644 --- a/atk-adaptor/adaptors/editabletext-adaptor.c +++ b/atk-adaptor/adaptors/editabletext-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/hyperlink-adaptor.c b/atk-adaptor/adaptors/hyperlink-adaptor.c index 0d0dc37..4cd6ebf 100644 --- a/atk-adaptor/adaptors/hyperlink-adaptor.c +++ b/atk-adaptor/adaptors/hyperlink-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/hypertext-adaptor.c b/atk-adaptor/adaptors/hypertext-adaptor.c index e31266f..c15b0d2 100644 --- a/atk-adaptor/adaptors/hypertext-adaptor.c +++ b/atk-adaptor/adaptors/hypertext-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/image-adaptor.c b/atk-adaptor/adaptors/image-adaptor.c index 89ac20f..e47f4cf 100644 --- a/atk-adaptor/adaptors/image-adaptor.c +++ b/atk-adaptor/adaptors/image-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/meson.build b/atk-adaptor/adaptors/meson.build new file mode 100644 index 0000000..11022d6 --- /dev/null +++ b/atk-adaptor/adaptors/meson.build @@ -0,0 +1,31 @@ +source = [ + 'accessible-adaptor.c', + 'action-adaptor.c', + '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', +] + +libatk_bridge_adaptors = static_library('atk-bridge-adaptors', source, + include_directories: [ + root_inc, + include_directories('..'), + ], + dependencies: [ libdbus_dep, atspi_dep, atk_dep ], + c_args: p2p_cflags) + +libatk_bridge_adaptors_dep = declare_dependency(link_with: libatk_bridge_adaptors, + dependencies: [ libdbus_dep, atspi_dep, atk_dep ], + include_directories: include_directories('.')) diff --git a/atk-adaptor/adaptors/selection-adaptor.c b/atk-adaptor/adaptors/selection-adaptor.c index 4776ebc..5dbb445 100644 --- a/atk-adaptor/adaptors/selection-adaptor.c +++ b/atk-adaptor/adaptors/selection-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/socket-adaptor.c b/atk-adaptor/adaptors/socket-adaptor.c index ed6faa3..0f7c1b3 100644 --- a/atk-adaptor/adaptors/socket-adaptor.c +++ b/atk-adaptor/adaptors/socket-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -76,14 +76,24 @@ atspi_plug_component_get_extents (AtkComponent *component, gint *x, gint *y, message, -1, &error); dbus_message_unref (message); if (!reply) - return; + { + *x = -1; + *y = -1; + *width = -1; + *height = -1; + return; + } signature = dbus_message_get_signature (reply); if (g_strcmp0 (signature, "(iiii)") != 0) - { - g_warning ("Got unexpected signature %s from GetExtents\n", signature); - dbus_message_unref (reply); - return; - } + { + g_warning ("Got unexpected signature %s from GetExtents\n", signature); + dbus_message_unref (reply); + *x = -1; + *y = -1; + *width = -1; + *height = -1; + return; + } dbus_message_iter_init (reply, &iter); dbus_message_iter_recurse (&iter, &iter_struct); dbus_message_iter_get_basic (&iter_struct, &tmp); @@ -116,12 +126,18 @@ atspi_plug_component_get_position (AtkComponent *component, gint *x, gint *y, message, -1, &error); dbus_message_unref (message); if (!reply) - return; + { + *x = -1; + *y = -1; + return; + } if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_INT32, &x_dbus, DBUS_TYPE_INT32, &y_dbus, DBUS_TYPE_INVALID)) { g_warning ("GetPosition failed: %s", error.message); dbus_error_free (&error); + *x = -1; + *y = -1; } else { @@ -145,12 +161,18 @@ atspi_plug_component_get_size (AtkComponent *component, message, -1, &error); dbus_message_unref (message); if (!reply) - return; + { + *width = -1; + *height = -1; + return; + } if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_INT32, &width_dbus, DBUS_TYPE_INT32, &height_dbus, DBUS_TYPE_INVALID)) { g_warning ("GetSize failed: %s", error.message); dbus_error_free (&error); + *width = -1; + *height = -1; } else { diff --git a/atk-adaptor/adaptors/streamablecontent-adaptor.c b/atk-adaptor/adaptors/streamablecontent-adaptor.c index 8192e1a..29dc3e4 100644 --- a/atk-adaptor/adaptors/streamablecontent-adaptor.c +++ b/atk-adaptor/adaptors/streamablecontent-adaptor.c @@ -5,30 +5,31 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* 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-adaptor.c b/atk-adaptor/adaptors/table-adaptor.c index d3bbba5..4344ab2 100644 --- a/atk-adaptor/adaptors/table-adaptor.c +++ b/atk-adaptor/adaptors/table-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/adaptors/table-cell-adaptor.c b/atk-adaptor/adaptors/table-cell-adaptor.c index 3418f4c..6f2cbf5 100644 --- a/atk-adaptor/adaptors/table-cell-adaptor.c +++ b/atk-adaptor/adaptors/table-cell-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -61,7 +61,7 @@ message_from_object_array (DBusMessage *message, GPtrArray *array) } dbus_message_iter_close_container (&iter, &iter_array); g_ptr_array_unref (array); - return message; + return reply; } static DBusMessage * @@ -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_STRUCT, "(ii)", &iter_variant); - dbus_message_iter_open_container (&iter_struct, 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_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, (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..c9f9fc9 100644 --- a/atk-adaptor/adaptors/text-adaptor.c +++ b/atk-adaptor/adaptors/text-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -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; @@ -851,6 +845,75 @@ impl_GetDefaultAttributeSet (DBusConnection * bus, DBusMessage * message, return reply; } +static DBusMessage * +impl_ScrollSubstringTo (DBusConnection * bus, + DBusMessage * message, void *user_data) +{ + AtkText *text = (AtkText *) user_data; + dbus_int32_t startOffset, endOffset; + dbus_uint32_t type; + dbus_bool_t ret; + DBusMessage *reply = NULL; + + g_return_val_if_fail (ATK_IS_TEXT (user_data), + droute_not_yet_handled_error (message)); + + if (!dbus_message_get_args + (message, NULL, DBUS_TYPE_INT32, &startOffset, + DBUS_TYPE_INT32, &endOffset, + DBUS_TYPE_UINT32, &type, + DBUS_TYPE_INVALID)) + { + return droute_invalid_arguments_error (message); + } + + ret = atk_text_scroll_substring_to (text, startOffset, endOffset, 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_ScrollSubstringToPoint (DBusConnection * bus, + DBusMessage * message, void *user_data) +{ + AtkText *text = (AtkText *) user_data; + dbus_int32_t startOffset, endOffset; + dbus_uint32_t type; + dbus_int32_t x, y; + dbus_bool_t ret; + DBusMessage *reply = NULL; + + g_return_val_if_fail (ATK_IS_TEXT (user_data), + droute_not_yet_handled_error (message)); + + if (!dbus_message_get_args + (message, NULL, DBUS_TYPE_INT32, &startOffset, + DBUS_TYPE_INT32, &endOffset, + DBUS_TYPE_UINT32, &type, + DBUS_TYPE_INT32, &x, + DBUS_TYPE_INT32, &y, + DBUS_TYPE_INVALID)) + { + return droute_invalid_arguments_error (message); + } + + ret = atk_text_scroll_substring_to_point (text, startOffset, endOffset, 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_GetText, "GetText"}, {impl_SetCaretOffset, "SetCaretOffset"}, @@ -873,6 +936,8 @@ static DRouteMethod methods[] = { {impl_GetBoundedRanges, "GetBoundedRanges"}, {impl_GetAttributeRun, "GetAttributeRun"}, {impl_GetDefaultAttributeSet, "GetDefaultAttributeSet"}, + {impl_ScrollSubstringTo, "ScrollSubstringTo"}, + {impl_ScrollSubstringToPoint, "ScrollSubstringToPoint"}, {NULL, NULL} }; diff --git a/atk-adaptor/adaptors/value-adaptor.c b/atk-adaptor/adaptors/value-adaptor.c index 05d7303..7166d3b 100644 --- a/atk-adaptor/adaptors/value-adaptor.c +++ b/atk-adaptor/adaptors/value-adaptor.c @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/atk-bridge.h b/atk-adaptor/atk-bridge.h index 9c0dd0d..90d7330 100644 --- a/atk-adaptor/atk-bridge.h +++ b/atk-adaptor/atk-bridge.h @@ -7,19 +7,19 @@ * Copyright 2008, 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ATK_BRIDGE_H @@ -31,6 +31,7 @@ G_BEGIN_DECLS int atk_bridge_adaptor_init (int * argc, char ** argv[]); void atk_bridge_adaptor_cleanup (void); +void atk_bridge_set_event_context(GMainContext *cnx); G_END_DECLS diff --git a/atk-adaptor/atkbridge.symbols b/atk-adaptor/atkbridge.symbols index d90cf94..cfaa509 100644 --- a/atk-adaptor/atkbridge.symbols +++ b/atk-adaptor/atkbridge.symbols @@ -1,2 +1,3 @@ atk_bridge_adaptor_init atk_bridge_adaptor_cleanup +atk_bridge_set_event_context diff --git a/atk-adaptor/bitarray.h b/atk-adaptor/bitarray.h index 61ed673..6f66cc8 100644 --- a/atk-adaptor/bitarray.h +++ b/atk-adaptor/bitarray.h @@ -5,19 +5,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _BITARRAY_H diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c index e76e833..06407f4 100644 --- a/atk-adaptor/bridge.c +++ b/atk-adaptor/bridge.c @@ -7,19 +7,19 @@ * Copyright 2001, 2002, 2003 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #define _GNU_SOURCE @@ -403,20 +403,15 @@ register_reply (DBusPendingCall *pending, void *user_data) get_registered_event_listeners (spi_global_app_data); } -static gboolean -register_application (SpiBridge * app) +gboolean +_atk_bridge_register_application (gpointer data) { + SpiBridge * app = data; DBusMessage *message; DBusMessageIter iter; DBusPendingCall *pending; - g_free (app->desktop_name); - g_free (app->desktop_path); - - /* These will be overridden when we get a reply, but in practice these - defaults should always be correct */ - app->desktop_name = g_strdup (ATSPI_DBUS_NAME_REGISTRY); - app->desktop_path = g_strdup (ATSPI_DBUS_PATH_ROOT); + spi_global_app_data->registration_pending = 0; message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY, ATSPI_DBUS_PATH_ROOT, @@ -441,7 +436,7 @@ register_application (SpiBridge * app) if (message) dbus_message_unref (message); - return TRUE; + return FALSE; } /*---------------------------------------------------------------------------*/ @@ -475,6 +470,13 @@ deregister_application (SpiBridge * app) DBusMessageIter iter; const char *uname; + if (spi_global_app_data->registration_pending) + { + g_source_remove (spi_global_app_data->registration_pending); + spi_global_app_data->registration_pending = 0; + return; + } + message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY, ATSPI_DBUS_PATH_REGISTRY, ATSPI_DBUS_INTERFACE_REGISTRY, @@ -577,7 +579,7 @@ socket_ref_state_set (AtkObject *accessible) } static void -socket_embed_hook (AtkSocket * socket, gchar * plug_id) +socket_embed_hook (AtkSocket * socket, const gchar * plug_id) { g_return_if_fail (spi_global_register != NULL); @@ -673,7 +675,7 @@ new_connection_cb (DBusServer *server, DBusConnection *con, void *data) { dbus_connection_set_unix_user_function (con, user_check, NULL, NULL); dbus_connection_ref(con); - atspi_dbus_connection_setup_with_g_main(con, NULL); + atspi_dbus_connection_setup_with_g_main(con, spi_context); droute_intercept_dbus (con); droute_context_register (spi_global_app_data->droute, con); @@ -748,22 +750,17 @@ remove_events (const char *bus_name, const char *event) if (!g_strcmp0 (evdata->bus_name, bus_name) && spi_event_is_subtype (evdata->data, remove_data)) { + GList *next; GList *events = spi_global_app_data->events; + g_strfreev (evdata->data); g_free (evdata->bus_name); g_slist_free_full (evdata->properties, free_property_definition); g_free (evdata); - if (list->prev) - { - GList *next = list->next; - list->prev = g_list_remove (list->prev, evdata); - list = next; - } - else - { - spi_global_app_data->events = g_list_remove (events, evdata); - list = spi_global_app_data->events; - } + + next = list->next; + spi_global_app_data->events = g_list_delete_link (events, list); + list = next; } else { @@ -853,7 +850,7 @@ signal_filter (DBusConnection *bus, DBusMessage *message, void *user_data) { if (registry_lost && !old[0]) { - register_application (spi_global_app_data); + _atk_bridge_register_application (spi_global_app_data); registry_lost = FALSE; } else if (!new[0]) @@ -909,7 +906,7 @@ spi_atk_create_socket (SpiBridge *app) return -1; } - atspi_dbus_server_setup_with_g_main(server, NULL); + atspi_dbus_server_setup_with_g_main(server, spi_context); dbus_server_set_new_connection_function(server, new_connection_cb, NULL, NULL); spi_global_app_data->server = server; @@ -962,8 +959,8 @@ spi_atk_activate () } } -/* - * spi_app_init +/** + * atk_bridge_adaptor_init: initializes the atk bridge adaptor * * The following needs to be initialized. * @@ -972,6 +969,8 @@ spi_atk_activate () * - setup the bus for p2p communication * - Application registration with the AT-SPI registry. * + * Returns: 0 if the bridge gets or was already initialized + * succesfully, -1 otherwise */ int atk_bridge_adaptor_init (gint * argc, gchar ** argv[]) @@ -987,8 +986,10 @@ atk_bridge_adaptor_init (gint * argc, gchar ** argv[]) if (inited && !load_bridge) g_warning ("ATK Bridge is disabled but a11y has already been enabled."); - if (inited || !load_bridge) + if (inited) return 0; + if (!load_bridge) + return -1; inited = TRUE; @@ -1014,6 +1015,8 @@ atk_bridge_adaptor_init (gint * argc, gchar ** argv[]) /* Allocate global data and do ATK initializations */ spi_global_app_data = g_new0 (SpiBridge, 1); spi_global_app_data->root = g_object_ref (root); + spi_global_app_data->desktop_name = g_strdup (ATSPI_DBUS_NAME_REGISTRY); + spi_global_app_data->desktop_path = g_strdup (ATSPI_DBUS_PATH_ROOT); /* Set up D-Bus connection and register bus name */ dbus_error_init (&error); @@ -1102,8 +1105,9 @@ atk_bridge_adaptor_init (gint * argc, gchar ** argv[]) NULL); /* Register this app by sending a signal out to AT-SPI registry daemon */ - if (!atspi_no_register && (!root || !ATK_IS_PLUG (root))) - register_application (spi_global_app_data); + if (!atspi_no_register && (!root || !ATK_IS_PLUG (root)) && + !spi_global_app_data->registration_pending) + spi_global_app_data->registration_pending = spi_idle_add (_atk_bridge_register_application, spi_global_app_data); else get_registered_event_listeners (spi_global_app_data); diff --git a/atk-adaptor/bridge.h b/atk-adaptor/bridge.h index 64882e4..c4ceca1 100644 --- a/atk-adaptor/bridge.h +++ b/atk-adaptor/bridge.h @@ -7,19 +7,19 @@ * Copyright 2008, 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef BRIDGE_H @@ -73,6 +73,7 @@ gchar *app_bus_addr; GList *events; gboolean events_initialized; GHashTable *property_hash; + guint registration_pending; }; extern SpiBridge *spi_global_app_data; @@ -92,6 +93,8 @@ DRoutePropertyFunction _atk_bridge_find_property_func (const char *property, GType *type); GType _atk_bridge_type_from_iface (const char *iface); + +gboolean _atk_bridge_register_application (gpointer data); G_END_DECLS #endif /* BRIDGE_H */ diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c index 4910f0f..e527d45 100644 --- a/atk-adaptor/event.c +++ b/atk-adaptor/event.c @@ -8,19 +8,19 @@ * Copyright 2001, 2002, 2003 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -42,6 +42,8 @@ static GArray *listener_ids = NULL; static gint atk_bridge_key_event_listener_id; static gint atk_bridge_focus_tracker_id; +GMainContext *spi_context = NULL; + /*---------------------------------------------------------------------------*/ #define ITF_EVENT_OBJECT "org.a11y.atspi.Event.Object" @@ -70,6 +72,40 @@ switch_main_context (GMainContext *cnx) atspi_set_main_context (cnx); for (list = spi_global_app_data->direct_connections; list; list = list->next) atspi_dbus_connection_setup_with_g_main (list->data, cnx); + + if (spi_global_app_data->registration_pending) + { + g_source_remove (spi_global_app_data->registration_pending); + spi_global_app_data->registration_pending = spi_idle_add (_atk_bridge_register_application, spi_global_app_data); + } +} + +guint +spi_idle_add(GSourceFunc function, gpointer data) +{ + GSource *source; + guint id; + + source = g_idle_source_new (); + g_source_set_callback (source, function, data, NULL); + id = g_source_attach (source, spi_context); + g_source_unref (source); + + return id; +} + +guint +spi_timeout_add_seconds (gint interval, GSourceFunc function, gpointer data) +{ + GSource *source; + guint id; + + source = g_timeout_source_new_seconds (interval); + g_source_set_callback (source, function, data, NULL); + id = g_source_attach (source, spi_context); + g_source_unref (source); + + return id; } static void @@ -79,7 +115,7 @@ set_reply (DBusPendingCall * pending, void *user_data) closure->reply = dbus_pending_call_steal_reply (pending); dbus_pending_call_unref (pending); - switch_main_context (NULL); + switch_main_context (spi_context); g_main_loop_quit (closure->loop); } @@ -88,7 +124,7 @@ timeout_reply (void *data) { SpiReentrantCallClosure *closure = data; - switch_main_context (NULL); + switch_main_context (spi_context); g_main_loop_quit (closure->loop); closure->timeout = -1; return FALSE; @@ -108,7 +144,7 @@ send_and_allow_reentry (DBusConnection * bus, DBusMessage * message) if (!dbus_connection_send_with_reply (bus, message, &pending, 9000) || !pending) { - switch_main_context (NULL); + switch_main_context (spi_context); return NULL; } dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL); @@ -126,6 +162,13 @@ send_and_allow_reentry (DBusConnection * bus, DBusMessage * message) return closure.reply; } +void +atk_bridge_set_event_context(GMainContext *cnx) +{ + spi_context = cnx; + switch_main_context(spi_context); +} + /*---------------------------------------------------------------------------*/ /* @@ -398,10 +441,10 @@ signal_is_needed (AtkObject *obj, const gchar *klass, const gchar *major, * this instead, so that we don't send these if no one is listening */ if (!g_strcmp0 (data [1], "ChildrenChanged") || ((!g_strcmp0 (data [1], "PropertyChange")) && - (!g_strcmp0 (data [2], "accessible-name") || - !g_strcmp0 (data [2], "accessible-description") || - !g_strcmp0 (data [2], "accessible-parent") || - !g_strcmp0 (data [2], "accessible-role"))) || + (!g_strcmp0 (data [2], "AccessibleName") || + !g_strcmp0 (data [2], "AccessibleDescription") || + !g_strcmp0 (data [2], "AccessibleParent") || + !g_strcmp0 (data [2], "AccessibleRole"))) || !g_strcmp0 (data [1], "StateChanged")) { if (minor && !g_strcmp0 (minor, "defunct")) @@ -451,14 +494,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 +521,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 = ""; @@ -678,24 +713,6 @@ property_event_listener (GSignalInvocationHint * signal_hint, #define STATE_CHANGED "state-changed" -static void -do_debug_thing (AtkObject *accessible) -{ - AtkObject *parent; - gint x, y, width, height; - - do - { - parent = atk_object_get_parent (accessible); - if (!ATK_IS_COMPONENT (accessible)) - { - return; - } - atk_component_get_extents (ATK_COMPONENT (accessible), &x, &y, &width, &height, ATK_XY_SCREEN); - accessible = parent; - } while (accessible); -} - /* * The state event listener handles 'Gtk:AtkObject:state-change' ATK signals * and forwards them as object:state-changed:(param-name) AT-SPI events. Where @@ -717,7 +734,6 @@ state_event_listener (GSignalInvocationHint * signal_hint, emit_event (accessible, ITF_EVENT_OBJECT, STATE_CHANGED, pname, detail1, 0, DBUS_TYPE_INT32_AS_STRING, 0, append_basic); -if (!g_strcmp0 (pname, "focused") && detail1 && g_getenv("DODEBUG")) do_debug_thing(accessible); if (!g_strcmp0 (pname, "defunct") && detail1) spi_register_deregister_object (spi_global_register, G_OBJECT (accessible), TRUE); @@ -971,6 +987,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); @@ -1020,6 +1038,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/event.h b/atk-adaptor/event.h index 1a9f9f3..8b3b30f 100644 --- a/atk-adaptor/event.h +++ b/atk-adaptor/event.h @@ -7,19 +7,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef EVENT_H @@ -30,4 +30,8 @@ void spi_atk_deregister_event_listeners (void); void spi_atk_tidy_windows (void); gboolean spi_event_is_subtype (gchar **needle, gchar **haystack); + +extern GMainContext *spi_context; +guint spi_idle_add(GSourceFunc function, gpointer data); +guint spi_timeout_add_seconds (gint interval, GSourceFunc function, gpointer data); #endif /* EVENT_H */ 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/gtk-2.0/module.c b/atk-adaptor/gtk-2.0/module.c index d2a49ee..a932564 100644 --- a/atk-adaptor/gtk-2.0/module.c +++ b/atk-adaptor/gtk-2.0/module.c @@ -7,19 +7,19 @@ * Copyright 2001, 2002, 2003 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #define _GNU_SOURCE diff --git a/atk-adaptor/introspection.c b/atk-adaptor/introspection.c index 84fec4c..e017449 100644 --- a/atk-adaptor/introspection.c +++ b/atk-adaptor/introspection.c @@ -260,6 +260,16 @@ const char *spi_org_a11y_atspi_Component = " " " " "" +" " +" " +" " +"" +" " +" " +" " +" " +" " +"" "" ""; @@ -714,6 +724,20 @@ const char *spi_org_a11y_atspi_Text = " " " " "" +" " +" " +" " +" " +" " +"" +" " +" " +" " +" " +" " +" " +" " +"" "" ""; diff --git a/atk-adaptor/meson.build b/atk-adaptor/meson.build new file mode 100644 index 0000000..69685e3 --- /dev/null +++ b/atk-adaptor/meson.build @@ -0,0 +1,62 @@ +subdir('adaptors') + +atk_bridge_sources = [ + 'accessible-leasing.c', + 'accessible-cache.c', + 'accessible-register.c', + 'accessible-stateset.c', + 'introspection.c', + 'bridge.c', + 'object.c', + 'event.c', + 'spi-dbus.c', +] + +install_headers([ 'atk-bridge.h' ], subdir: join_paths(meson.project_name(), '2.0')) + +libatk_bridge = shared_library('atk-bridge-2.0', atk_bridge_sources, + include_directories: root_inc, + dependencies: [ + libatk_bridge_adaptors_dep, + libdroute_dep, + libdbus_dep, + gmodule_dep, + gobject_dep, + atk_dep, + atspi_dep, + ], + c_args: p2p_cflags, + version: atk_bridge_libversion, + soversion: atk_bridge_soversion, + install: true) + +libatk_bridge_dep = declare_dependency(link_with: libatk_bridge, + include_directories: [ + root_inc, + include_directories('.') + ]) + +atk_bridge_module = shared_module('atk-bridge', 'gtk-2.0/module.c', + include_directories: root_inc, + dependencies: [ + libatk_bridge_dep, + libdbus_dep, + atk_dep, + atspi_dep, + gmodule_dep, + ], + 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-adaptor/object.c b/atk-adaptor/object.c index bdc1625..d05ff8c 100644 --- a/atk-adaptor/object.c +++ b/atk-adaptor/object.c @@ -6,19 +6,19 @@ * Copyright 2008, 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* @@ -479,6 +479,12 @@ init_role_lookup_table (AtspiRole * role_table) role_table[ATK_ROLE_MATH_ROOT] = ATSPI_ROLE_MATH_ROOT; role_table[ATK_ROLE_SUBSCRIPT] = ATSPI_ROLE_SUBSCRIPT; role_table[ATK_ROLE_SUPERSCRIPT] = ATSPI_ROLE_SUPERSCRIPT; + role_table[ATK_ROLE_DESCRIPTION_LIST] = ATSPI_ROLE_DESCRIPTION_LIST; + role_table[ATK_ROLE_DESCRIPTION_TERM] = ATSPI_ROLE_DESCRIPTION_TERM; + role_table[ATK_ROLE_DESCRIPTION_VALUE] = ATSPI_ROLE_DESCRIPTION_VALUE; + role_table[ATK_ROLE_FOOTNOTE] = ATSPI_ROLE_FOOTNOTE; + role_table[ATK_ROLE_CONTENT_DELETION] = ATSPI_ROLE_CONTENT_DELETION; + role_table[ATK_ROLE_CONTENT_INSERTION] = ATSPI_ROLE_CONTENT_INSERTION; return TRUE; } diff --git a/atk-adaptor/object.h b/atk-adaptor/object.h index 5f283bc..ecb3d11 100644 --- a/atk-adaptor/object.h +++ b/atk-adaptor/object.h @@ -6,19 +6,19 @@ * Copyright 2008, 2009, 2010 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ACCESSIBLE_OBJECT_H diff --git a/atk-adaptor/spi-dbus.c b/atk-adaptor/spi-dbus.c index e757376..4bc2a5b 100644 --- a/atk-adaptor/spi-dbus.c +++ b/atk-adaptor/spi-dbus.c @@ -5,19 +5,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/atk-adaptor/spi-dbus.h b/atk-adaptor/spi-dbus.h index 61a43be..4886d15 100644 --- a/atk-adaptor/spi-dbus.h +++ b/atk-adaptor/spi-dbus.h @@ -6,19 +6,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_DBUS_H_ 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 549e7a4..0000000 --- a/configure.ac +++ /dev/null @@ -1,135 +0,0 @@ -AC_INIT([at-spi2-atk], [2.20.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.15.4]) -AC_SUBST(ATK_LIBS) -AC_SUBST(ATK_CFLAGS) - -PKG_CHECK_MODULES(ATSPI, [atspi-2 >= 2.17.90]) -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 f214d19..0000000 --- a/droute/Makefile.am +++ /dev/null @@ -1,30 +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) diff --git a/droute/droute-pairhash.c b/droute/droute-pairhash.c index c2f2c29..404b436 100644 --- a/droute/droute-pairhash.c +++ b/droute/droute-pairhash.c @@ -5,19 +5,19 @@ * Copyright 2008 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "droute-pairhash.h" diff --git a/droute/droute-pairhash.h b/droute/droute-pairhash.h index 1491c2d..1cc0c1c 100644 --- a/droute/droute-pairhash.h +++ b/droute/droute-pairhash.h @@ -5,19 +5,19 @@ * Copyright 2008 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _DROUTE_PAIRHASH_H #define _DROUTE_PAIRHASH_H 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-variant.c b/droute/droute-variant.c index bd5ef36..b877bb7 100644 --- a/droute/droute-variant.c +++ b/droute/droute-variant.c @@ -5,19 +5,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/droute/droute-variant.h b/droute/droute-variant.h index 47feb96..4fa0719 100644 --- a/droute/droute-variant.h +++ b/droute/droute-variant.h @@ -5,19 +5,19 @@ * 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 + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _DROUTE_VARIANT_H #define _DROUTE_VARIANT_H diff --git a/droute/droute.c b/droute/droute.c index 838aacd..3955a91 100644 --- a/droute/droute.c +++ b/droute/droute.c @@ -6,19 +6,19 @@ * Copyright 2008 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -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/droute/droute.h b/droute/droute.h index b19dec6..68c113d 100644 --- a/droute/droute.h +++ b/droute/droute.h @@ -6,19 +6,19 @@ * Copyright 2008 Codethink Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _DROUTE_H #define _DROUTE_H diff --git a/droute/meson.build b/droute/meson.build new file mode 100644 index 0000000..3a1128f --- /dev/null +++ b/droute/meson.build @@ -0,0 +1,18 @@ +droute_sources = [ + 'droute.c', + 'droute-variant.c', + 'droute-pairhash.c', +] + +libdroute = static_library('droute', droute_sources, + dependencies: [ glib_dep, libdbus_dep ], + include_directories: root_inc) + +libdroute_dep = declare_dependency(link_with: libdroute, + dependencies: [ glib_dep, libdbus_dep ], + include_directories: include_directories('.')) + +droute_test = executable('droute-test', 'droute-test.c', + dependencies: [ libdroute_dep, atspi_dep ], + include_directories: root_inc) +test('droute-test', droute_test) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..906dda6 --- /dev/null +++ b/meson.build @@ -0,0 +1,64 @@ +project('at-spi2-atk', 'c', + version: '2.34.1', + license: 'LGPLv2.1+', + default_options: [ + 'buildtype=debugoptimized', + 'warning_level=1', + 'c_std=c99', + ], + meson_version : '>= 0.40.1') + +atk_bridge_soversion = 0 +atk_bridge_libversion = '0.0.0' + +cc = meson.get_compiler('c') +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()) +configure_file(output: 'config.h', + configuration: at_spi_conf) + +root_inc = include_directories('.') + +# Dependencies +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.33.3' +atspi_req_version = '>= 2.33.2' +libxml_req_version = '>= 2.9.1' + +libdbus_dep = dependency('dbus-1', version: libdbus_req_version) +glib_dep = dependency('glib-2.0', version: glib_req_version) +gobject_dep = dependency('gobject-2.0', version: gobject_req_version) +gmodule_dep = dependency('gmodule-2.0', version: gmodule_req_version) +atk_dep = dependency('atk', version: atk_req_version) +atspi_dep = dependency('atspi-2', version: atspi_req_version) +libxml_dep = dependency('libxml-2.0', version: libxml_req_version, required: false) + +if get_option('disable_p2p') + p2p_cflags = [ '-DDISABLE_P2P' ] +else + p2p_cflags = [] +endif + +install_data('at-spi2-atk.desktop', + install_dir: join_paths(get_option('libdir'), 'gnome-settings-daemon-3.0', 'gtk-modules')) + +subdir('droute') +subdir('atk-adaptor') +subdir('tests') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..24c9228 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,4 @@ +option('disable_p2p', + description: 'Disable peer-to-peer DBus connections', + type: 'boolean', + value: false) diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 581dc4b..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,86 +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 diff --git a/tests/atk-object-xml-loader.c b/tests/atk-object-xml-loader.c index 8c312d2..01d7249 100644 --- a/tests/atk-object-xml-loader.c +++ b/tests/atk-object-xml-loader.c @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/atk-object-xml-loader.h b/tests/atk-object-xml-loader.h index 5d2768a..7b401f5 100644 --- a/tests/atk-object-xml-loader.h +++ b/tests/atk-object-xml-loader.h @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef ATK_OBJECT_XML_LOADER_H diff --git a/tests/atk_suite.c b/tests/atk_suite.c index c291e2a..14ea216 100644 --- a/tests/atk_suite.c +++ b/tests/atk_suite.c @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/atk_suite.h b/tests/atk_suite.h index 07c2e89..bd33f42 100644 --- a/tests/atk_suite.h +++ b/tests/atk_suite.h @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATK_SUITE_H diff --git a/tests/atk_test_accessible.c b/tests/atk_test_accessible.c index 1028739..2ab74a1 100644 --- a/tests/atk_test_accessible.c +++ b/tests/atk_test_accessible.c @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_accessible_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void @@ -373,7 +373,7 @@ atk_test_accessible_get_process_id (gpointer fixture, gconstpointer user_data) void atk_test_accessible (void) { - g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_accesible_get_name", + g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_accessible_get_name", 0, NULL, NULL, atk_test_accessible_get_name, teardown_accessible_test); g_test_add_vtable (ATK_TEST_PATH_ACCESSIBLE "/atk_test_accessible_get_description", 0, NULL, NULL, atk_test_accessible_get_description, teardown_accessible_test); diff --git a/tests/atk_test_action.c b/tests/atk_test_action.c index fa79d1e..78a68f0 100644 --- a/tests/atk_test_action.c +++ b/tests/atk_test_action.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_action_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_collection.c b/tests/atk_test_collection.c index 9ac69d7..9232eb6 100644 --- a/tests/atk_test_collection.c +++ b/tests/atk_test_collection.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ @@ -29,7 +29,7 @@ static void teardown_collection_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_component.c b/tests/atk_test_component.c index f3ea30b..6ce7439 100644 --- a/tests/atk_test_component.c +++ b/tests/atk_test_component.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_component_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_document.c b/tests/atk_test_document.c index 4a2342d..afe8f99 100644 --- a/tests/atk_test_document.c +++ b/tests/atk_test_document.c @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_document_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_editable_text.c b/tests/atk_test_editable_text.c index e0c0701..8e8baaa 100644 --- a/tests/atk_test_editable_text.c +++ b/tests/atk_test_editable_text.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_editable_text_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_hyperlink.c b/tests/atk_test_hyperlink.c index b0b2821..ce3dc78 100644 --- a/tests/atk_test_hyperlink.c +++ b/tests/atk_test_hyperlink.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_test_util.h" @@ -142,7 +142,7 @@ atk_test_hyperlink_is_valid (gpointer fixture, gconstpointer user_data) static void teardown_hyperlink_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } void diff --git a/tests/atk_test_hypertext.c b/tests/atk_test_hypertext.c index 4696a06..57f42d4 100644 --- a/tests/atk_test_hypertext.c +++ b/tests/atk_test_hypertext.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_test_util.h" @@ -80,7 +80,7 @@ atk_test_hypertext_get_link_index (gpointer fixture, gconstpointer user_data) static void teardown_hypertext_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } void diff --git a/tests/atk_test_image.c b/tests/atk_test_image.c index ce3bc3e..e3ff946 100644 --- a/tests/atk_test_image.c +++ b/tests/atk_test_image.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_image_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_selection.c b/tests/atk_test_selection.c index 1f89b57..9c31645 100644 --- a/tests/atk_test_selection.c +++ b/tests/atk_test_selection.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_selection_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_state_set.c b/tests/atk_test_state_set.c index ea0e9ce..c1de2d1 100644 --- a/tests/atk_test_state_set.c +++ b/tests/atk_test_state_set.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_suite.h" @@ -28,7 +28,7 @@ static void teardown_state_set_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } static void diff --git a/tests/atk_test_table.c b/tests/atk_test_table.c index e22db4c..f610ba1 100644 --- a/tests/atk_test_table.c +++ b/tests/atk_test_table.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_test_util.h" @@ -417,7 +417,7 @@ atk_test_table_is_selected (gpointer fixture, gconstpointer user_data) static void teardown_table_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } void diff --git a/tests/atk_test_table_cell.c b/tests/atk_test_table_cell.c index c431f08..90f861d 100644 --- a/tests/atk_test_table_cell.c +++ b/tests/atk_test_table_cell.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_test_util.h" @@ -76,22 +76,6 @@ atk_test_table_cell_get_column_header_cells (gpointer fixture, gconstpointer use */ static void -atk_test_table_cell_get_column_index (gpointer fixture, gconstpointer user_data) -{ - AtspiAccessible *_obj = get_root_obj (DATA_FILE); - g_assert (_obj); - AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); - g_assert (child); - - AtspiAccessible *cell = atspi_accessible_get_child_at_index (child, 10, NULL); - AtspiTableCell *obj = atspi_accessible_get_table_cell (cell); - g_assert (obj); - - /* ATK Table Cell interface do not implement that func */ - g_assert_cmpint (-1, ==, atspi_table_cell_get_column_index (obj, NULL)); -} - -static void atk_test_table_cell_get_row_span (gpointer fixture, gconstpointer user_data) { AtspiAccessible *_obj = get_root_obj (DATA_FILE); @@ -156,6 +140,28 @@ atk_test_table_cell_get_row_column_span (gpointer fixture, gconstpointer user_da } static void +atk_test_table_cell_get_position (gpointer fixture, gconstpointer user_data) +{ + AtspiAccessible *_obj = get_root_obj (DATA_FILE); + g_assert (_obj); + AtspiAccessible *child = atspi_accessible_get_child_at_index (_obj, 0, NULL); + g_assert (child); + + AtspiAccessible *cell = atspi_accessible_get_child_at_index (child, 9, NULL); + AtspiTableCell *obj = atspi_accessible_get_table_cell (cell); + g_assert (cell); + + gint row = 10; + gint column = 10; + + atspi_table_cell_get_position (obj, &row, &column, NULL); + + /* TODO: not a very good test for the app to return (-1, -1) */ + g_assert_cmpint (row, ==, -1); + g_assert_cmpint (column, ==, -1); +} + +static void atk_test_table_cell_get_table (gpointer fixture, gconstpointer user_data) { AtspiAccessible *_obj = get_root_obj (DATA_FILE); @@ -175,7 +181,7 @@ atk_test_table_cell_get_table (gpointer fixture, gconstpointer user_data) static void teardown_table_cell_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } void @@ -189,8 +195,6 @@ atk_test_table_cell (void) g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_column_header_cells", 0, NULL, NULL, atk_test_table_cell_get_column_header_cells, teardown_table_cell_test); */ - g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_column_index", - 0, NULL, NULL, atk_test_table_cell_get_column_index, teardown_table_cell_test); g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_row_span", 0, NULL, NULL, atk_test_table_cell_get_row_span, teardown_table_cell_test); /* @@ -199,6 +203,8 @@ atk_test_table_cell (void) */ g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_row_column_span", 0, NULL, NULL, atk_test_table_cell_get_row_column_span, teardown_table_cell_test); + g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_position", + 0, NULL, NULL, atk_test_table_cell_get_position, teardown_table_cell_test); g_test_add_vtable (ATK_TEST_PATH_TABLE_CELL "/atk_test_table_cell_get_table", 0, NULL, NULL, atk_test_table_cell_get_table, teardown_table_cell_test); diff --git a/tests/atk_test_text.c b/tests/atk_test_text.c index b9e29dc..17db2e3 100644 --- a/tests/atk_test_text.c +++ b/tests/atk_test_text.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_test_util.h" @@ -432,7 +432,7 @@ atk_test_text_get_bounded_ranges (gpointer fixture, gconstpointer user_data) static void teardown_text_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } void diff --git a/tests/atk_test_util.c b/tests/atk_test_util.c index c776ae1..3e3c08a 100644 --- a/tests/atk_test_util.c +++ b/tests/atk_test_util.c @@ -5,24 +5,26 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include #include "atk_test_util.h" +pid_t child_pid; + static void assert_clean_exit (int sig) { kill (child_pid, SIGTERM); @@ -38,42 +40,88 @@ run_app (const char *file_name) { child_pid = fork (); if (child_pid == 0) { - execlp ("./app-test", - "./app-test", + execlp (TESTS_BUILD_DIR "/app-test", + TESTS_BUILD_DIR "/app-test", "--test-data-file", file_name, NULL); _exit (EXIT_SUCCESS); } + if (child_pid) fprintf(stderr, "child_pid %d\n", child_pid); } -AtspiAccessible * get_root_obj (const char *file_name) +static AtspiAccessible *try_get_root_obj (AtspiAccessible *obj) { int i; - AtspiAccessible *obj = NULL; - - run_app (file_name); - - /* sleep is needed to wait for fored test application*/ - sleep (1); - obj = atspi_get_desktop (0); gint child_count = atspi_accessible_get_child_count (obj, NULL); if (child_count < 1) { - g_test_message ("Fail, test application not found\n"); - g_test_fail (); - kill (child_pid, SIGTERM); return NULL; } for (i=0; i #include "atk_suite.h" -pid_t child_pid; +extern pid_t child_pid; void run_app (const char *file_name); AtspiAccessible *get_root_obj (const char *file_name); +void terminate_app (void); void clean_exit_on_fail (); #endif /* _ATK_TEST_UTIL_H */ diff --git a/tests/atk_test_value.c b/tests/atk_test_value.c index c5f2c06..08021e2 100644 --- a/tests/atk_test_value.c +++ b/tests/atk_test_value.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atk_test_util.h" @@ -43,7 +43,7 @@ atk_test_value_get_minimum_value (gpointer fixture, gconstpointer user_data) g_assert (child); AtspiValue *obj = atspi_accessible_get_value_iface (child); gdouble val = atspi_value_get_minimum_value (obj, NULL); - g_assert_cmpfloat (val, ==, 1.1); + g_assert_cmpfloat (val, ==, 1.25); } static void @@ -55,7 +55,7 @@ atk_test_value_get_current_value (gpointer fixture, gconstpointer user_data) g_assert (child); AtspiValue *obj = atspi_accessible_get_value_iface (child); gdouble val = atspi_value_get_current_value (obj, NULL); - g_assert_cmpfloat (val, ==, 2.1); + g_assert_cmpfloat (val, ==, 2.25); } static void @@ -67,7 +67,7 @@ atk_test_value_get_maximum_value (gpointer fixture, gconstpointer user_data) g_assert (child); AtspiValue *obj = atspi_accessible_get_value_iface (child); gdouble val = atspi_value_get_maximum_value (obj, NULL); - g_assert_cmpfloat (val, ==, 3.1); + g_assert_cmpfloat (val, ==, 3.25); } static void @@ -92,13 +92,13 @@ atk_test_value_get_minimum_increment (gpointer fixture, gconstpointer user_data) g_assert (child); AtspiValue *obj = atspi_accessible_get_value_iface (child); gdouble val = atspi_value_get_minimum_increment (obj, NULL); - g_assert_cmpfloat (val, ==, 0.1); + g_assert_cmpfloat (val, ==, 0.25); } static void teardown_value_test (gpointer fixture, gconstpointer user_data) { - kill (child_pid, SIGTERM); + terminate_app (); } void diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am deleted file mode 100644 index 2ac7ebf..0000000 --- a/tests/data/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -EXTRA_DIST = test-accessible.xml \ - test-action.xml \ - test-component.xml \ - test.xml diff --git a/tests/data/test-value.xml b/tests/data/test-value.xml index 83172d5..1f5ae6c 100644 --- a/tests/data/test-value.xml +++ b/tests/data/test-value.xml @@ -1,6 +1,6 @@ - + diff --git a/tests/dummyatk/Makefile.am b/tests/dummyatk/Makefile.am deleted file mode 100644 index c590cce..0000000 --- a/tests/dummyatk/Makefile.am +++ /dev/null @@ -1,42 +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 diff --git a/tests/dummyatk/meson.build b/tests/dummyatk/meson.build new file mode 100644 index 0000000..4f98989 --- /dev/null +++ b/tests/dummyatk/meson.build @@ -0,0 +1,23 @@ +dummyatk_sources = [ + 'my-atk-action.c', + 'my-atk-component.c', + 'my-atk-document.c', + 'my-atk-editable-text.c', + 'my-atk-hyperlink.c', + 'my-atk-hypertext.c', + 'my-atk-image.c', + 'my-atk-text.c', + 'my-atk-object.c', + 'my-atk-table.c', + 'my-atk-table-cell.c', + 'my-atk-selection.c', + 'my-atk-value.c', +] + +dummyatk = static_library('dummyatk', dummyatk_sources, + include_directories: root_inc, + dependencies: [ glib_dep, gobject_dep, atk_dep ]) + +dummyatk_dep = declare_dependency(link_with: dummyatk, + dependencies: [ glib_dep, gobject_dep, atk_dep ], + include_directories: include_directories('.')) diff --git a/tests/dummyatk/my-atk-action.c b/tests/dummyatk/my-atk-action.c index 8d688cb..5af63c3 100644 --- a/tests/dummyatk/my-atk-action.c +++ b/tests/dummyatk/my-atk-action.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -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-action.h b/tests/dummyatk/my-atk-action.h index 8bdb4f8..f16d7b8 100644 --- a/tests/dummyatk/my-atk-action.h +++ b/tests/dummyatk/my-atk-action.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_ACTION_H diff --git a/tests/dummyatk/my-atk-component.c b/tests/dummyatk/my-atk-component.c index 53a1091..f7a2cf0 100644 --- a/tests/dummyatk/my-atk-component.c +++ b/tests/dummyatk/my-atk-component.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-component.h b/tests/dummyatk/my-atk-component.h index 229002f..2f169ce 100644 --- a/tests/dummyatk/my-atk-component.h +++ b/tests/dummyatk/my-atk-component.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ diff --git a/tests/dummyatk/my-atk-document.c b/tests/dummyatk/my-atk-document.c index 62b0c81..3df1610 100644 --- a/tests/dummyatk/my-atk-document.c +++ b/tests/dummyatk/my-atk-document.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-document.h b/tests/dummyatk/my-atk-document.h index 47c9187..90e16a0 100644 --- a/tests/dummyatk/my-atk-document.h +++ b/tests/dummyatk/my-atk-document.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_DOCUMENT_H diff --git a/tests/dummyatk/my-atk-editable-text.c b/tests/dummyatk/my-atk-editable-text.c index 3af2a41..ee376ae 100644 --- a/tests/dummyatk/my-atk-editable-text.c +++ b/tests/dummyatk/my-atk-editable-text.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-editable-text.h b/tests/dummyatk/my-atk-editable-text.h index 3b3e432..45b7f82 100644 --- a/tests/dummyatk/my-atk-editable-text.h +++ b/tests/dummyatk/my-atk-editable-text.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_EDITABLE_TEXT_H_ diff --git a/tests/dummyatk/my-atk-hyperlink.c b/tests/dummyatk/my-atk-hyperlink.c index 834369d..b8a35f1 100644 --- a/tests/dummyatk/my-atk-hyperlink.c +++ b/tests/dummyatk/my-atk-hyperlink.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-hyperlink.h b/tests/dummyatk/my-atk-hyperlink.h index 566d12d..8bdbae5 100644 --- a/tests/dummyatk/my-atk-hyperlink.h +++ b/tests/dummyatk/my-atk-hyperlink.h @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_HYPERLINK_H_ diff --git a/tests/dummyatk/my-atk-hypertext.c b/tests/dummyatk/my-atk-hypertext.c index 80abb3f..4f35022 100644 --- a/tests/dummyatk/my-atk-hypertext.c +++ b/tests/dummyatk/my-atk-hypertext.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-hypertext.h b/tests/dummyatk/my-atk-hypertext.h index 2dd7409..5a00a6f 100644 --- a/tests/dummyatk/my-atk-hypertext.h +++ b/tests/dummyatk/my-atk-hypertext.h @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_HYPERTEXT_H_ diff --git a/tests/dummyatk/my-atk-image.c b/tests/dummyatk/my-atk-image.c index c714a45..09b7191 100644 --- a/tests/dummyatk/my-atk-image.c +++ b/tests/dummyatk/my-atk-image.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ diff --git a/tests/dummyatk/my-atk-image.h b/tests/dummyatk/my-atk-image.h index d8a91c8..2980215 100644 --- a/tests/dummyatk/my-atk-image.h +++ b/tests/dummyatk/my-atk-image.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_IMAGE_H_ diff --git a/tests/dummyatk/my-atk-object.c b/tests/dummyatk/my-atk-object.c index c0b3014..05b542c 100644 --- a/tests/dummyatk/my-atk-object.c +++ b/tests/dummyatk/my-atk-object.c @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -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/dummyatk/my-atk-object.h b/tests/dummyatk/my-atk-object.h index 54f65ac..da408e0 100644 --- a/tests/dummyatk/my-atk-object.h +++ b/tests/dummyatk/my-atk-object.h @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ diff --git a/tests/dummyatk/my-atk-selection.c b/tests/dummyatk/my-atk-selection.c index bf706cc..18a9eef 100644 --- a/tests/dummyatk/my-atk-selection.c +++ b/tests/dummyatk/my-atk-selection.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-selection.h b/tests/dummyatk/my-atk-selection.h index be932e0..ee2e04d 100644 --- a/tests/dummyatk/my-atk-selection.h +++ b/tests/dummyatk/my-atk-selection.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_SELECTION_H diff --git a/tests/dummyatk/my-atk-table-cell.c b/tests/dummyatk/my-atk-table-cell.c index 2d1c568..03c1217 100644 --- a/tests/dummyatk/my-atk-table-cell.c +++ b/tests/dummyatk/my-atk-table-cell.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include @@ -134,7 +134,7 @@ my_atk_tablecell_get_position (AtkTableCell *obj, gint *row , gint *column) *row = self->xy[0]; *column = self->xy[1]; - return FALSE; + return TRUE; } static GPtrArray * diff --git a/tests/dummyatk/my-atk-table-cell.h b/tests/dummyatk/my-atk-table-cell.h index 78f8dd0..e6c231b 100644 --- a/tests/dummyatk/my-atk-table-cell.h +++ b/tests/dummyatk/my-atk-table-cell.h @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_TABLE_CELL_H_ diff --git a/tests/dummyatk/my-atk-table.c b/tests/dummyatk/my-atk-table.c index 58fd1bd..15f7411 100644 --- a/tests/dummyatk/my-atk-table.c +++ b/tests/dummyatk/my-atk-table.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-table.h b/tests/dummyatk/my-atk-table.h index a3a0e35..de58040 100644 --- a/tests/dummyatk/my-atk-table.h +++ b/tests/dummyatk/my-atk-table.h @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_TABLE_H_ diff --git a/tests/dummyatk/my-atk-text.c b/tests/dummyatk/my-atk-text.c index 54d7a2f..d7389fb 100644 --- a/tests/dummyatk/my-atk-text.c +++ b/tests/dummyatk/my-atk-text.c @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-text.h b/tests/dummyatk/my-atk-text.h index cb221a1..8dcc587 100644 --- a/tests/dummyatk/my-atk-text.h +++ b/tests/dummyatk/my-atk-text.h @@ -5,19 +5,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_TEXT_H_ diff --git a/tests/dummyatk/my-atk-value.c b/tests/dummyatk/my-atk-value.c index 5fce30a..2b0b790 100644 --- a/tests/dummyatk/my-atk-value.c +++ b/tests/dummyatk/my-atk-value.c @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/tests/dummyatk/my-atk-value.h b/tests/dummyatk/my-atk-value.h index eb69b90..47e9dac 100644 --- a/tests/dummyatk/my-atk-value.h +++ b/tests/dummyatk/my-atk-value.h @@ -3,19 +3,19 @@ * Copyright (c) 2015 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_VALUE_H_ diff --git a/tests/dummyatk/my-atk.h b/tests/dummyatk/my-atk.h index ef13273..9cfbc02 100644 --- a/tests/dummyatk/my-atk.h +++ b/tests/dummyatk/my-atk.h @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef MY_ATK_H diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..64ed994 --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,82 @@ +subdir('dummyatk') + +xmlloader = static_library('xmlloader', [ 'atk-object-xml-loader.c' ], + dependencies: [ glib_dep, gobject_dep, libxml_dep, atk_dep, dummyatk_dep ], + include_directories: [ root_inc, include_directories('.') ]) +xmlloader_dep = declare_dependency(link_with: xmlloader) + +testutils = static_library('testutils', [ 'atk_test_util.c' ], + dependencies: [ glib_dep, atspi_dep ], + include_directories: [ root_inc, include_directories('.') ], + c_args: ['-DTESTS_BUILD_DIR="@0@"'.format(meson.current_build_dir()) ] ) +testutils_dep = declare_dependency(link_with: testutils) + +# tests: +# - name +# - sources +# - dependencies +tests = [ + [ + 'atk-test', [ + 'atk_suite.c', + 'atk_test_accessible.c', + 'atk_test_action.c', + 'atk_test_component.c', + 'atk_test_collection.c', + 'atk_test_document.c', + 'atk_test_editable_text.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', + ], + [ + glib_dep, + atspi_dep, + xmlloader_dep, + testutils_dep, + dummyatk_dep, + ] + ], + + [ + 'app-test', + [ + 'test-application.c', + ], + [ + glib_dep, + atk_dep, + xmlloader_dep, + testutils_dep, + dummyatk_dep, + libatk_bridge_dep, + ] + ], +] + +foreach t: tests + test_name = t[0] + test_sources = t[1] + test_deps = t[2] + + test_bin = executable(test_name, test_sources, + dependencies: test_deps, + include_directories: root_inc, + c_args: [ + '-DTESTS_BUILD_DIR="@0@"'.format(meson.current_build_dir()), + '-DTESTS_SRC_DIR="@0@"'.format(meson.current_source_dir()), + '-DTESTS_DATA_DIR="@0@"'.format(join_paths(meson.current_source_dir(), 'data')), + ]) + + if test_name == 'atk-test' + atk_test_bin = test_bin + endif +endforeach + +test('atk-test', atk_test_bin, timeout: 120) diff --git a/tests/test-application.c b/tests/test-application.c index fe9527d..7844461 100644 --- a/tests/test-application.c +++ b/tests/test-application.c @@ -5,19 +5,19 @@ * Copyright (c) 2014 Samsung Electronics Co., Ltd. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 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. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser 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. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* -- 2.7.4