├── .clang-format ├── .gitignore ├── .gitlab-ci.yml ├── COPYING ├── INSTALL ├── MAINTAINERS ├── NEWS ├── README.md ├── README.msvc ├── at-spi2-atk.desktop ├── at-spi2-core.doap ├── atk-adaptor ├── accessible-cache.c ├── accessible-cache.h ├── accessible-leasing.c ├── accessible-leasing.h ├── accessible-register.c ├── accessible-register.h ├── accessible-stateset.c ├── accessible-stateset.h ├── adaptors │ ├── 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 │ ├── meson.build │ ├── selection-adaptor.c │ ├── socket-adaptor.c │ ├── streamablecontent-adaptor.c │ ├── table-adaptor.c │ ├── table-cell-adaptor.c │ ├── text-adaptor.c │ └── value-adaptor.c ├── atk-bridge.h ├── atkbridge.symbols ├── bitarray.h ├── bridge.c ├── bridge.h ├── event.c ├── event.h ├── gtk-2.0 │ └── module.c ├── meson.build ├── object.c ├── object.h ├── spi-dbus.c └── spi-dbus.h ├── atk ├── .gitignore ├── atk-autocleanups.h ├── atk-enum-types.c.template ├── atk-enum-types.h.template ├── atk.h ├── atk.rc.in ├── atkaction.c ├── atkaction.h ├── atkcomponent.c ├── atkcomponent.h ├── atkdocument.c ├── atkdocument.h ├── atkeditabletext.c ├── atkeditabletext.h ├── atkgobjectaccessible.c ├── atkgobjectaccessible.h ├── atkhyperlink.c ├── atkhyperlink.h ├── atkhyperlinkimpl.c ├── atkhyperlinkimpl.h ├── atkhypertext.c ├── atkhypertext.h ├── atkimage.c ├── atkimage.h ├── atkmarshal.list ├── atkmisc.c ├── atkmisc.h ├── atknoopobject.c ├── atknoopobject.h ├── atknoopobjectfactory.c ├── atknoopobjectfactory.h ├── atkobject.c ├── atkobject.h ├── atkobjectfactory.c ├── atkobjectfactory.h ├── atkplug.c ├── atkplug.h ├── atkprivate.c ├── atkprivate.h ├── atkrange.c ├── atkrange.h ├── atkregistry.c ├── atkregistry.h ├── atkrelation.c ├── atkrelation.h ├── atkrelationset.c ├── atkrelationset.h ├── atkrelationtype.h ├── atkselection.c ├── atkselection.h ├── atksocket.c ├── atksocket.h ├── atkstate.c ├── atkstate.h ├── atkstateset.c ├── atkstateset.h ├── atkstreamablecontent.c ├── atkstreamablecontent.h ├── atktable.c ├── atktable.h ├── atktablecell.c ├── atktablecell.h ├── atktext.c ├── atktext.h ├── atkutil.c ├── atkutil.h ├── atkvalue.c ├── atkvalue.h ├── atkversion.c ├── atkversion.h.in ├── atkwindow.c ├── atkwindow.h └── meson.build ├── atspi ├── atspi-accessible-private.h ├── atspi-accessible.c ├── atspi-accessible.h ├── atspi-action.c ├── atspi-action.h ├── atspi-application.c ├── atspi-application.h ├── atspi-collection.c ├── atspi-collection.h ├── atspi-component.c ├── atspi-component.h ├── atspi-constants.h ├── atspi-device-a11y-manager.c ├── atspi-device-a11y-manager.h ├── atspi-device-legacy.c ├── atspi-device-legacy.h ├── atspi-device-listener-private.h ├── atspi-device-listener.c ├── atspi-device-listener.h ├── atspi-device-x11.c ├── atspi-device-x11.h ├── atspi-device.c ├── atspi-device.h ├── atspi-document.c ├── atspi-document.h ├── atspi-editabletext.c ├── atspi-editabletext.h ├── atspi-enum-types.c.template ├── atspi-enum-types.h.template ├── atspi-event-listener-private.h ├── atspi-event-listener.c ├── atspi-event-listener.h ├── atspi-gmain.c ├── atspi-gmain.h ├── atspi-hyperlink.c ├── atspi-hyperlink.h ├── atspi-hypertext.c ├── atspi-hypertext.h ├── atspi-image.c ├── atspi-image.h ├── atspi-matchrule-private.h ├── atspi-matchrule.c ├── atspi-matchrule.h ├── atspi-misc-private.h ├── atspi-misc.c ├── atspi-misc.h ├── atspi-object.c ├── atspi-object.h ├── atspi-private.h ├── atspi-registry.c ├── atspi-registry.h ├── atspi-relation.c ├── atspi-relation.h ├── atspi-selection.c ├── atspi-selection.h ├── atspi-stateset.c ├── atspi-stateset.h ├── atspi-table-cell.c ├── atspi-table-cell.h ├── atspi-table.c ├── atspi-table.h ├── atspi-text.c ├── atspi-text.h ├── atspi-types.h ├── atspi-value.c ├── atspi-value.h ├── atspi-version.h.in ├── atspi.h ├── atspimarshal.list └── meson.build ├── bus ├── 00-at-spi ├── README.md ├── accessibility.conf.in ├── at-spi-bus-launcher.c ├── at-spi-dbus-bus.desktop.in ├── at-spi-dbus-bus.service.in ├── meson.build └── org.a11y.Bus.service.in ├── ci ├── README.md ├── address-sanitizer.supp ├── container_builds.yml ├── env.sh ├── install-python-tools.sh ├── install-rust.sh ├── lcovrc ├── pull-container-image.sh ├── requirements.txt ├── run-registryd-tests.sh ├── run-style-check.sh └── run-tests.sh ├── config └── NONCE ├── dbind ├── dbind-any.c ├── dbind-any.h ├── dbind.c ├── dbind.h ├── dbtest.c └── meson.build ├── devel-docs ├── architecture-modules.svg ├── architecture.rst ├── at-spi3.rst ├── atk-deprecations.rst ├── atspi-python-stack.rst ├── conf.py ├── de-controller.rst ├── gitlab-ci.rst ├── index.rst ├── meeting-2023-01-13.rst ├── meson.build ├── new-protocol.rst ├── roadmap.rst ├── toolkits.rst ├── xml-changes.rst └── xml-interfaces.rst ├── doc ├── atk.toml.in ├── libatspi.toml.in ├── logo.png ├── meson.build └── urlmap.js ├── droute ├── droute-pairhash.c ├── droute-pairhash.h ├── droute-test.c ├── droute-variant.c ├── droute-variant.h ├── droute.c ├── droute.h └── meson.build ├── git.mk ├── m4 └── .gitignore ├── meson.build ├── meson_options.txt ├── po ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── ab.po ├── af.po ├── am.po ├── an.po ├── ar.po ├── as.po ├── ast.po ├── az.po ├── be.po ├── be@latin.po ├── bg.po ├── bn.po ├── bn_IN.po ├── bs.po ├── ca.po ├── ca@valencia.po ├── ckb.po ├── cs.po ├── cy.po ├── da.po ├── de.po ├── dz.po ├── el.po ├── en@shaw.po ├── en_CA.po ├── en_GB.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fa.po ├── fi.po ├── fr.po ├── fur.po ├── ga.po ├── gd.po ├── gl.po ├── gu.po ├── he.po ├── hi.po ├── hr.po ├── hu.po ├── hy.po ├── id.po ├── is.po ├── it.po ├── ja.po ├── ka.po ├── kab.po ├── kk.po ├── km.po ├── kn.po ├── ko.po ├── ku.po ├── li.po ├── lt.po ├── lv.po ├── mai.po ├── meson.build ├── mk.po ├── ml.po ├── mn.po ├── mr.po ├── ms.po ├── nb.po ├── ne.po ├── nl.po ├── nn.po ├── oc.po ├── or.po ├── pa.po ├── pl.po ├── ps.po ├── pt.po ├── pt_BR.po ├── ro.po ├── ru.po ├── rw.po ├── si.po ├── sk.po ├── sl.po ├── sq.po ├── sr.po ├── sr@ije.po ├── sr@latin.po ├── sv.po ├── ta.po ├── te.po ├── tg.po ├── th.po ├── tk.po ├── tr.po ├── tt.po ├── ug.po ├── uk.po ├── uz.po ├── uz@cyrillic.po ├── vi.po ├── wa.po ├── xh.po ├── yi.po ├── zh_CN.po ├── zh_HK.po ├── zh_TW.po └── zu.po ├── registryd ├── de-types.h ├── deviceeventcontroller-x11.c ├── deviceeventcontroller-x11.h ├── deviceeventcontroller.c ├── deviceeventcontroller.h ├── display.c ├── display.h ├── event-source.c ├── event-source.h ├── keymasks.h ├── marshal-dbus.c ├── marshal-dbus.h ├── meson.build ├── org.a11y.atspi.Registry.service.in ├── paths.h ├── reentrant-list.c ├── reentrant-list.h ├── registry-main.c ├── registry.c ├── registry.h ├── ucs2keysym.c └── ucs2keysym.sh ├── subprojects ├── gi-docgen.wrap └── glib.wrap ├── tests ├── .gitignore ├── at-spi2-atk │ ├── README │ ├── atk-object-xml-loader.c │ ├── atk-object-xml-loader.h │ ├── atk_suite.c │ ├── atk_suite.h │ ├── atk_test_accessible.c │ ├── atk_test_action.c │ ├── atk_test_collection.c │ ├── atk_test_component.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_util.c │ ├── atk_test_util.h │ ├── atk_test_value.c │ ├── data │ │ ├── test-accessible.xml │ │ ├── test-action.xml │ │ ├── test-collection.xml │ │ ├── test-component.xml │ │ ├── test-document.xml │ │ ├── test-editable-text.xml │ │ ├── test-hypertext.xml │ │ ├── test-image.xml │ │ ├── test-selection.xml │ │ ├── test-table.xml │ │ ├── test-text.xml │ │ ├── test-value.xml │ │ └── test.xml │ ├── dummyatk │ │ ├── meson.build │ │ ├── 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-object.c │ │ ├── my-atk-object.h │ │ ├── my-atk-selection.c │ │ ├── my-atk-selection.h │ │ ├── my-atk-table-cell.c │ │ ├── my-atk-table-cell.h │ │ ├── my-atk-table.c │ │ ├── my-atk-table.h │ │ ├── my-atk-text.c │ │ ├── my-atk-text.h │ │ ├── my-atk-value.c │ │ ├── my-atk-value.h │ │ └── my-atk.h │ ├── meson.build │ └── test-application.c ├── atk │ ├── README │ ├── meson.build │ ├── testatk_vc.mak │ ├── testdocument.c │ ├── testrelation.c │ ├── testrole.c │ ├── teststateset.c │ └── testvalue.c ├── atspi │ ├── memory.c │ ├── meson.build │ └── test-application.c ├── dbusmock │ ├── mock-gnome-session.py │ └── mock_accessible_app.py ├── meson.build └── registryd │ ├── __init__.py │ ├── conftest.py │ ├── test_introspection.py │ ├── test_root.py │ ├── test_root_accessible.py │ ├── test_root_application.py │ ├── test_root_component.py │ └── utils.py └── xml ├── Accessible.xml ├── Action.xml ├── Application.xml ├── Cache.xml ├── Collection.xml ├── Component.xml ├── DeviceEventController.xml ├── DeviceEventListener.xml ├── Document.xml ├── EditableText.xml ├── Event.xml ├── Hyperlink.xml ├── Hypertext.xml ├── Image.xml ├── Registry.xml ├── Selection.xml ├── Socket.xml ├── Table.xml ├── TableCell.xml ├── Text.xml ├── Value.xml ├── generate-introspection.py └── meson.build /.clang-format: -------------------------------------------------------------------------------- 1 | # See https://gnome.pages.gitlab.gnome.org/at-spi2-core/devel-docs/gitlab-ci.html#code-formatting 2 | # for documentation about this configuration for code formatting. 3 | 4 | BasedOnStyle: GNU 5 | AlwaysBreakAfterDefinitionReturnType: All 6 | BreakBeforeBinaryOperators: None 7 | BinPackParameters: false 8 | SpaceAfterCStyleCast: true 9 | # Our column limit is actually 80, but setting that results in clang-format 10 | # making a lot of dubious hanging-indent choices; disable it and assume the 11 | # developer will line wrap appropriately. clang-format will still check 12 | # existing hanging indents. 13 | ColumnLimit: 0 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Install procedure 2 | ----------------- 3 | 4 | tar -xJf at-spi2-core-2.34.0.tar.xz # unpack the sources 5 | % cd at-spi2-core-2.34.0 # change to the toplevel directory 6 | mkdir build # create a build directory 7 | cd build # change to build directory 8 | meson .. # configure 9 | ninja # build at-spi2-core 10 | 11 | [ Become root if necessary ] 12 | ninja install # install at-spi2-core 13 | 14 | Requirements 15 | ------------ 16 | 17 | Packages with local machine architecture: 18 | meson 19 | ninja 20 | pkg-config 21 | gobject-introspection 22 | gtk-doc (for generation of documentation) 23 | 24 | Packages with target architecture: 25 | glib 26 | dbus 27 | libX11, libXtst, libXi (for X11 support) 28 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Mike Gorse 2 | -------------------------------------------------------------------------------- /at-spi2-atk.desktop: -------------------------------------------------------------------------------- 1 | [GTK Module] 2 | Name=AT-SPI2 ATK 3 | Description=Accessibility ToolKit GTK+ Module 4 | X-GTK-Module-Name=gail:atk-bridge 5 | X-GTK-Module-Enabled-Schema=org.gnome.desktop.interface 6 | X-GTK-Module-Enabled-Key=toolkit-accessibility 7 | -------------------------------------------------------------------------------- /atk-adaptor/accessible-cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2010 Codethink Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef ACCESSIBLE_CACHE_H 24 | #define ACCESSIBLE_CACHE_H 25 | 26 | #include 27 | #include 28 | 29 | typedef struct _SpiCache SpiCache; 30 | typedef struct _SpiCacheClass SpiCacheClass; 31 | 32 | G_BEGIN_DECLS 33 | 34 | #define SPI_CACHE_TYPE (spi_cache_get_type ()) 35 | #define SPI_CACHE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_CACHE_TYPE, SpiCache)) 36 | #define SPI_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SPI_CACHE_TYPE, SpiCacheClass)) 37 | #define SPI_IS_CACHE(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_CACHE_TYPE)) 38 | #define SPI_IS_CACHE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_CACHE_TYPE)) 39 | 40 | struct _SpiCache 41 | { 42 | GObject parent; 43 | 44 | GHashTable *objects; 45 | GQueue *add_traversal; 46 | gint add_pending_idle; 47 | 48 | guint child_added_listener; 49 | }; 50 | 51 | struct _SpiCacheClass 52 | { 53 | GObjectClass parent_class; 54 | }; 55 | 56 | GType spi_cache_get_type (void); 57 | 58 | extern SpiCache *spi_global_cache; 59 | 60 | void 61 | spi_cache_foreach (SpiCache *cache, GHFunc func, gpointer data); 62 | 63 | gboolean 64 | spi_cache_in (SpiCache *cache, GObject *object); 65 | 66 | G_END_DECLS 67 | #endif /* ACCESSIBLE_CACHE_H */ 68 | -------------------------------------------------------------------------------- /atk-adaptor/accessible-leasing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008 Novell, Inc. 6 | * Copyright 2008, 2009 Codethink Ltd. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef ACCESSIBLE_LEASING_H 25 | #define ACCESSIBLE_LEASING_H 26 | 27 | #include 28 | #include 29 | 30 | typedef struct _SpiLeasing SpiLeasing; 31 | typedef struct _SpiLeasingClass SpiLeasingClass; 32 | 33 | G_BEGIN_DECLS 34 | 35 | #define SPI_LEASING_TYPE (spi_leasing_get_type ()) 36 | #define SPI_LEASING(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_LEASING_TYPE, SpiLeasing)) 37 | #define SPI_LEASING_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SPI_LEASING_TYPE, SpiLeasingClass)) 38 | #define SPI_IS_LEASING(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_LEASING_TYPE)) 39 | #define SPI_IS_LEASING_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_LEASING_TYPE)) 40 | 41 | struct _SpiLeasing 42 | { 43 | GObject parent; 44 | 45 | GQueue *expiry_queue; 46 | guint expiry_func_id; 47 | }; 48 | 49 | struct _SpiLeasingClass 50 | { 51 | GObjectClass parent_class; 52 | }; 53 | 54 | GType spi_leasing_get_type (void); 55 | 56 | extern SpiLeasing *spi_global_leasing; 57 | 58 | GObject *spi_leasing_take (SpiLeasing *leasing, GObject *object); 59 | 60 | G_END_DECLS 61 | #endif /* ACCESSIBLE_LEASING_H */ 62 | -------------------------------------------------------------------------------- /atk-adaptor/adaptors/adaptors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef ADAPTORS_H 25 | #define ADAPTORS_H 26 | 27 | #include 28 | #include 29 | 30 | AtspiRole spi_accessible_role_from_atk_role (AtkRole role); 31 | 32 | void spi_initialize_accessible (DRoutePath *path); 33 | void spi_initialize_action (DRoutePath *path); 34 | void spi_initialize_application (DRoutePath *path); 35 | void spi_initialize_collection (DRoutePath *path); 36 | void spi_initialize_component (DRoutePath *path); 37 | void spi_initialize_document (DRoutePath *path); 38 | void spi_initialize_editabletext (DRoutePath *path); 39 | void spi_initialize_hyperlink (DRoutePath *path); 40 | void spi_initialize_hypertext (DRoutePath *path); 41 | void spi_initialize_image (DRoutePath *path); 42 | void spi_initialize_selection (DRoutePath *path); 43 | void spi_initialize_socket (DRoutePath *path); 44 | void spi_initialize_table (DRoutePath *path); 45 | void spi_initialize_table_cell (DRoutePath *path); 46 | void spi_initialize_text (DRoutePath *path); 47 | void spi_initialize_value (DRoutePath *path); 48 | void spi_initialize_cache (DRoutePath *path); 49 | 50 | #endif /* ADAPTORS_H */ 51 | -------------------------------------------------------------------------------- /atk-adaptor/adaptors/meson.build: -------------------------------------------------------------------------------- 1 | source = [ 2 | introspection_generated, 3 | 'accessible-adaptor.c', 4 | 'action-adaptor.c', 5 | 'application-adaptor.c', 6 | 'cache-adaptor.c', 7 | 'collection-adaptor.c', 8 | 'component-adaptor.c', 9 | 'document-adaptor.c', 10 | 'editabletext-adaptor.c', 11 | 'hyperlink-adaptor.c', 12 | 'hypertext-adaptor.c', 13 | 'image-adaptor.c', 14 | 'selection-adaptor.c', 15 | 'socket-adaptor.c', 16 | 'table-adaptor.c', 17 | 'table-cell-adaptor.c', 18 | 'text-adaptor.c', 19 | 'value-adaptor.c', 20 | ] 21 | 22 | libatk_bridge_adaptors = static_library('atk-bridge-adaptors', source, 23 | include_directories: [ 24 | root_inc, 25 | include_directories('..'), 26 | ], 27 | dependencies: [ libdbus_dep, atspi_dep, libatk_dep ]) 28 | 29 | libatk_bridge_adaptors_dep = declare_dependency(link_with: libatk_bridge_adaptors, 30 | dependencies: [ libdbus_dep, atspi_dep, libatk_dep ], 31 | include_directories: include_directories('.')) 32 | -------------------------------------------------------------------------------- /atk-adaptor/atk-bridge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002, 2003 Sun Microsystems Inc., 6 | * Copyright 2001, 2002, 2003 Ximian, Inc. 7 | * Copyright 2008, 2009, 2010 Codethink Ltd. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef ATK_BRIDGE_H 26 | #define ATK_BRIDGE_H 27 | 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | int atk_bridge_adaptor_init (int *argc, char **argv[]); 33 | void atk_bridge_adaptor_cleanup (void); 34 | void atk_bridge_set_event_context (GMainContext *cnx); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* ATK_BRIDGE_H */ 39 | -------------------------------------------------------------------------------- /atk-adaptor/atkbridge.symbols: -------------------------------------------------------------------------------- 1 | atk_bridge_adaptor_init 2 | atk_bridge_adaptor_cleanup 3 | atk_bridge_set_event_context 4 | -------------------------------------------------------------------------------- /atk-adaptor/bitarray.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008 Novell, Inc. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef _BITARRAY_H 24 | #define _BITARRAY_H 25 | 26 | #include "dbus/dbus.h" 27 | #include "glib.h" 28 | 29 | #define BITARRAY_SEQ_TERM 0xffffffff 30 | 31 | #define BITARRAY_SET(p, n) ((p)[n >> 5] |= (1 << (n & 31))) 32 | #endif /* _BITARRAY_H */ 33 | -------------------------------------------------------------------------------- /atk-adaptor/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * Copyright 2008, 2009 Codethink Ltd. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef EVENT_H 26 | #define EVENT_H 27 | 28 | void spi_atk_register_event_listeners (void); 29 | void spi_atk_deregister_event_listeners (void); 30 | void spi_atk_tidy_windows (void); 31 | 32 | gboolean spi_event_is_subtype (gchar **needle, gchar **haystack); 33 | 34 | extern GMainContext *spi_context; 35 | guint spi_idle_add (GSourceFunc function, gpointer data); 36 | guint spi_timeout_add_seconds (gint interval, GSourceFunc function, gpointer data); 37 | guint spi_timeout_add_full (gint priority, guint interval, GSourceFunc function, gpointer data, GDestroyNotify notify); 38 | #endif /* EVENT_H */ 39 | -------------------------------------------------------------------------------- /atk-adaptor/gtk-2.0/module.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008, 2009 Codethink Ltd. 6 | * Copyright 2001, 2002, 2003 Sun Microsystems Inc., 7 | * Copyright 2001, 2002, 2003 Ximian, Inc. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #define _GNU_SOURCE 26 | #include "config.h" 27 | 28 | #include 29 | #include 30 | 31 | /*---------------------------------------------------------------------------*/ 32 | 33 | int 34 | gtk_module_init (gint *argc, gchar **argv[]) 35 | { 36 | return atk_bridge_adaptor_init (argc, argv); 37 | } 38 | 39 | gchar * 40 | g_module_check_init (GModule *module) 41 | { 42 | g_module_make_resident (module); 43 | 44 | return NULL; 45 | } 46 | 47 | void 48 | gnome_accessibility_module_init (void) 49 | { 50 | atk_bridge_adaptor_init (NULL, NULL); 51 | 52 | if (g_getenv ("AT_SPI_DEBUG")) 53 | { 54 | g_print ("Atk Accessibility bridge initialized\n"); 55 | } 56 | } 57 | 58 | void 59 | gnome_accessibility_module_shutdown (void) 60 | { 61 | atk_bridge_adaptor_cleanup (); 62 | } 63 | -------------------------------------------------------------------------------- /atk-adaptor/meson.build: -------------------------------------------------------------------------------- 1 | subdir('adaptors') 2 | 3 | atk_bridge_sources = [ 4 | introspection_generated, 5 | 'accessible-leasing.c', 6 | 'accessible-cache.c', 7 | 'accessible-register.c', 8 | 'accessible-stateset.c', 9 | 'bridge.c', 10 | 'object.c', 11 | 'event.c', 12 | 'spi-dbus.c', 13 | ] 14 | 15 | install_headers([ 'atk-bridge.h' ], subdir: join_paths('at-spi2-atk', '2.0')) 16 | 17 | libatk_bridge = library('atk-bridge-2.0', atk_bridge_sources, 18 | include_directories: root_inc, 19 | dependencies: [ 20 | libatk_bridge_adaptors_dep, 21 | libdroute_dep, 22 | libdbus_dep, 23 | gmodule_dep, 24 | gobject_dep, 25 | libatk_dep, 26 | atspi_dep, 27 | ], 28 | version: atk_bridge_libversion, 29 | soversion: atk_bridge_soversion, 30 | install: true) 31 | 32 | libatk_bridge_dep = declare_dependency(link_with: libatk_bridge, 33 | include_directories: [ 34 | root_inc, 35 | include_directories('.') 36 | ]) 37 | 38 | if get_option('gtk2_atk_adaptor') 39 | atk_bridge_module = shared_module('atk-bridge', 'gtk-2.0/module.c', 40 | include_directories: root_inc, 41 | dependencies: [ 42 | libatk_bridge_dep, 43 | libdbus_dep, 44 | libatk_dep, 45 | atspi_dep, 46 | gmodule_dep, 47 | ], 48 | install: true, 49 | install_dir: join_paths(get_option('libdir'), 'gtk-2.0', 'modules')) 50 | endif 51 | 52 | pkgconfig = import('pkgconfig') 53 | pkgconfig.generate( 54 | name: 'atk-bridge-2.0', 55 | description: 'ATK/D-Bus Bridge', 56 | version: atk_bridge_version, 57 | libraries: libatk_bridge, 58 | requires_private: ['gobject-2.0', 'atspi-2'], 59 | filebase: 'atk-bridge-2.0', 60 | subdirs: 'at-spi2-atk/2.0', 61 | install_dir: join_paths(get_option('libdir'), 'pkgconfig'), 62 | ) 63 | -------------------------------------------------------------------------------- /atk-adaptor/object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008 Novell, Inc. 6 | * Copyright 2008, 2009, 2010 Codethink Ltd. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef ACCESSIBLE_OBJECT_H 25 | #define ACCESSIBLE_OBJECT_H 26 | 27 | #include 28 | #include 29 | 30 | void 31 | spi_object_lease_if_needed (GObject *obj); 32 | 33 | void 34 | spi_object_append_reference (DBusMessageIter *iter, AtkObject *obj); 35 | 36 | void 37 | spi_hyperlink_append_reference (DBusMessageIter *iter, AtkObject *obj); 38 | 39 | void 40 | spi_object_append_v_reference (DBusMessageIter *iter, AtkObject *obj); 41 | 42 | void 43 | spi_object_append_desktop_reference (DBusMessageIter *iter); 44 | 45 | void 46 | spi_object_append_null_reference (DBusMessageIter *iter); 47 | 48 | DBusMessage * 49 | spi_object_return_reference (DBusMessage *msg, AtkObject *obj); 50 | 51 | DBusMessage * 52 | spi_hyperlink_return_reference (DBusMessage *msg, AtkHyperlink *obj); 53 | 54 | void 55 | spi_object_append_interfaces (DBusMessageIter *iter, AtkObject *obj); 56 | 57 | void 58 | spi_object_append_attribute_set (DBusMessageIter *iter, AtkAttributeSet *attr); 59 | 60 | AtspiRole 61 | spi_accessible_role_from_atk_role (AtkRole role); 62 | 63 | #endif /* ACCESSIBLE_OBJECT_H */ 64 | -------------------------------------------------------------------------------- /atk-adaptor/spi-dbus.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef SPI_DBUS_H_ 25 | #define SPI_DBUS_H_ 26 | 27 | #include 28 | #include 29 | 30 | #define DBG(a, b) \ 31 | if (_dbg >= (a)) \ 32 | b 33 | 34 | extern int _dbg; 35 | 36 | #define SPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry" 37 | #define SPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry" 38 | #define SPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry" 39 | 40 | #define SPI_DBUS_PATH_NULL "/org/a11y/atspi/null" 41 | #define SPI_DBUS_PATH_ROOT "/org/a11y/atspi/accessible/root" 42 | 43 | DBusMessage *spi_dbus_general_error (DBusMessage *message); 44 | DBusMessage *spi_dbus_return_rect (DBusMessage *message, gint ix, gint iy, gint iwidth, gint iheight); 45 | 46 | dbus_bool_t spi_dbus_message_iter_get_struct (DBusMessageIter *iter, ...); 47 | dbus_bool_t spi_dbus_message_iter_append_struct (DBusMessageIter *iter, ...); 48 | dbus_bool_t spi_dbus_marshal_deviceEvent (DBusMessage *message, const AtspiDeviceEvent *e); 49 | dbus_bool_t spi_dbus_demarshal_deviceEvent (DBusMessage *message, AtspiDeviceEvent *e); 50 | void spi_dbus_emit_signal (DBusConnection *bus, const char *path, const char *klass, const char *major, const char *minor, dbus_int32_t detail1, dbus_int32_t detail2, const char *type, const void *val); 51 | GObject *spi_dbus_get_object_from_iter (DBusMessageIter *iter); 52 | /* 53 | void spi_dbus_add_disconnect_match (DBusConnection *bus, const char *name); 54 | void spi_dbus_remove_disconnect_match (DBusConnection *bus, const char *name); 55 | 56 | */ 57 | 58 | #endif /* SPI_DBUS_H_ */ 59 | -------------------------------------------------------------------------------- /atk/.gitignore: -------------------------------------------------------------------------------- 1 | /.deps 2 | /.libs 3 | 4 | /atk-enum-types.c 5 | /atk-enum-types.h 6 | /atk.rc 7 | /atkmarshal.c 8 | /atkmarshal.h 9 | /s-enum-types-c 10 | /s-enum-types-h 11 | /stamp-atkmarshal.c 12 | /stamp-atkmarshal.h 13 | -------------------------------------------------------------------------------- /atk/atk-enum-types.c.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #include "config.h" 3 | 4 | #include 5 | 6 | /*** END file-header ***/ 7 | 8 | /*** BEGIN file-production ***/ 9 | 10 | /* enumerations from "@basename@" */ 11 | /*** END file-production ***/ 12 | 13 | /*** BEGIN value-header ***/ 14 | 15 | GType 16 | @enum_name@_get_type (void) 17 | { 18 | static gsize g_define_type_id__volatile; 19 | 20 | if (g_once_init_enter (&g_define_type_id__volatile)) 21 | { 22 | static const G@Type@Value values[] = { 23 | /*** END value-header ***/ 24 | 25 | /*** BEGIN value-production ***/ 26 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, 27 | /*** END value-production ***/ 28 | 29 | /*** BEGIN value-tail ***/ 30 | { 0, NULL, NULL } 31 | }; 32 | GType g_define_type_id = 33 | g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); 34 | g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); 35 | } 36 | return g_define_type_id__volatile; 37 | } 38 | /*** END value-tail ***/ 39 | -------------------------------------------------------------------------------- /atk/atk-enum-types.h.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION) 3 | #error "Only can be included directly." 4 | #endif 5 | 6 | #ifndef __ATK_ENUM_TYPES_H__ 7 | #define __ATK_ENUM_TYPES_H__ 8 | 9 | #include 10 | #include 11 | 12 | G_BEGIN_DECLS 13 | /*** END file-header ***/ 14 | 15 | /*** BEGIN file-production ***/ 16 | 17 | /* enumerations from "@basename@" */ 18 | /*** END file-production ***/ 19 | 20 | /*** BEGIN value-header ***/ 21 | ATK_AVAILABLE_IN_ALL 22 | GType @enum_name@_get_type (void); 23 | #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) 24 | /*** END value-header ***/ 25 | 26 | /*** BEGIN file-tail ***/ 27 | G_END_DECLS 28 | 29 | #endif /* __ATK_ENUM_TYPES_H__ */ 30 | /*** END file-tail ***/ 31 | -------------------------------------------------------------------------------- /atk/atk.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright 2001 Sun Microsystems Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef __ATK_H__ 21 | #define __ATK_H__ 22 | 23 | #define __ATK_H_INSIDE__ 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | 59 | #include 60 | 61 | #undef __ATK_H_INSIDE__ 62 | 63 | #endif /* __ATK_H__ */ 64 | -------------------------------------------------------------------------------- /atk/atk.rc.in: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | VS_VERSION_INFO VERSIONINFO 4 | FILEVERSION @ATK_MAJOR_VERSION@,@ATK_MINOR_VERSION@,@ATK_MICRO_VERSION@,0 5 | PRODUCTVERSION @ATK_MAJOR_VERSION@,@ATK_MINOR_VERSION@,@ATK_MICRO_VERSION@,0 6 | FILEFLAGSMASK 0 7 | FILEFLAGS 0 8 | FILEOS VOS__WINDOWS32 9 | FILETYPE VFT_DLL 10 | FILESUBTYPE VFT2_UNKNOWN 11 | BEGIN 12 | BLOCK "StringFileInfo" 13 | BEGIN 14 | BLOCK "040904B0" 15 | BEGIN 16 | VALUE "CompanyName", "Sun Microsystems Inc." 17 | VALUE "FileDescription", "atk" 18 | VALUE "FileVersion", "@ATK_VERSION@.0" 19 | VALUE "InternalName", "libatk-1.0-@LT_CURRENT_MINUS_AGE@" 20 | VALUE "LegalCopyright", "Copyright Sun Microsystems Inc." 21 | VALUE "OriginalFilename", "libatk-1.0-@LT_CURRENT_MINUS_AGE@.dll" 22 | VALUE "ProductName", "atk" 23 | VALUE "ProductVersion", "@ATK_VERSION@" 24 | END 25 | END 26 | BLOCK "VarFileInfo" 27 | BEGIN 28 | VALUE "Translation", 0x409, 1200 29 | END 30 | END 31 | -------------------------------------------------------------------------------- /atk/atkmarshal.list: -------------------------------------------------------------------------------- 1 | # see glib-genmarshal(1) for a detailed description of the file format, 2 | # possible parameter types are: 3 | # VOID indicates no return type, or no extra 4 | # parameters. if VOID is used as the parameter 5 | # list, no additional parameters may be present. 6 | # BOOLEAN for boolean types (gboolean) 7 | # CHAR for signed char types (gchar) 8 | # UCHAR for unsigned char types (guchar) 9 | # INT for signed integer types (gint) 10 | # UINT for unsigned integer types (guint) 11 | # LONG for signed long integer types (glong) 12 | # ULONG for unsigned long integer types (gulong) 13 | # ENUM for enumeration types (gint) 14 | # FLAGS for flag enumeration types (guint) 15 | # FLOAT for single-precision float types (gfloat) 16 | # DOUBLE for double-precision float types (gdouble) 17 | # STRING for string types (gchar*) 18 | # PARAM for GParamSpec or derived types (GParamSpec*) 19 | # BOXED for boxed (anonymous but reference counted) types (GBoxed*) 20 | # POINTER for anonymous pointer types (gpointer) 21 | # OBJECT for GObject or derived types (GObject*) 22 | # NONE deprecated alias for VOID 23 | # BOOL deprecated alias for BOOLEAN 24 | 25 | VOID:INT,INT 26 | VOID:INT,INT,STRING 27 | VOID:INT,INT,INT,STRING 28 | VOID:STRING,BOOLEAN 29 | VOID:DOUBLE,STRING 30 | VOID:STRING,INT 31 | VOID:STRING,STRING 32 | -------------------------------------------------------------------------------- /atk/atknoopobject.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright 2001 Sun Microsystems Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 21 | #error "Only can be included directly." 22 | #endif 23 | 24 | #include 25 | 26 | #ifndef __ATK_NO_OP_OBJECT_H__ 27 | #define __ATK_NO_OP_OBJECT_H__ 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define ATK_TYPE_NO_OP_OBJECT (atk_no_op_object_get_type ()) 32 | #define ATK_NO_OP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_NO_OP_OBJECT, AtkNoOpObject)) 33 | #define ATK_NO_OP_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_NO_OP_OBJECT, AtkNoOpObjectClass)) 34 | #define ATK_IS_NO_OP_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_NO_OP_OBJECT)) 35 | #define ATK_IS_NO_OP_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_NO_OP_OBJECT)) 36 | #define ATK_NO_OP_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_NO_OP_OBJECT, AtkNoOpObjectClass)) 37 | 38 | typedef struct _AtkNoOpObject AtkNoOpObject; 39 | typedef struct _AtkNoOpObjectClass AtkNoOpObjectClass; 40 | 41 | struct _AtkNoOpObject 42 | { 43 | AtkObject parent; 44 | }; 45 | 46 | ATK_AVAILABLE_IN_ALL 47 | GType atk_no_op_object_get_type (void); 48 | 49 | struct _AtkNoOpObjectClass 50 | { 51 | AtkObjectClass parent_class; 52 | }; 53 | 54 | ATK_AVAILABLE_IN_ALL 55 | AtkObject *atk_no_op_object_new (GObject *obj); 56 | 57 | G_END_DECLS 58 | 59 | #endif /* __ATK_NO_OP_OBJECT_H__ */ 60 | -------------------------------------------------------------------------------- /atk/atknoopobjectfactory.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright 2001 Sun Microsystems Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef __ATK_NO_OP_OBJECT_FACTORY_H__ 21 | #define __ATK_NO_OP_OBJECT_FACTORY_H__ 22 | 23 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 24 | #error "Only can be included directly." 25 | #endif 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define ATK_TYPE_NO_OP_OBJECT_FACTORY (atk_no_op_object_factory_get_type ()) 32 | #define ATK_NO_OP_OBJECT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_NO_OP_OBJECT_FACTORY, AtkNoOpObjectFactory)) 33 | #define ATK_NO_OP_OBJECT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_NO_OP_OBJECT_FACTORY, AtkNoOpObjectFactoryClass)) 34 | #define ATK_IS_NO_OP_OBJECT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_NO_OP_OBJECT_FACTORY)) 35 | #define ATK_IS_NO_OP_OBJECT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_NO_OP_OBJECT_FACTORY)) 36 | #define ATK_NO_OP_OBJECT_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_NO_OP_OBJECT_FACTORY, AtkNoOpObjectFactoryClass)) 37 | 38 | typedef struct _AtkNoOpObjectFactory AtkNoOpObjectFactory; 39 | typedef struct _AtkNoOpObjectFactoryClass AtkNoOpObjectFactoryClass; 40 | 41 | struct _AtkNoOpObjectFactory 42 | { 43 | AtkObjectFactory parent; 44 | }; 45 | 46 | struct _AtkNoOpObjectFactoryClass 47 | { 48 | AtkObjectFactoryClass parent_class; 49 | }; 50 | 51 | ATK_AVAILABLE_IN_ALL 52 | GType atk_no_op_object_factory_get_type (void); 53 | 54 | ATK_AVAILABLE_IN_ALL 55 | AtkObjectFactory *atk_no_op_object_factory_new (void); 56 | 57 | G_END_DECLS 58 | 59 | #endif /* __ATK_NO_OP_OBJECT_FACTORY_H__ */ 60 | -------------------------------------------------------------------------------- /atk/atkplug.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright 2009 Novell, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef __ATK_PLUG_H__ 21 | #define __ATK_PLUG_H__ 22 | 23 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 24 | #error "Only can be included directly." 25 | #endif 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define ATK_TYPE_PLUG (atk_plug_get_type ()) 32 | #define ATK_PLUG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_PLUG, AtkPlug)) 33 | #define ATK_IS_PLUG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_PLUG)) 34 | #define ATK_PLUG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_PLUG, AtkPlugClass)) 35 | #define ATK_IS_PLUG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_PLUG)) 36 | #define ATK_PLUG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_PLUG, AtkPlugClass)) 37 | 38 | typedef struct _AtkPlug AtkPlug; 39 | typedef struct _AtkPlugClass AtkPlugClass; 40 | 41 | struct _AtkPlug 42 | { 43 | AtkObject parent; 44 | }; 45 | 46 | ATK_AVAILABLE_IN_ALL 47 | GType atk_plug_get_type (void); 48 | 49 | struct _AtkPlugClass 50 | { 51 | AtkObjectClass parent_class; 52 | 53 | /* to be subscribed to by atk-bridge */ 54 | 55 | /*< protected >*/ 56 | gchar *(*get_object_id) (AtkPlug *obj); 57 | }; 58 | 59 | ATK_AVAILABLE_IN_ALL 60 | AtkObject *atk_plug_new (void); 61 | ATK_AVAILABLE_IN_2_36 62 | void atk_plug_set_child (AtkPlug *plug, AtkObject *child); 63 | ATK_AVAILABLE_IN_ALL 64 | gchar *atk_plug_get_id (AtkPlug *plug); 65 | 66 | G_END_DECLS 67 | 68 | #endif /* __ATK_PLUG_H__ */ 69 | -------------------------------------------------------------------------------- /atk/atkprivate.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright (C) 2014 Igalia, S.L. 3 | * 4 | * Author: Alejandro Piñeiro Iglesias 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef __ATK_PRIVATE_H__ 23 | #define __ATK_PRIVATE_H__ 24 | 25 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 26 | #error "Only can be included directly." 27 | #endif 28 | 29 | G_BEGIN_DECLS 30 | 31 | void _gettext_initialization (void); 32 | void _compact_name (gchar *name); 33 | 34 | G_END_DECLS 35 | 36 | #endif /* __ATK_PRIVATE_H__ */ 37 | -------------------------------------------------------------------------------- /atk/atkrange.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright 2014 Igalia S.L. 3 | * 4 | * Author: Alejandro Piñeiro Iglesias 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | #ifndef __ATK_RANGE_H__ 22 | #define __ATK_RANGE_H__ 23 | 24 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 25 | #error "Only can be included directly." 26 | #endif 27 | 28 | #include 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | #define ATK_TYPE_RANGE (atk_range_get_type ()) 34 | 35 | typedef struct _AtkRange AtkRange; 36 | 37 | /* AtkRange methods */ 38 | ATK_AVAILABLE_IN_2_12 39 | GType atk_range_get_type (void); 40 | 41 | ATK_AVAILABLE_IN_2_12 42 | AtkRange *atk_range_copy (AtkRange *src); 43 | ATK_AVAILABLE_IN_2_12 44 | void atk_range_free (AtkRange *range); 45 | 46 | ATK_AVAILABLE_IN_2_12 47 | gdouble atk_range_get_lower_limit (AtkRange *range); 48 | ATK_AVAILABLE_IN_2_12 49 | gdouble atk_range_get_upper_limit (AtkRange *range); 50 | ATK_AVAILABLE_IN_2_12 51 | const gchar *atk_range_get_description (AtkRange *range); 52 | ATK_AVAILABLE_IN_2_12 53 | AtkRange *atk_range_new (gdouble lower_limit, 54 | gdouble upper_limit, 55 | const gchar *description); 56 | 57 | G_END_DECLS 58 | 59 | #endif /* __ATK_RANGE_H__ */ 60 | -------------------------------------------------------------------------------- /atk/atksocket.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright 2009 Novell, Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef __ATK_SOCKET_H__ 21 | #define __ATK_SOCKET_H__ 22 | 23 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 24 | #error "Only can be included directly." 25 | #endif 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define ATK_TYPE_SOCKET (atk_socket_get_type ()) 32 | #define ATK_SOCKET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_SOCKET, AtkSocket)) 33 | #define ATK_IS_SOCKET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_SOCKET)) 34 | #define ATK_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_SOCKET, AtkSocketClass)) 35 | #define ATK_IS_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_SOCKET)) 36 | #define ATK_SOCKET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_SOCKET, AtkSocketClass)) 37 | 38 | typedef struct _AtkSocket AtkSocket; 39 | typedef struct _AtkSocketClass AtkSocketClass; 40 | 41 | struct _AtkSocket 42 | { 43 | AtkObject parent; 44 | 45 | /*< private >*/ 46 | gchar *embedded_plug_id; 47 | }; 48 | 49 | ATK_AVAILABLE_IN_ALL 50 | GType atk_socket_get_type (void); 51 | 52 | struct _AtkSocketClass 53 | { 54 | AtkObjectClass parent_class; 55 | 56 | /* to be subscribed to by atk-bridge */ 57 | 58 | /*< protected >*/ 59 | void (*embed) (AtkSocket *obj, const gchar *plug_id); 60 | }; 61 | 62 | ATK_AVAILABLE_IN_ALL 63 | AtkObject *atk_socket_new (void); 64 | ATK_AVAILABLE_IN_ALL 65 | void atk_socket_embed (AtkSocket *obj, const gchar *plug_id); 66 | ATK_AVAILABLE_IN_ALL 67 | gboolean atk_socket_is_occupied (AtkSocket *obj); 68 | 69 | G_END_DECLS 70 | 71 | #endif /* __ATK_SOCKET_H__ */ 72 | -------------------------------------------------------------------------------- /atk/atkwindow.h: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | #ifndef __ATK_WINDOW_H__ 21 | #define __ATK_WINDOW_H__ 22 | 23 | #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION) 24 | #error "Only can be included directly." 25 | #endif 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | /* 32 | * AtkWindow describes signals pertaining to on-screen windows. 33 | */ 34 | 35 | #define ATK_TYPE_WINDOW (atk_window_get_type ()) 36 | #define ATK_IS_WINDOW(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_WINDOW) 37 | #define ATK_WINDOW(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_WINDOW, AtkWindow) 38 | #define ATK_WINDOW_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_WINDOW, AtkWindowIface)) 39 | 40 | typedef struct _AtkWindow AtkWindow; /* Dummy typedef */ 41 | typedef struct _AtkWindowIface AtkWindowIface; 42 | 43 | struct _AtkWindowIface 44 | { 45 | GTypeInterface parent; 46 | }; 47 | 48 | ATK_AVAILABLE_IN_2_2 49 | GType atk_window_get_type (void); 50 | G_END_DECLS 51 | 52 | #endif /* __ATK_WINDOW_H__ */ 53 | -------------------------------------------------------------------------------- /atspi/atspi-accessible-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_ACCESSIBLE_PRIVATE_H_ 27 | #define _ATSPI_ACCESSIBLE_PRIVATE_H_ 28 | 29 | #include 30 | 31 | #include "atspi-accessible.h" 32 | #include "atspimarshal.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | struct _AtspiAccessiblePrivate 37 | { 38 | GHashTable *cache; 39 | guint cache_ref_count; 40 | guint iteration_stamp; 41 | }; 42 | 43 | GHashTable * 44 | _atspi_accessible_ref_cache (AtspiAccessible *accessible); 45 | 46 | void 47 | _atspi_accessible_unref_cache (AtspiAccessible *accessible); 48 | G_END_DECLS 49 | 50 | #endif /* _ATSPI_ACCESSIBLE_H_ */ 51 | -------------------------------------------------------------------------------- /atspi/atspi-action.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef _ATSPI_ACTION_H_ 26 | #define _ATSPI_ACTION_H_ 27 | 28 | #include "glib-object.h" 29 | 30 | #include "atspi-constants.h" 31 | 32 | #include "atspi-types.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | #define ATSPI_TYPE_ACTION (atspi_action_get_type ()) 37 | #define ATSPI_IS_ACTION(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_ACTION) 38 | #define ATSPI_ACTION(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_ACTION, AtspiAction) 39 | #define ATSPI_ACTION_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_ACTION, AtspiAction)) 40 | 41 | GType atspi_action_get_type (); 42 | 43 | struct _AtspiAction 44 | { 45 | GTypeInterface parent; 46 | }; 47 | 48 | gchar *atspi_action_get_action_description (AtspiAction *obj, int i, GError **error); 49 | 50 | gchar *atspi_action_get_action_name (AtspiAction *obj, gint i, GError **error); 51 | 52 | gint atspi_action_get_n_actions (AtspiAction *obj, GError **error); 53 | 54 | gchar *atspi_action_get_key_binding (AtspiAction *obj, gint i, GError **error); 55 | 56 | gchar *atspi_action_get_localized_name (AtspiAction *obj, gint i, GError **error); 57 | 58 | gboolean atspi_action_do_action (AtspiAction *obj, gint i, GError **error); 59 | 60 | #ifndef ATSPI_DISABLE_DEPRECATED 61 | gchar *atspi_action_get_description (AtspiAction *obj, gint i, GError **error); 62 | gchar *atspi_action_get_name (AtspiAction *obj, gint i, GError **error); 63 | #endif 64 | G_END_DECLS 65 | 66 | #endif /* _ATSPI_ACTION_H_ */ 67 | -------------------------------------------------------------------------------- /atspi/atspi-device-a11y-manager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2024 Red Hat 6 | * 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #pragma once 25 | #include "glib-object.h" 26 | 27 | #include "atspi-device.h" 28 | #include "atspi-types.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define ATSPI_DEVICE_A11Y_MANAGER_VIRTUAL_MOD_START 15 /* To avoid the clash with ATSPI_MODIFIER_NUMLOCK */ 33 | #define ATSPI_DEVICE_A11Y_MANAGER_VIRTUAL_MOD_END 31 34 | 35 | #define ATSPI_TYPE_DEVICE_A11Y_MANAGER (atspi_device_a11y_manager_get_type ()) 36 | G_DECLARE_FINAL_TYPE (AtspiDeviceA11yManager, atspi_device_a11y_manager, ATSPI, DEVICE_A11Y_MANAGER, AtspiDevice) 37 | 38 | AtspiDeviceA11yManager *atspi_device_a11y_manager_try_new (); 39 | 40 | AtspiDeviceA11yManager *atspi_device_a11y_manager_try_new_full (const gchar *app_id); 41 | 42 | G_END_DECLS 43 | -------------------------------------------------------------------------------- /atspi/atspi-device-legacy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2020 SUSE LLC. 6 | * 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef _ATSPI_DEVICE_LEGACY_H_ 25 | #define _ATSPI_DEVICE_LEGACY_H_ 26 | 27 | #include "glib-object.h" 28 | 29 | #include "atspi-device.h" 30 | #include "atspi-types.h" 31 | 32 | G_BEGIN_DECLS 33 | 34 | #define ATSPI_TYPE_DEVICE_LEGACY (atspi_device_legacy_get_type ()) 35 | #define ATSPI_DEVICE_LEGACY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_DEVICE_LEGACY, AtspiDeviceLegacy)) 36 | #define ATSPI_DEVICE_LEGACY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_DEVICE_LEGACY, AtspiDeviceLegacyClass)) 37 | #define ATSPI_IS_DEVICE_LEGACY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_DEVICE_LEGACY)) 38 | #define ATSPI_IS_DEVICE_LEGACY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_DEVICE_LEGACY)) 39 | #define ATSPI_DEVICE_LEGACY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_DEVICE_LEGACY, AtspiDeviceLegacyClass)) 40 | 41 | typedef struct _AtspiDeviceLegacy AtspiDeviceLegacy; 42 | struct _AtspiDeviceLegacy 43 | { 44 | AtspiDevice parent; 45 | }; 46 | 47 | typedef struct _AtspiDeviceLegacyClass AtspiDeviceLegacyClass; 48 | struct _AtspiDeviceLegacyClass 49 | { 50 | AtspiDeviceClass parent_class; 51 | }; 52 | 53 | GType atspi_device_legacy_get_type (void); 54 | 55 | AtspiDeviceLegacy *atspi_device_legacy_new (); 56 | 57 | AtspiDeviceLegacy *atspi_device_legacy_new_full (const gchar *app_id); 58 | G_END_DECLS 59 | 60 | #endif /* _ATSPI_DEVICE_LEGACY_H_ */ 61 | -------------------------------------------------------------------------------- /atspi/atspi-device-listener-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef _ATSPI_DEVICE_LISTENER_PRIVATE_H_ 26 | #define _ATSPI_DEVICE_LISTENER_PRIVATE_H_ 27 | 28 | #include "atspi-device-listener.h" 29 | 30 | #include "dbus/dbus.h" 31 | 32 | G_BEGIN_DECLS 33 | 34 | DBusHandlerResult _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message); 35 | 36 | gchar *_atspi_device_listener_get_path (AtspiDeviceListener *listener); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* _ATSPI_DEVICE_LISTENER_H_ */ 41 | -------------------------------------------------------------------------------- /atspi/atspi-device-x11.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2020 SUSE LLC. 6 | * 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef _ATSPI_DEVICE_X11_H_ 25 | #define _ATSPI_DEVICE_X11_H_ 26 | 27 | #include "glib-object.h" 28 | 29 | #include "atspi-device.h" 30 | #include "atspi-types.h" 31 | 32 | G_BEGIN_DECLS 33 | 34 | #define ATSPI_TYPE_DEVICE_X11 (atspi_device_x11_get_type ()) 35 | #define ATSPI_DEVICE_X11(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_DEVICE_X11, AtspiDeviceX11)) 36 | #define ATSPI_DEVICE_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_DEVICE_X11, AtspiDeviceX11Class)) 37 | #define ATSPI_IS_DEVICE_X11(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_DEVICE_X11)) 38 | #define ATSPI_IS_DEVICE_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_DEVICE_X11)) 39 | #define ATSPI_DEVICE_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_DEVICE_X11, AtspiDeviceX11Class)) 40 | 41 | typedef struct _AtspiDeviceX11 AtspiDeviceX11; 42 | struct _AtspiDeviceX11 43 | { 44 | AtspiDevice parent; 45 | }; 46 | 47 | typedef struct _AtspiDeviceX11Class AtspiDeviceX11Class; 48 | struct _AtspiDeviceX11Class 49 | { 50 | AtspiDeviceClass parent_class; 51 | }; 52 | 53 | GType atspi_device_x11_get_type (void); 54 | 55 | AtspiDeviceX11 *atspi_device_x11_new (); 56 | 57 | AtspiDeviceX11 *atspi_device_x11_new_full (const gchar *app_id); 58 | G_END_DECLS 59 | 60 | #endif /* _ATSPI_DEVICE_X11_H_ */ 61 | -------------------------------------------------------------------------------- /atspi/atspi-enum-types.c.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #include "atspi-enum-types.h" 3 | 4 | /*** END file-header ***/ 5 | 6 | /*** BEGIN file-production ***/ 7 | /* enumerations from "@basename@" */ 8 | #include "@basename@" 9 | 10 | /*** END file-production ***/ 11 | 12 | /*** BEGIN value-header ***/ 13 | GType 14 | @enum_name@_get_type (void) 15 | { 16 | static GType the_type = 0; 17 | 18 | if (the_type == 0) 19 | { 20 | static const G@Type@Value values[] = { 21 | /*** END value-header ***/ 22 | 23 | /*** BEGIN value-production ***/ 24 | { @VALUENAME@, 25 | "@VALUENAME@", 26 | "@valuenick@" }, 27 | /*** END value-production ***/ 28 | 29 | /*** BEGIN value-tail ***/ 30 | { 0, NULL, NULL } 31 | }; 32 | the_type = g_@type@_register_static ( 33 | g_intern_static_string ("@EnumName@"), 34 | values); 35 | } 36 | return the_type; 37 | } 38 | 39 | /*** END value-tail ***/ 40 | -------------------------------------------------------------------------------- /atspi/atspi-enum-types.h.template: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #ifndef __ATSPI_ENUM_TYPES_H__ 3 | #define __ATSPI_ENUM_TYPES_H__ 4 | 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | /*** END file-header ***/ 10 | 11 | /*** BEGIN file-production ***/ 12 | /* Enumerations from "@basename@" */ 13 | 14 | /*** END file-production ***/ 15 | 16 | /*** BEGIN enumeration-production ***/ 17 | #define ATSPI_TYPE_@ENUMSHORT@ (@enum_name@_get_type()) 18 | GType @enum_name@_get_type (void) G_GNUC_CONST; 19 | 20 | /*** END enumeration-production ***/ 21 | 22 | /*** BEGIN file-tail ***/ 23 | G_END_DECLS 24 | 25 | #endif /* __ATSPI_ENUM_TYPES_H__ */ 26 | /*** END file-tail ***/ 27 | 28 | -------------------------------------------------------------------------------- /atspi/atspi-event-listener-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_EVENT_LISTENER_PRIVATE_H_ 27 | #define _ATSPI_EVENT_LISTENER_PRIVATE_H_ 28 | 29 | #include "atspi-event-listener.h" 30 | 31 | #include "dbus/dbus.h" 32 | 33 | G_BEGIN_DECLS 34 | 35 | void _atspi_send_event (AtspiEvent *e); 36 | 37 | void _atspi_dbus_handle_event (DBusMessage *message); 38 | void _atspi_reregister_event_listeners (); 39 | 40 | G_END_DECLS 41 | 42 | #endif /* _ATSPI_EVENT_LISTENER_H_ */ 43 | -------------------------------------------------------------------------------- /atspi/atspi-gmain.h: -------------------------------------------------------------------------------- 1 | /* -*- mode: C; c-file-style: "gnu" -*- */ 2 | /* atspi-gmain.h atspi dbus gmain prototypes 3 | * 4 | * Licensed under the Academic Free License version 2.1 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * This file is based on dbus-gmain.c from dbus-glib with functions renamed 21 | * and unnecessary code removed. 22 | */ 23 | 24 | #ifndef _ATSPI_GMAIN_H 25 | #define _ATSPI_GMAIN_H 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | void 33 | atspi_dbus_connection_setup_with_g_main (DBusConnection *connection, 34 | GMainContext *context); 35 | 36 | void 37 | atspi_dbus_server_setup_with_g_main (DBusServer *server, 38 | GMainContext *context); 39 | 40 | G_END_DECLS 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /atspi/atspi-hypertext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_HYPERTEXT_H_ 27 | #define _ATSPI_HYPERTEXT_H_ 28 | 29 | #include "glib-object.h" 30 | 31 | #include "atspi-constants.h" 32 | 33 | #include "atspi-types.h" 34 | 35 | G_BEGIN_DECLS 36 | 37 | #define ATSPI_TYPE_HYPERTEXT (atspi_hypertext_get_type ()) 38 | #define ATSPI_IS_HYPERTEXT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_HYPERTEXT) 39 | #define ATSPI_HYPERTEXT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_HYPERTEXT, AtspiHypertext) 40 | #define ATSPI_HYPERTEXT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_HYPERTEXT, AtspiHypertext)) 41 | 42 | GType atspi_hypertext_get_type (); 43 | 44 | struct _AtspiHypertext 45 | { 46 | GTypeInterface parent; 47 | }; 48 | 49 | gint atspi_hypertext_get_n_links (AtspiHypertext *obj, GError **error); 50 | 51 | AtspiHyperlink *atspi_hypertext_get_link (AtspiHypertext *obj, gint link_index, GError **error); 52 | 53 | gint atspi_hypertext_get_link_index (AtspiHypertext *obj, gint character_offset, GError **error); 54 | 55 | G_END_DECLS 56 | 57 | #endif /* _ATSPI_HYPERTEXT_H_ */ 58 | -------------------------------------------------------------------------------- /atspi/atspi-image.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_IMAGE_H_ 27 | #define _ATSPI_IMAGE_H_ 28 | 29 | #include "glib-object.h" 30 | 31 | #include "atspi-constants.h" 32 | 33 | #include "atspi-types.h" 34 | 35 | G_BEGIN_DECLS 36 | 37 | #define ATSPI_TYPE_IMAGE (atspi_image_get_type ()) 38 | #define ATSPI_IS_IMAGE(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_IMAGE) 39 | #define ATSPI_IMAGE(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_IMAGE, AtspiImage) 40 | #define ATSPI_IMAGE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_IMAGE, AtspiImage)) 41 | 42 | GType atspi_image_get_type (); 43 | 44 | struct _AtspiImage 45 | { 46 | GTypeInterface parent; 47 | }; 48 | 49 | gchar *atspi_image_get_image_description (AtspiImage *obj, GError **error); 50 | 51 | AtspiPoint *atspi_image_get_image_size (AtspiImage *obj, GError **error); 52 | 53 | AtspiPoint *atspi_image_get_image_position (AtspiImage *obj, AtspiCoordType ctype, GError **error); 54 | 55 | AtspiRect *atspi_image_get_image_extents (AtspiImage *obj, AtspiCoordType ctype, GError **error); 56 | 57 | gchar *atspi_image_get_image_locale (AtspiImage *obj, GError **error); 58 | 59 | G_END_DECLS 60 | 61 | #endif /* _ATSPI_IMAGE_H_ */ 62 | -------------------------------------------------------------------------------- /atspi/atspi-matchrule-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_MATCH_RULE_PRIVATE_H_ 27 | #define _ATSPI_MATCH_RULE_PRIVATE_H_ 28 | 29 | #include "glib-object.h" 30 | 31 | #include "atspi-matchrule.h" 32 | #include "dbus/dbus.h" 33 | 34 | G_BEGIN_DECLS 35 | 36 | gboolean 37 | _atspi_match_rule_marshal (AtspiMatchRule *rule, DBusMessageIter *iter); 38 | 39 | G_END_DECLS 40 | 41 | #endif /* _ATSPI_MATCH_RULE_PRIVATE_H_ */ 42 | -------------------------------------------------------------------------------- /atspi/atspi-misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_MISC_H_ 27 | #define _ATSPI_MISC_H_ 28 | 29 | G_BEGIN_DECLS 30 | 31 | int atspi_init (void); 32 | gboolean atspi_is_initialized (void); 33 | 34 | void atspi_event_main (); 35 | 36 | void atspi_event_quit (); 37 | 38 | int atspi_exit (); 39 | 40 | DBusConnection * 41 | atspi_get_a11y_bus (); 42 | 43 | void 44 | atspi_set_timeout (gint val, gint startup_time); 45 | 46 | void 47 | atspi_set_main_context (GMainContext *cnx); 48 | 49 | gchar *atspi_role_get_name (AtspiRole role); 50 | 51 | gchar *atspi_role_get_localized_name (AtspiRole role); 52 | 53 | void atspi_get_version (gint *major, gint *minor, gint *micro); 54 | G_END_DECLS 55 | 56 | #endif /* _ATSPI_MISC_H_ */ 57 | -------------------------------------------------------------------------------- /atspi/atspi-object.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #include "atspi-private.h" 25 | 26 | G_DEFINE_TYPE (AtspiObject, atspi_object, G_TYPE_OBJECT) 27 | 28 | static void 29 | atspi_object_init (AtspiObject *obj) 30 | { 31 | } 32 | 33 | static void 34 | atspi_object_dispose (GObject *object) 35 | { 36 | AtspiObject *aobj = ATSPI_OBJECT (object); 37 | 38 | if (aobj->app) 39 | { 40 | g_object_unref (aobj->app); 41 | aobj->app = NULL; 42 | } 43 | 44 | G_OBJECT_CLASS (atspi_object_parent_class)->dispose (object); 45 | } 46 | 47 | static void 48 | atspi_object_finalize (GObject *object) 49 | { 50 | AtspiObject *aobj = ATSPI_OBJECT (object); 51 | 52 | g_free (aobj->path); 53 | 54 | G_OBJECT_CLASS (atspi_object_parent_class)->finalize (object); 55 | } 56 | 57 | static void 58 | atspi_object_class_init (AtspiObjectClass *klass) 59 | { 60 | GObjectClass *object_class = G_OBJECT_CLASS (klass); 61 | 62 | object_class->dispose = atspi_object_dispose; 63 | object_class->finalize = atspi_object_finalize; 64 | } 65 | -------------------------------------------------------------------------------- /atspi/atspi-object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef _ATSPI_OBJECT_H_ 26 | #define _ATSPI_OBJECT_H_ 27 | 28 | #include "glib-object.h" 29 | 30 | #include "atspi-application.h" 31 | #include "atspi-types.h" 32 | 33 | G_BEGIN_DECLS 34 | 35 | #define ATSPI_TYPE_OBJECT (atspi_object_get_type ()) 36 | #define ATSPI_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_OBJECT, AtspiObject)) 37 | #define ATSPI_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATSPI_TYPE_OBJECT, AtspiObjectClass)) 38 | #define ATSPI_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_OBJECT)) 39 | #define ATSPI_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATSPI_TYPE_OBJECT)) 40 | #define ATSPI_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATSPI_TYPE_OBJECT, AtspiObjectClass)) 41 | 42 | typedef struct _AtspiObject AtspiObject; 43 | struct _AtspiObject 44 | { 45 | GObject parent; 46 | AtspiApplication *app; 47 | char *path; 48 | }; 49 | 50 | typedef struct _AtspiObjectClass AtspiObjectClass; 51 | struct _AtspiObjectClass 52 | { 53 | GObjectClass parent_class; 54 | }; 55 | 56 | GType atspi_object_get_type (void); 57 | 58 | G_END_DECLS 59 | 60 | #endif /* _ATSPI_OBJECT_H_ */ 61 | -------------------------------------------------------------------------------- /atspi/atspi-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef _ATSPI_PRIVATE_H_ 26 | #define _ATSPI_PRIVATE_H_ 27 | 28 | #include "atspi-device-listener-private.h" 29 | #include "atspi-event-listener-private.h" 30 | #include "atspi-matchrule-private.h" 31 | #include "atspi-misc-private.h" 32 | #include 33 | 34 | #include "glib/gi18n.h" 35 | 36 | #include "atspi-accessible-private.h" 37 | #include "atspi.h" 38 | 39 | G_BEGIN_DECLS 40 | void _atspi_reregister_device_listeners (); 41 | G_END_DECLS 42 | 43 | #endif /* _ATSPI_PRIVATE_H_ */ 44 | -------------------------------------------------------------------------------- /atspi/atspi-relation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_RELATION_H_ 27 | #define _ATSPI_RELATION_H_ 28 | 29 | #include "glib-object.h" 30 | 31 | #include "atspi-constants.h" 32 | 33 | G_BEGIN_DECLS 34 | 35 | #define ATSPI_TYPE_RELATION (atspi_relation_get_type ()) 36 | #define ATSPI_IS_RELATION(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_RELATION) 37 | #define ATSPI_RELATION(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_RELATION, AtspiRelation) 38 | #define ATSPI_RELATION_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_RELATION, AtspiRelation)) 39 | 40 | GType atspi_relation_get_type (); 41 | 42 | typedef struct _AtspiRelation AtspiRelation; 43 | struct _AtspiRelation 44 | { 45 | GObject parent; 46 | AtspiRelationType relation_type; 47 | GArray *targets; 48 | }; 49 | 50 | typedef struct _AtspiRelationClass AtspiRelationClass; 51 | struct _AtspiRelationClass 52 | { 53 | GObjectClass parent_class; 54 | }; 55 | 56 | AtspiRelationType atspi_relation_get_relation_type (AtspiRelation *obj); 57 | 58 | gint atspi_relation_get_n_targets (AtspiRelation *obj); 59 | 60 | AtspiAccessible *atspi_relation_get_target (AtspiRelation *obj, gint i); 61 | 62 | /* private */ 63 | AtspiRelation *_atspi_relation_new_from_iter (DBusMessageIter *iter); 64 | 65 | G_END_DECLS 66 | 67 | #endif /* _ATSPI_RELATION_H_ */ 68 | -------------------------------------------------------------------------------- /atspi/atspi-value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2002 Ximian, Inc. 6 | * 2002 Sun Microsystems Inc. 7 | * Copyright 2010, 2011 Novell, Inc. 8 | * 9 | * 10 | * This library is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU Lesser General Public 12 | * License as published by the Free Software Foundation; either 13 | * version 2.1 of the License, or (at your option) any later version. 14 | * 15 | * This library is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | * Lesser General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU Lesser General Public 21 | * License along with this library; if not, write to the 22 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | * Boston, MA 02110-1301, USA. 24 | */ 25 | 26 | #ifndef _ATSPI_VALUE_H_ 27 | #define _ATSPI_VALUE_H_ 28 | 29 | #include "glib-object.h" 30 | 31 | #include "atspi-constants.h" 32 | 33 | #include "atspi-types.h" 34 | 35 | G_BEGIN_DECLS 36 | 37 | #define ATSPI_TYPE_VALUE (atspi_value_get_type ()) 38 | #define ATSPI_IS_VALUE(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_VALUE) 39 | #define ATSPI_VALUE(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_VALUE, AtspiValue) 40 | #define ATSPI_VALUE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_VALUE, AtspiValue)) 41 | 42 | GType atspi_value_get_type (); 43 | 44 | struct _AtspiValue 45 | { 46 | GTypeInterface parent; 47 | }; 48 | 49 | gdouble atspi_value_get_minimum_value (AtspiValue *obj, GError **error); 50 | 51 | gdouble atspi_value_get_current_value (AtspiValue *obj, GError **error); 52 | 53 | gdouble atspi_value_get_maximum_value (AtspiValue *obj, GError **error); 54 | 55 | gboolean atspi_value_set_current_value (AtspiValue *obj, gdouble new_value, GError **error); 56 | 57 | gdouble atspi_value_get_minimum_increment (AtspiValue *obj, GError **error); 58 | 59 | gchar *atspi_value_get_text (AtspiValue *obj, GError **error); 60 | G_END_DECLS 61 | 62 | #endif /* _ATSPI_VALUE_H_ */ 63 | -------------------------------------------------------------------------------- /atspi/atspi-version.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2023 SUSE LLC. 6 | * 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef _ATSPI_VERSION_H_ 25 | #define _ATSPI_VERSION_H_ 26 | 27 | G_BEGIN_DECLS 28 | 29 | /** 30 | * ATSPI_MAJOR_VERSION: 31 | * 32 | * The major version of AT-SPI used at compile time. 33 | * 34 | * Since: 2.50.0 35 | */ 36 | #define ATSPI_MAJOR_VERSION (@ATSPI_MAJOR_VERSION@) 37 | 38 | /** 39 | * ATSPI_MINOR_VERSION: 40 | * 41 | * The minor version of AT-SPI used at compile time. 42 | * 43 | * Since: 2.50.0 44 | */ 45 | #define ATSPI_MINOR_VERSION (@ATSPI_MINOR_VERSION@) 46 | 47 | /** 48 | * ATSPI_MICRO_VERSION: 49 | * 50 | * The micro version / patch level of AT-SPI used at compile time. 51 | * 52 | * Since: 2.50.0 53 | */ 54 | #define ATSPI_MICRO_VERSION (@ATSPI_MICRO_VERSION@) 55 | 56 | G_END_DECLS 57 | 58 | #endif /* _ATSPI_VERSION_H_ */ 59 | -------------------------------------------------------------------------------- /atspi/atspi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef _ATSPI_H 25 | #define _ATSPI_H 26 | 27 | #include "glib.h" 28 | 29 | #include "atspi-accessible.h" 30 | #include "atspi-action.h" 31 | #include "atspi-collection.h" 32 | #include "atspi-component.h" 33 | #include "atspi-constants.h" 34 | #include "atspi-device-listener.h" 35 | #include "atspi-document.h" 36 | #include "atspi-editabletext.h" 37 | #include "atspi-event-listener.h" 38 | #include "atspi-hyperlink.h" 39 | #include "atspi-hypertext.h" 40 | #include "atspi-image.h" 41 | #include "atspi-matchrule.h" 42 | #include "atspi-misc.h" 43 | #include "atspi-registry.h" 44 | #include "atspi-relation.h" 45 | #include "atspi-selection.h" 46 | #include "atspi-stateset.h" 47 | #include "atspi-table-cell.h" 48 | #include "atspi-table.h" 49 | #include "atspi-text.h" 50 | #include "atspi-types.h" 51 | #include "atspi-value.h" 52 | 53 | #include "atspi-gmain.h" 54 | 55 | #include "atspi-enum-types.h" 56 | 57 | #include "atspi-version.h" 58 | #endif 59 | -------------------------------------------------------------------------------- /atspi/atspimarshal.list: -------------------------------------------------------------------------------- 1 | # see glib-genmarshal(1) for a detailed description of the file format, 2 | # possible parameter types are: 3 | # VOID indicates no return type, or no extra 4 | # parameters. if VOID is used as the parameter 5 | # list, no additional parameters may be present. 6 | # BOOLEAN for boolean types (gboolean) 7 | # CHAR for signed char types (gchar) 8 | # UCHAR for unsigned char types (guchar) 9 | # INT for signed integer types (gint) 10 | # UINT for unsigned integer types (guint) 11 | # LONG for signed long integer types (glong) 12 | # ULONG for unsigned long integer types (gulong) 13 | # ENUM for enumeration types (gint) 14 | # FLAGS for flag enumeration types (guint) 15 | # FLOAT for single-precision float types (gfloat) 16 | # DOUBLE for double-precision float types (gdouble) 17 | # STRING for string types (gchar*) 18 | # PARAM for GParamSpec or derived types (GParamSpec*) 19 | # BOXED for boxed (anonymous but reference counted) types (GBoxed*) 20 | # POINTER for anonymous pointer types (gpointer) 21 | # OBJECT for GObject or derived types (GObject*) 22 | # NONE deprecated alias for VOID 23 | # BOOL deprecated alias for BOOLEAN 24 | 25 | VOID:INT,INT 26 | VOID:INT,STRING 27 | -------------------------------------------------------------------------------- /bus/00-at-spi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Copy a11y bus address from the DBus session bus to the X11 root property. 4 | # This is useful when Xwayland is started on demand and if the user has an 5 | # application with X11 access that does not have access to the session bus. 6 | 7 | ADDR="$( busctl call --user org.a11y.Bus /org/a11y/bus org.a11y.Bus GetAddress )" || exit 0 8 | ADDR="$( echo $ADDR | sed 's/s "\(.*\)"/\1/' )" || exit 0 9 | 10 | exec xprop -root -format AT_SPI_BUS 8s -set AT_SPI_BUS "$ADDR" 11 | -------------------------------------------------------------------------------- /bus/accessibility.conf.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | accessibility 5 | 6 | @DATADIR@/dbus-1/accessibility-services 7 | EXTERNAL 8 | 9 | @SOCKET_ADDRESS@ 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 1000000000 26 | 1000000000 27 | 1000000000 28 | 120000 29 | 240000 30 | 100000 31 | 10000 32 | 100000 33 | 10000 34 | 50000 35 | 50000 36 | 50000 37 | 300000 38 | 39 | -------------------------------------------------------------------------------- /bus/at-spi-dbus-bus.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=AT-SPI D-Bus Bus 4 | Exec=@libexecdir@/at-spi-bus-launcher --launch-immediately 5 | OnlyShowIn=GNOME;Unity; 6 | NoDisplay=true 7 | AutostartCondition=GSettings org.gnome.desktop.interface toolkit-accessibility 8 | X-GNOME-AutoRestart=true 9 | X-GNOME-Autostart-Phase=Initialization 10 | -------------------------------------------------------------------------------- /bus/at-spi-dbus-bus.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Accessibility services bus 3 | PartOf=graphical-session.target 4 | 5 | [Service] 6 | Type=dbus 7 | BusName=org.a11y.Bus 8 | ExecStart=@libexecdir@/at-spi-bus-launcher 9 | Slice=session.slice 10 | TimeoutStopSec=5 11 | -------------------------------------------------------------------------------- /bus/org.a11y.Bus.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=org.a11y.Bus 3 | Exec=@libexecdir@/at-spi-bus-launcher 4 | SystemdService=at-spi-dbus-bus.service 5 | -------------------------------------------------------------------------------- /ci/README.md: -------------------------------------------------------------------------------- 1 | # Continuous Integration scripts for at-spi2-core 2 | 3 | Please see the general [documentation for at-spi2-core's Gitlab CI][ci-docs]. 4 | 5 | This directory contains scripts which get called during a run of a CI 6 | pipeline, and utilities to maintain the CI infrastructure. 7 | 8 | ## Scripts used during a run of a CI pipeline: 9 | 10 | * `container-builds.yml` - Gets included from the toplevel 11 | `.gitlab-ci.yml`; has the declarations to build each container image 12 | with the [Freedesktop CI Templates][ci-templates] machinery. 13 | 14 | * `run-tests.sh` - Runs the test suite and prints other diagnostics. 15 | 16 | * `gen-coverage.sh` - After the test suite is run, merges the various 17 | code coverage reports from `lcov`, and generates an HTML report. 18 | 19 | * `lcovrc` - Configuration file for `lcov`, used by `gen-coverage.sh`. 20 | Among other things, this tells `lcov` to exclude branch coverage for 21 | the unreachable branches of `g_return_if_fail()` and friends. 22 | 23 | * `run-style-check.sh` - Runs `clang-format-diff` to test for source 24 | files with inconsistent formatting, and uploads the resulting report 25 | to gitlab so it can be viewed as part of a merge request's analysis. 26 | 27 | * `search-common-ancestor.sh` - Utility used from 28 | `run-style-check.sh`; finds a git branch point from the current 29 | commit. 30 | 31 | [ci-docs]: ../devel-docs/gitlab-ci.md 32 | [ci-templates]: https://gitlab.freedesktop.org/freedesktop/ci-templates/ 33 | -------------------------------------------------------------------------------- /ci/address-sanitizer.supp: -------------------------------------------------------------------------------- 1 | # Leak in __dbus_pending_call_new_unlocked 2 | # https://gitlab.freedesktop.org/dbus/dbus/-/issues/326 3 | leak:libdbus 4 | 5 | 6 | -------------------------------------------------------------------------------- /ci/env.sh: -------------------------------------------------------------------------------- 1 | # Activate the Python virtual environment for CI scripts. 2 | # 3 | # We test for the presence of the file, since when first creating the container images for CI, 4 | # the venv has not been created yet. This is mostly a hack to allow having a single "env.sh" 5 | # script instead of one for container creation and one for CI jobs. 6 | if [ -f /usr/local/python/bin/activate ]; then 7 | source /usr/local/python/bin/activate 8 | fi 9 | 10 | export RUSTUP_HOME='/usr/local/rustup' 11 | export PATH=$PATH:/usr/local/cargo/bin 12 | -------------------------------------------------------------------------------- /ci/install-python-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Creates a Python virtual environment in /usr/local/python and installs 4 | # the modules from requirements.txt in it. These modules are required 5 | # by various jobs in the CI pipeline. 6 | 7 | set -eux -o pipefail 8 | 9 | python3 -m venv /usr/local/python 10 | source /usr/local/python/bin/activate 11 | pip3 install --upgrade pip 12 | pip3 install -r ci/requirements.txt 13 | -------------------------------------------------------------------------------- /ci/install-rust.sh: -------------------------------------------------------------------------------- 1 | source ./ci/env.sh 2 | 3 | set -eu 4 | export CARGO_HOME='/usr/local/cargo' 5 | 6 | RUSTUP_VERSION=1.24.3 7 | RUST_VERSION=$1 8 | RUST_ARCH=$2 9 | 10 | RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init 11 | wget $RUSTUP_URL 12 | 13 | chmod +x rustup-init; 14 | ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; 15 | rm rustup-init; 16 | chmod -R a+w $RUSTUP_HOME $CARGO_HOME 17 | 18 | rustup --version 19 | cargo --version 20 | rustc --version 21 | 22 | rustup component add clippy-preview 23 | rustup component add rustfmt 24 | # cargo install --force cargo-c 25 | cargo install --version ^1.0 gitlab_clippy 26 | cargo install grcov 27 | -------------------------------------------------------------------------------- /ci/lcovrc: -------------------------------------------------------------------------------- 1 | # lcov and genhtml configuration 2 | # See http://ltp.sourceforge.net/coverage/lcov/lcovrc.5.php 3 | 4 | # Always enable branch coverage 5 | lcov_branch_coverage = 1 6 | 7 | # Exclude precondition assertions, as we can never reasonably get full branch 8 | # coverage of them, as they should never normally fail. 9 | # See https://github.com/linux-test-project/lcov/issues/44 10 | lcov_excl_br_line = LCOV_EXCL_BR_LINE|g_return_if_fail|g_return_val_if_fail|g_assert|g_assert_ 11 | 12 | # Similarly for unreachable assertions. 13 | lcov_excl_line = LCOV_EXCL_LINE|g_return_if_reached|g_return_val_if_reached|g_assert_not_reached 14 | -------------------------------------------------------------------------------- /ci/pull-container-image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Utility script so you can pull the container image from CI for local development. 4 | # Run this script and follow the instructions; the script will tell you how 5 | # to run "podman run" to launch a container that has the same environment as the 6 | # one used during CI pipelines. You can debug things at leisure there. 7 | 8 | set -eu 9 | set -o pipefail 10 | 11 | CONTAINER_BUILDS=ci/container_builds.yml 12 | 13 | if [ ! -f $CONTAINER_BUILDS ] 14 | then 15 | echo "Please run this from the toplevel source directory in at-spi2-core" 16 | exit 1 17 | fi 18 | 19 | tag=$(grep -e '^ BASE_TAG:' $CONTAINER_BUILDS | head -n 1 | sed -E 's/.*BASE_TAG: "(.+)"/\1/') 20 | full_tag=x86_64-$tag 21 | echo full_tag=\"$full_tag\" 22 | 23 | image_name=registry.gitlab.gnome.org/gnome/at-spi2-core/opensuse/tumbleweed:$full_tag 24 | 25 | echo pulling image $image_name 26 | podman pull $image_name 27 | 28 | echo "" 29 | echo "You can now run this:" 30 | echo " podman run --rm -ti --cap-add=SYS_PTRACE -v \$(pwd):/srv/project -w /srv/project $image_name" 31 | -------------------------------------------------------------------------------- /ci/requirements.txt: -------------------------------------------------------------------------------- 1 | docutils 2 | gi-docgen 3 | PyGObject 4 | pytest 5 | python-dbusmock 6 | Sphinx 7 | sphinx_rtd_theme 8 | -------------------------------------------------------------------------------- /ci/run-registryd-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | echo "About to run the tests. First we'll launch a gnome-session DBus mock." 6 | 7 | python3 -m dbusmock --session org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager & 8 | 9 | gdbus wait --session --timeout 10 org.gnome.SessionManager 10 | 11 | gdbus call --session \ 12 | --dest org.gnome.SessionManager \ 13 | --object-path /org/gnome/SessionManager \ 14 | --method org.freedesktop.DBus.Mock.AddTemplate 'tests/dbusmock/mock-gnome-session.py' '{}' 15 | 16 | mkdir -p _build/tests/registryd 17 | 18 | cd tests/registryd 19 | 20 | python3 -m pytest --junit-xml=../../_build/tests/registryd/registryd-pytest.junit.xml 21 | 22 | kill %1 # Kill python dbusmock 23 | -------------------------------------------------------------------------------- /ci/run-style-check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # We might need to add a new remote for the upstream main, since this script could 6 | # be running in a personal fork of the repository which has out of date branches. 7 | UPSTREAM_URL=https://gitlab.gnome.org/GNOME/at-spi2-core.git 8 | UPSTREAM_REMOTE=$(git remote -v | awk -v url="$UPSTREAM_URL" '$2 == url { print $1; exit }') 9 | if [ -n "$UPSTREAM_REMOTE" ]; then 10 | echo "Reusing the existing repository on ${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}, it already has a remote, ${UPSTREAM_REMOTE}" 11 | ORIGIN="$UPSTREAM_REMOTE" 12 | else 13 | echo "Retrieving the current upstream repository from ${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}..." 14 | git remote add upstream https://gitlab.gnome.org/GNOME/at-spi2-core.git 15 | git fetch upstream 16 | ORIGIN="upstream" 17 | fi 18 | 19 | # Wrap everything in a subshell so we can propagate the exit status. 20 | ( 21 | 22 | # Work out the newest common ancestor between the detached HEAD that this CI job 23 | # has checked out, and the upstream target branch (which will typically be 24 | # `upstream/main` or `upstream/at-spi2-core-3-24`). 25 | # 26 | # `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` is only defined if we’re running in 27 | # a merge request pipeline; fall back to `${CI_DEFAULT_BRANCH}` otherwise. 28 | newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${ORIGIN}/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH:-main}}") <(git rev-list --first-parent HEAD) | head -1) 29 | git diff -U0 --no-color "${newest_common_ancestor_sha}" | clang-format-diff -p1 > format-diff.log 30 | ) 31 | exit_status=$? 32 | 33 | [ ${exit_status} == 0 ] || exit ${exit_status} 34 | 35 | format_diff="$( 25 | 26 | unsigned int dbind_find_c_alignment (const char *type); 27 | 28 | void dbind_any_marshal (DBusMessageIter *iter, 29 | const char **type, 30 | void **val); 31 | 32 | void dbind_any_marshal_va (DBusMessageIter *iter, 33 | const char **arg_types, 34 | va_list args); 35 | 36 | void dbind_any_demarshal (DBusMessageIter *iter, 37 | const char **type, 38 | void **val); 39 | 40 | void dbind_any_demarshal_va (DBusMessageIter *iter, 41 | const char **arg_types, 42 | va_list args); 43 | 44 | void dbind_any_free (const char *type, 45 | void *ptr_to_ptr); 46 | 47 | void dbind_any_free_ptr (const char *type, 48 | void *ptr); 49 | 50 | #endif /* _DBIND_ANY_H_ */ 51 | -------------------------------------------------------------------------------- /dbind/meson.build: -------------------------------------------------------------------------------- 1 | dbind_sources = [ 2 | 'dbind.c', 3 | 'dbind-any.c', 4 | ] 5 | 6 | dbind_dep = declare_dependency(sources: dbind_sources, 7 | include_directories: root_inc, 8 | compile_args: [ '-DG_LOG_DOMAIN="dbind"' ], 9 | dependencies: [ libdbus_dep, glib_dep ]) 10 | 11 | test('dbind-test', 12 | executable('dbind-test', [ 'dbtest.c', '../atspi/atspi-gmain.c' ], 13 | include_directories: root_inc, 14 | dependencies: [ libdbus_dep, glib_dep, dbind_dep ])) 15 | -------------------------------------------------------------------------------- /devel-docs/at-spi3.rst: -------------------------------------------------------------------------------- 1 | AT-SPI 3 roadmap 2 | ================ 3 | 4 | Note: this document may be obsolete. See also new-protocol.rst. 5 | 6 | This document is a place to collect changes that we should consider for a 7 | future version of the API. 8 | 9 | - Remove ATSPI_COORD_TYPE_SCREEN. It cannot be supported under Wayland. 10 | 11 | - Remove the legacy device event controller API. AtspiDevice should handle 12 | things related to the keyboard and mouse. 13 | 14 | - Eliminate the registry daemon. The new device API no longer uses it for 15 | key grabs (except for the existing legacy back end), and the mouse could 16 | similarly be handled in-process. Aside from the device event controller, 17 | the registry daemon currently keeps a list of applications and registerd 18 | events, but querying applications could be done with a DBus signal that 19 | applications could then respond to, and applications could similarly 20 | query consumers for a list of events that they care about. 21 | 22 | - The DBus API for sending events should be reviewed. All events in the 23 | `xml/Event.xml` file return items with the same "siiva{sv}" signature 24 | when it is not necessary. Take for example "StateChanged", which only 25 | uses the first two variables: a string of the state which has been 26 | changed, and a signed integer that may be either 1 or 0 depending on 27 | if the state has been added or removed. For one thing, it is clear that 28 | the second argument for "StateChanged" should be "b" for bool, and 29 | secondly the arguments "iva{sv}" do not seem to be used at all for this 30 | event, and subsequently could be dropped. This is only the example of 31 | one event with issues like this. Nearly every event has a similar case 32 | of some unused fields, or fields that don't *exactly* match the 33 | semantics of their type sent over DBus. 34 | 35 | - ChildCount and GetChildAtIndex could have unsigned arguments (#106). 36 | 37 | - For the Collection interface, roles are signed, but they are unsigned 38 | elsewhere (#108). 39 | 40 | - For the Collection interface, states are signed, but they are unsigned 41 | elsewhere (#109). 42 | 43 | - The AtspiEventListener API is hard to use and also needs to be reworked. 44 | -------------------------------------------------------------------------------- /devel-docs/atk-deprecations.rst: -------------------------------------------------------------------------------- 1 | Deprecations in ATK that need work elsewhere 2 | ============================================ 3 | 4 | ``atk_document_get_locale()`` and the corresponding field in the vtable 5 | ``AtkDocumentIface.get_document_locale`` are documented as deprecated 6 | since 2013 (commit 97880727). However, WebKitGtk still seems to 7 | implement it; it should use ``AtkObjectClass.get_object_locale`` 8 | instead. 9 | 10 | Note that Orca does not seem to use the ``Document.GetLocale`` method 11 | nor the ``Accessible.Locale`` property, so probably the code above from 12 | WebKitGtk is not exercised. 13 | 14 | AtkValue 15 | -------- 16 | 17 | The following methods are deprecated in ``AtkValueIface`` since 2014 18 | (commit 98838b2a): 19 | 20 | - ``get_current_value`` - replaced with ``get_value_and_text`` 21 | - ``set_current_value`` - replaced with ``set_value`` 22 | 23 | And the following are replaced with ``get_range``, which returns an 24 | ``AtkRange`` boxed type: 25 | 26 | - ``get_maximum_value`` 27 | - ``get_minimum_value`` 28 | - ``get_minimum_increment`` 29 | 30 | Firefox still does not implement ``get_range``, ``get_value_and_text``, 31 | ``set_value``. See bug #71. 32 | -------------------------------------------------------------------------------- /devel-docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # This file only contains a selection of the most common options. For a full 4 | # list see the documentation: 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 6 | 7 | # -- Path setup -------------------------------------------------------------- 8 | 9 | # If extensions (or modules to document with autodoc) are in another directory, 10 | # add these directories to sys.path here. If the directory is relative to the 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. 12 | # 13 | # import os 14 | # import sys 15 | # sys.path.insert(0, os.path.abspath('.')) 16 | 17 | import os 18 | 19 | 20 | # -- Project information ----------------------------------------------------- 21 | 22 | project = 'Development guide for the accessibility infrastructure' 23 | copyright = '2022, Federico Mena Quintero' 24 | author = 'Federico Mena Quintero' 25 | 26 | 27 | # -- General configuration --------------------------------------------------- 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31 | # ones. 32 | extensions = [ 33 | ] 34 | 35 | # Add any paths that contain templates here, relative to this directory. 36 | templates_path = ['_templates'] 37 | 38 | # List of patterns, relative to source directory, that match files and 39 | # directories to ignore when looking for source files. 40 | # This pattern also affects html_static_path and html_extra_path. 41 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 42 | 43 | # -- Options for HTML output ------------------------------------------------- 44 | 45 | # The theme to use for HTML and HTML Help pages. See the documentation for 46 | # a list of builtin themes. 47 | # 48 | html_theme = 'sphinx_rtd_theme' 49 | 50 | # Add any paths that contain custom static files (such as style sheets) here, 51 | # relative to this directory. They are copied after the builtin static files, 52 | # so a file named "default.css" will overwrite the builtin "default.css". 53 | html_static_path = ['_static'] 54 | -------------------------------------------------------------------------------- /devel-docs/de-controller.rst: -------------------------------------------------------------------------------- 1 | Notes on the device event controller machinery 2 | ============================================== 3 | 4 | In pyatspi2, ``Registry.setReferenceWIndow()`` is misspelled. However, 5 | that function is never called in Orca or elsewhere, as far as I can 6 | tell. 7 | 8 | This ties down to ``atspi_registry_set_reference_window()``, which just 9 | calls ``_atspi_mutter_set_reference_window()``. The side effect of that 10 | is to set the ``ATSPI_MUTTER_DATA.window_id`` and 11 | ``window_id_is_explicit``, but again, those fields never get used in the 12 | ``atspi-mutter.c`` code. I think they were meant to be used in 13 | ``_atspi_mutter_generate_keyboard_event`` or 14 | ``_atspi_mutter_generate_mouse_event``. 15 | 16 | Relatedly, ``_atspi_mutter_generate_keyboard_event`` takes a 17 | ``keystring`` argument but it’s not used. 18 | 19 | What is incomplete here? 20 | 21 | Refactoring plan 22 | ---------------- 23 | 24 | While the device event controller (DEC) code works for X11, it doesn’t 25 | work for Wayland because there are no hooks there to sniff the keyboard 26 | or mouse. 27 | 28 | However, the machinery to synthesize events is presumably still useful. 29 | I’d like to be able to add tests for it. 30 | -------------------------------------------------------------------------------- /devel-docs/index.rst: -------------------------------------------------------------------------------- 1 | Development guide for the accessibility infrastructure 2 | ====================================================== 3 | 4 | .. toctree:: 5 | :caption: For toolkit implementors 6 | :maxdepth: 1 7 | 8 | toolkits 9 | atk-deprecations 10 | xml-changes 11 | xml-interfaces 12 | 13 | .. toctree:: 14 | :caption: Roadmap and Design Documents 15 | :maxdepth: 1 16 | 17 | architecture 18 | roadmap 19 | at-spi3 20 | atspi-python-stack 21 | de-controller 22 | new-protocol 23 | 24 | .. toctree:: 25 | :caption: Meeting minutes 26 | :maxdepth: 1 27 | 28 | meeting-2023-01-13 29 | 30 | .. toctree:: 31 | :caption: Info for Maintainers 32 | :maxdepth: 1 33 | 34 | gitlab-ci 35 | 36 | 37 | Welcome to the developer's guide for the freedesktop accessibility 38 | infrastructure. This guide intends to become a repository of 39 | knowledge on the implementation of the accessibility infrastructure, 40 | as well as a guide for application developers and toolkit developers 41 | who want to make their user interfaces accessible. 42 | 43 | If you want to modify this document, `please see its source code 44 | `_. 45 | -------------------------------------------------------------------------------- /devel-docs/toolkits.rst: -------------------------------------------------------------------------------- 1 | Accessibility implementations in different toolkits 2 | =================================================== 3 | 4 | Toolkits that use the DBus APIs directly 5 | ---------------------------------------- 6 | 7 | GTK4 8 | ~~~~ 9 | 10 | Sources: 11 | ```gtk4/gtk/a11y`` `__ 12 | 13 | Qt5 14 | --- 15 | 16 | Sources: 17 | ```qtbase/src/gui/accessible/linux`` `__ 18 | 19 | Note: Qt’s implementation of 20 | `Cache.GetItems `__ 21 | uses the old signature ``a((so)(so)(so)a(so)assusau)`` instead of the 22 | preferred/new ``a((so)(so)(so)iiassusau)``. 23 | 24 | WebKit 25 | ------ 26 | 27 | Sources: 28 | ```WebKit/Source/WebCore/accessibility/atspi`` `__ 29 | 30 | Toolkits that use ATK 31 | --------------------- 32 | 33 | GTK3 34 | ---- 35 | 36 | Sources: 37 | ```gtk3/gtk/a11y`` `__ 38 | 39 | gnome-shell / St / via clutter’s cally 40 | -------------------------------------- 41 | 42 | Sources: 43 | ```mutter/clutter/clutter/cally`` `__ 44 | 45 | Mozilla Firefox 46 | --------------- 47 | 48 | Sources: 49 | ```gecko-dev/accessible/atk`` `__ 50 | 51 | Chromium 52 | -------- 53 | 54 | Uses both ATK and libatspi? 55 | 56 | Sources: \* 57 | ```chromium/ui/accessibility/platform/*auralinux*`` `__ 58 | (atk) \* 59 | ```chromium/ui/accessibility/platform/inspect/*auralinux*`` `__ 60 | (atspi) \* 61 | ```chromium/content/browser/accessibility/*auralinux*`` `__ 62 | (atspi and atk) 63 | 64 | LibreOffice 65 | ----------- 66 | 67 | Sources: 68 | ```LibreOffice/core/vcl/unx/gtk3/a11y`` `__ 69 | 70 | Java Swing - via java-atk-wrapper 71 | --------------------------------- 72 | 73 | Sources: 74 | ```java-atk-wrapper`` `__ 75 | -------------------------------------------------------------------------------- /devel-docs/xml-interfaces.rst: -------------------------------------------------------------------------------- 1 | DBus XML Interfaces 2 | =================== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | doc-org.a11y.atspi.Accessible 8 | doc-org.a11y.atspi.Action 9 | doc-org.a11y.atspi.Application 10 | doc-org.a11y.atspi.Cache 11 | doc-org.a11y.atspi.Collection 12 | doc-org.a11y.atspi.Component 13 | doc-org.a11y.atspi.DeviceEventController 14 | doc-org.a11y.atspi.DeviceEventListener 15 | doc-org.a11y.atspi.Document 16 | doc-org.a11y.atspi.EditableText 17 | doc-org.a11y.atspi.Event.Document 18 | doc-org.a11y.atspi.Event.Focus 19 | doc-org.a11y.atspi.Event.Keyboard 20 | doc-org.a11y.atspi.Event.Mouse 21 | doc-org.a11y.atspi.Event.Object 22 | doc-org.a11y.atspi.Event.Terminal 23 | doc-org.a11y.atspi.Event.Window 24 | doc-org.a11y.atspi.Hyperlink 25 | doc-org.a11y.atspi.Hypertext 26 | doc-org.a11y.atspi.Image 27 | doc-org.a11y.atspi.Registry 28 | doc-org.a11y.atspi.Selection 29 | doc-org.a11y.atspi.Socket 30 | doc-org.a11y.atspi.Table 31 | doc-org.a11y.atspi.TableCell 32 | doc-org.a11y.atspi.Text 33 | doc-org.a11y.atspi.Value 34 | -------------------------------------------------------------------------------- /doc/atk.toml.in: -------------------------------------------------------------------------------- 1 | [library] 2 | version = "@VERSION@" 3 | browse_url = "https://gitlab.gnome.org/GNOME/at-spi2-core/" 4 | repository_url = "https://gitlab.gnome.org/GNOME/at-spi2-core.git" 5 | website_url = "https://wiki.gnome.org/Accessibility" 6 | docs_url = "https://gnome.pages.gitlab.gnome.org/at-spi2-core/atk/" 7 | authors = "ATK Development Team" 8 | license = "LGPL-2.1-or-later" 9 | description = """GNOME provides support for accessibility devices using the ATK 10 | framework. This framework defines a set of interfaces to which 11 | graphical interface components adhere. This allows, for instance, 12 | screen readers to read the text of an interface and interact with its 13 | controls. ATK support is built into GTK+ 3 and the rest of the GNOME 14 | platform, so any application using GTK+ 3 will have reasonable 15 | accessibility support for free. 16 | GTK4 now includes accessibility support natively and does not need ATK.""" 17 | devhelp = true 18 | search_index = true 19 | logo_url = "logo.png" 20 | 21 | dependencies = ["GObject-2.0",] 22 | 23 | [dependencies."GObject-2.0"] 24 | name = "GObject" 25 | description = "The base type system library" 26 | docs_url = "https://docs.gtk.org/gobject/" 27 | 28 | related = ["Atspi-2.0"] 29 | 30 | [related."Atspi-2.0"] 31 | name = "AT-SPI" 32 | description = "The Assistive Technology Service Provider Interface" 33 | docs_url = "https://gnome.pages.gitlab.gnome.org/at-spi2-core/libatspi/" 34 | 35 | [theme] 36 | name = "basic" 37 | show_index_summary = true 38 | show_class_hierarchy = true 39 | 40 | [source-location] 41 | # The base URL for the web UI 42 | base_url = "https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/HEAD/" 43 | # The format for links, using "filename" and "line" for the format 44 | file_format = "{filename}#L{line}" 45 | 46 | [extra] 47 | content_files = [ 48 | ] 49 | content_images = [ 50 | "logo.png", 51 | ] 52 | urlmap_file = "urlmap.js" 53 | -------------------------------------------------------------------------------- /doc/libatspi.toml.in: -------------------------------------------------------------------------------- 1 | [library] 2 | version = "@VERSION@" 3 | browse_url = "https://gitlab.gnome.org/GNOME/at-spi2-core/" 4 | repository_url = "https://gitlab.gnome.org/GNOME/at-spi2-core.git" 5 | website_url = "https://wiki.gnome.org/Accessibility" 6 | doc_url = "https://gnome.pages.gitlab.gnome.org/at-spi2-core/libatspi/" 7 | authors = "The AT-SPI2 maintainers" 8 | license = "LGPL-2.1-or-later" 9 | description = "The Assistive Technology Service Provider Interface, version 2" 10 | dependencies = ["GObject-2.0",] 11 | devhelp = true 12 | search_index = true 13 | logo_url = "logo.png" 14 | 15 | [dependencies."GObject-2.0"] 16 | name = "GObject" 17 | description = "The base type system library" 18 | docs_url = "https://docs.gtk.org/gobject/" 19 | 20 | related = ["Atk"] 21 | 22 | [related."Atk"] 23 | name = "Atk" 24 | description = "The Accessibility toolkite" 25 | docs_url = "https://gnome.pages.gitlab.gnome.org/at-spi2-core/atk/" 26 | 27 | [theme] 28 | name = "basic" 29 | show_index_summary = true 30 | show_class_hierarchy = true 31 | 32 | [source-location] 33 | # The base URL for the web UI 34 | base_url = "https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/HEAD/" 35 | # The format for links, using "filename" and "line" for the format 36 | file_format = "{filename}#L{line}" 37 | 38 | [extra] 39 | content_files = [ 40 | ] 41 | content_images = [ 42 | "logo.png", 43 | ] 44 | urlmap_file = "urlmap.js" 45 | -------------------------------------------------------------------------------- /doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/at-spi2-core/e61238ad94f75c002b33d096349a9952ba5c978d/doc/logo.png -------------------------------------------------------------------------------- /doc/meson.build: -------------------------------------------------------------------------------- 1 | dependency('gi-docgen', version: '>= 2021.1', 2 | fallback: ['gi-docgen', 'dummy_dep'], 3 | native: true, 4 | required: get_option('docs')) 5 | 6 | gidocgen = find_program('gi-docgen') 7 | 8 | docs_dir = atspi_datadir / 'doc' 9 | 10 | gidocgen_common_args = [ 11 | '--quiet', 12 | '--no-namespace-dir', 13 | '--fatal-warnings', 14 | ] 15 | 16 | ################################ ATK 17 | atk_expand_content_files =[] 18 | 19 | atk_toml_data = configuration_data() 20 | atk_toml_data.set('VERSION', meson.project_version()) 21 | 22 | atk_toml = configure_file( 23 | input: 'atk.toml.in', 24 | output: 'atk.toml', 25 | configuration: atk_toml_data 26 | ) 27 | 28 | custom_target('atk-doc', 29 | input: [ atk_toml, atk_gir[0] ], 30 | output: 'atk', 31 | command: [ 32 | gidocgen, 33 | 'generate', 34 | gidocgen_common_args, 35 | '--config=@INPUT0@', 36 | '--output-dir=@OUTPUT@', 37 | '--content-dir=@0@'.format(meson.current_source_dir()), 38 | '@INPUT1@', 39 | ], 40 | install: true, 41 | install_dir: docs_dir, 42 | depend_files: atk_expand_content_files, 43 | ) 44 | 45 | 46 | ################################ libatspi 47 | libatspi_expand_content_files = [] 48 | 49 | libatspi_toml_data = configuration_data() 50 | libatspi_toml_data.set('VERSION', meson.project_version()) 51 | 52 | libatspi_toml = configure_file( 53 | input: 'libatspi.toml.in', 54 | output: 'libatspi.toml', 55 | configuration: libatspi_toml_data 56 | ) 57 | 58 | custom_target('libatspi-doc', 59 | input: [ libatspi_toml, libatspi_gir[0] ], 60 | output: 'libatspi', 61 | command: [ 62 | gidocgen, 63 | 'generate', 64 | gidocgen_common_args, 65 | '--config=@INPUT0@', 66 | '--output-dir=@OUTPUT@', 67 | '--content-dir=@0@'.format(meson.current_source_dir()), 68 | '@INPUT1@', 69 | ], 70 | install: true, 71 | install_dir: docs_dir, 72 | depend_files: libatspi_expand_content_files, 73 | ) 74 | 75 | -------------------------------------------------------------------------------- /doc/urlmap.js: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2021 GNOME Foundation 2 | // SPDX-License-Identifier: LGPL-2.1-or-later 3 | 4 | // A map between namespaces and base URLs for their online documentation 5 | baseURLs = [ 6 | [ 'GLib', 'https://docs.gtk.org/glib/' ], 7 | [ 'GObject', 'https://docs.gtk.org/gobject/' ], 8 | [ 'Gio', 'https://docs.gtk.org/gio/' ], 9 | [ 'Gdk', 'https://docs.gtk.org/gdk3/' ], 10 | [ 'GdkX11', 'https://docs.gtk.org/gdk3-x11/' ], 11 | [ 'Gtk', 'https://docs.gtk.org/gtk3/' ], 12 | [ 'Pango', 'https://docs.gtk.org/Pango/' ], 13 | [ 'PangoCairo', 'https://docs.gtk.org/PangoCairo/' ], 14 | [ 'GdkPixbuf', 'https://docs.gtk.org/gdk-pixbuf/' ], 15 | [ 'Atk', 'https://gnome.pages.gitlab.gnome.org/at-spi2-core/atk/' ], 16 | [ 'Atspi', 'https://gnome.pages.gitlab.gnome.org/at-spi2-core/libatspi/' ], 17 | ] 18 | -------------------------------------------------------------------------------- /droute/droute-pairhash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008 Codethink Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #include "droute-pairhash.h" 24 | 25 | /*---------------------------------------------------------------------------*/ 26 | 27 | static guint 28 | str_hash (guint32 h, const char *p) 29 | { 30 | for (p += 1; *p != '\0'; p++) 31 | h = (h << 5) - h + *p; 32 | 33 | return h; 34 | } 35 | 36 | /*---------------------------------------------------------------------------*/ 37 | 38 | StrPair * 39 | str_pair_new (const gchar *one, const gchar *two) 40 | { 41 | StrPair *pair; 42 | 43 | pair = g_new (StrPair, 1); 44 | pair->one = one; 45 | pair->two = two; 46 | return pair; 47 | } 48 | 49 | guint 50 | str_pair_hash (gconstpointer key) 51 | { 52 | StrPair *pair = (StrPair *) key; 53 | guint hash = 0; 54 | 55 | /*g_return_val_if_fail (pair != NULL, 0); 56 | g_return_val_if_fail (pair->one != NULL, 0); 57 | g_return_val_if_fail (pair->two != NULL, 0); 58 | */ 59 | 60 | if (*(pair->two) != '\0') 61 | { 62 | hash = *(pair->two); 63 | hash = str_hash (hash, pair->two); 64 | hash = str_hash (hash, pair->one); 65 | } 66 | 67 | return hash; 68 | } 69 | 70 | gboolean 71 | str_pair_equal (gconstpointer a, gconstpointer b) 72 | { 73 | StrPair *ap = (StrPair *) a; 74 | StrPair *bp = (StrPair *) b; 75 | 76 | if (g_str_equal (ap->one, bp->one) && 77 | g_str_equal (ap->two, bp->two)) 78 | { 79 | return TRUE; 80 | } 81 | else 82 | { 83 | return FALSE; 84 | } 85 | } 86 | 87 | /*END------------------------------------------------------------------------*/ 88 | -------------------------------------------------------------------------------- /droute/droute-pairhash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008 Codethink Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | #ifndef _DROUTE_PAIRHASH_H 23 | #define _DROUTE_PAIRHASH_H 24 | 25 | #include 26 | 27 | typedef struct _StrPair StrPair; 28 | struct _StrPair 29 | { 30 | const gchar *one; 31 | const gchar *two; 32 | }; 33 | 34 | StrPair *str_pair_new (const gchar *one, 35 | const gchar *two); 36 | 37 | guint str_pair_hash (gconstpointer key); 38 | gboolean str_pair_equal (gconstpointer a, 39 | gconstpointer b); 40 | 41 | #endif /* _DROUTE_PAIRHASH_H */ 42 | -------------------------------------------------------------------------------- /droute/droute-variant.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2008 Novell, Inc. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | #ifndef _DROUTE_VARIANT_H 23 | #define _DROUTE_VARIANT_H 24 | 25 | #include 26 | 27 | dbus_bool_t droute_return_v_int32 (DBusMessageIter *iter, dbus_int32_t val); 28 | dbus_bool_t droute_return_v_double (DBusMessageIter *iter, double val); 29 | dbus_bool_t droute_return_v_string (DBusMessageIter *iter, const char *val); 30 | dbus_bool_t droute_return_v_object (DBusMessageIter *iter, const char *path); 31 | 32 | dbus_int32_t droute_get_v_int32 (DBusMessageIter *iter); 33 | const char *droute_get_v_string (DBusMessageIter *iter); 34 | 35 | #endif /* _DROUTE_VARIANT_H */ 36 | -------------------------------------------------------------------------------- /droute/meson.build: -------------------------------------------------------------------------------- 1 | droute_sources = [ 2 | 'droute.c', 3 | 'droute-variant.c', 4 | 'droute-pairhash.c', 5 | ] 6 | 7 | libdroute = static_library('droute', droute_sources, 8 | dependencies: [ glib_dep, libdbus_dep ], 9 | include_directories: root_inc) 10 | 11 | libdroute_dep = declare_dependency(link_with: libdroute, 12 | dependencies: [ glib_dep, libdbus_dep ], 13 | include_directories: include_directories('.')) 14 | 15 | droute_test = executable('droute-test', 'droute-test.c', 16 | dependencies: [ libdroute_dep, atspi_dep ], 17 | include_directories: root_inc) 18 | test('droute-test', droute_test) 19 | -------------------------------------------------------------------------------- /m4/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GNOME/at-spi2-core/e61238ad94f75c002b33d096349a9952ba5c978d/m4/.gitignore -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option('dbus_services_dir', 2 | description: 'Location of the DBus services', 3 | type: 'string', 4 | value: 'default') 5 | option('dbus_daemon', 6 | description: 'The path of the DBus daemon', 7 | type: 'string', 8 | value: 'default') 9 | option('dbus_broker', 10 | description: 'The path of the DBus broker', 11 | type: 'string', 12 | value: 'default') 13 | option('default_bus', 14 | description: 'The default DBus implementation to use', 15 | type: 'combo', 16 | choices: ['dbus-daemon', 'dbus-broker'], 17 | value: 'dbus-daemon') 18 | option('use_systemd', 19 | description: 'Use systemd if available (needed for dbus-broker)', 20 | type: 'boolean', 21 | value: true) 22 | option('gtk2_atk_adaptor', 23 | description: 'Build the runtime module loaded by GTK2', 24 | type: 'boolean', 25 | value: true) 26 | option('systemd_user_dir', 27 | description: 'Location of the systemd user services', 28 | type: 'string', 29 | value: 'default') 30 | option('docs', 31 | description: 'Generate API reference for atspi (requires GTK-Doc)', 32 | type: 'boolean', 33 | value: false) 34 | option('introspection', 35 | description: 'Enable GObject Introspection (depends on GObject)', 36 | type: 'feature', 37 | value: 'auto', 38 | yield: true) 39 | option('x11', 40 | description: 'Enable X11 support', 41 | type: 'feature', 42 | value: 'auto') 43 | option('atk_only', 44 | description: 'Build only the ATK stub library without atspi or at-spi2-atk (UNSUPPORTED)', 45 | type: 'boolean', 46 | value: false) 47 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | ab 2 | af 3 | am 4 | an 5 | ar 6 | as 7 | ast 8 | az 9 | be 10 | be@latin 11 | bg 12 | bn 13 | bn_IN 14 | bs 15 | ca 16 | ca@valencia 17 | ckb 18 | cs 19 | cy 20 | da 21 | de 22 | dz 23 | el 24 | en_CA 25 | en_GB 26 | en@shaw 27 | eo 28 | es 29 | et 30 | eu 31 | fa 32 | fi 33 | fr 34 | fur 35 | ga 36 | gd 37 | gl 38 | gu 39 | he 40 | hi 41 | hr 42 | hu 43 | hy 44 | id 45 | is 46 | it 47 | ja 48 | ka 49 | kab 50 | kk 51 | km 52 | kn 53 | ko 54 | ku 55 | li 56 | lt 57 | lv 58 | mai 59 | mk 60 | ml 61 | mn 62 | mr 63 | ms 64 | nb 65 | ne 66 | nl 67 | nn 68 | oc 69 | or 70 | pa 71 | pl 72 | ps 73 | pt 74 | pt_BR 75 | ro 76 | ru 77 | rw 78 | si 79 | sk 80 | sl 81 | sq 82 | sr 83 | sr@ije 84 | sr@latin 85 | sv 86 | ta 87 | te 88 | tg 89 | th 90 | tk 91 | tr 92 | tt 93 | ug 94 | uk 95 | uz 96 | uz@cyrillic 97 | vi 98 | wa 99 | xh 100 | yi 101 | zh_CN 102 | zh_HK 103 | zh_TW 104 | zu 105 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | atk/atkhyperlink.c 4 | atk/atkobject.c 5 | atk/atkvalue.c 6 | atspi/atspi-accessible.c 7 | atspi/atspi-component.c 8 | atspi/atspi-event-listener.c 9 | atspi/atspi-misc.c 10 | atspi/atspi-value.c 11 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | # List of source files that should *not* be translated. 2 | # Please keep this file sorted alphabetically. 3 | tests/at-spi2-atk/atk_test_accessible.c 4 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n = import('i18n') 2 | 3 | i18n.gettext('at-spi2-core', preset: 'glib') 4 | -------------------------------------------------------------------------------- /po/uz@cyrillic.po: -------------------------------------------------------------------------------- 1 | # Uzbek (Cyrillic) translation for at-spi2-core. 2 | # Copyright (C) 2012 at-spi2-core's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the at-spi2-core package. 4 | # Bahodir Mansurov <6ahodir@gmail.com>, 2012. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: at-spi2-core master\n" 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=at-" 10 | "spi&keywords=I18N+L10N&component=general\n" 11 | "POT-Creation-Date: 2012-02-24 22:24+0000\n" 12 | "PO-Revision-Date: 2012-02-24 22:24+0000\n" 13 | "Last-Translator: Bahodir Mansurov <6ahodir@gmail.com>\n" 14 | "Language-Team: Uzbek (Cyrillic) \n" 15 | "Language: uz@cyrillic\n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=UTF-8\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: ../atspi/atspi-component.c:313 ../atspi/atspi-misc.c:985 21 | #: ../atspi/atspi-value.c:111 22 | msgid "The application no longer exists" 23 | msgstr "Бу дастур энди мавжуд эмас" 24 | -------------------------------------------------------------------------------- /registryd/de-types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2009 Codethink Ltd 6 | * Copyright 2001, 2002 Sun Microsystems Inc., 7 | * Copyright 2001, 2002 Ximian, Inc. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef SPI_DE_TYPES_H_ 26 | #define SPI_DE_TYPES_H_ 27 | 28 | #include 29 | 30 | typedef unsigned long Accessibility_ControllerEventMask; 31 | 32 | typedef enum 33 | { 34 | Accessibility_KEY_PRESSED_EVENT, 35 | Accessibility_KEY_RELEASED_EVENT, 36 | } Accessibility_EventType; 37 | 38 | typedef enum 39 | { 40 | Accessibility_KEY_PRESSED, 41 | Accessibility_KEY_RELEASED, 42 | } Accessibility_KeyEventType; 43 | 44 | typedef enum 45 | { 46 | Accessibility_KEY_PRESS, 47 | Accessibility_KEY_RELEASE, 48 | Accessibility_KEY_PRESSRELEASE, 49 | Accessibility_KEY_SYM, 50 | Accessibility_KEY_STRING, 51 | Accessibility_KEY_LOCKMODIFIERS, 52 | Accessibility_KEY_UNLOCKMODIFIERS, 53 | } Accessibility_KeySynthType; 54 | 55 | typedef struct 56 | { 57 | Accessibility_EventType type; 58 | dbus_uint32_t id; 59 | dbus_uint32_t hw_code; 60 | dbus_uint32_t modifiers; 61 | dbus_uint32_t timestamp; 62 | char *event_string; 63 | dbus_bool_t is_text; 64 | } Accessibility_DeviceEvent; 65 | 66 | typedef struct 67 | { 68 | dbus_bool_t synchronous; 69 | dbus_bool_t preemptive; 70 | dbus_bool_t global; 71 | } Accessibility_EventListenerMode; 72 | 73 | typedef struct 74 | { 75 | dbus_int32_t keycode; 76 | dbus_int32_t keysym; 77 | char *keystring; 78 | dbus_int32_t unused; 79 | } Accessibility_KeyDefinition; 80 | 81 | #endif /* SPI_DE_TYPES_H_ */ 82 | -------------------------------------------------------------------------------- /registryd/deviceeventcontroller-x11.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEVICEEVENTCONTROLLER_X11_H_ 2 | #define _DEVICEEVENTCONTROLLER_X11_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | typedef struct 11 | { 12 | Display *xevie_display; 13 | unsigned int last_press_keycode; 14 | unsigned int last_release_keycode; 15 | struct timeval last_press_time; 16 | struct timeval last_release_time; 17 | int have_xkb; 18 | int xkb_major_extension_opcode; 19 | int xkb_base_event_code; 20 | int xkb_base_error_code; 21 | unsigned int xkb_latch_mask; 22 | unsigned int pending_xkb_mod_relatch_mask; 23 | XkbDescPtr xkb_desc; 24 | KeyCode reserved_keycode; 25 | KeySym reserved_keysym; 26 | guint reserved_reset_timeout; 27 | } SpiDEControllerPrivate; 28 | 29 | #ifdef HAVE_X11 30 | void spi_dec_setup_x11 (SpiDEControllerClass *klass); 31 | #endif 32 | 33 | long ucs2keysym (long ucs); 34 | long keysym2ucs (long keysym); 35 | 36 | #endif /* _DEVICEEVENTCONTROLLER_X11_H_ */ 37 | -------------------------------------------------------------------------------- /registryd/display.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2009 Nokia. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | #include "display.h" 34 | 35 | static Display *default_display = NULL; 36 | 37 | Display * 38 | spi_set_display (const char *display_name) 39 | { 40 | /* 41 | * TODO - Should we ever do anything different might need to 42 | * close previous display. 43 | */ 44 | default_display = XOpenDisplay (display_name); 45 | if (!default_display) 46 | { 47 | g_warning ("AT-SPI: Cannot open default display"); 48 | exit (1); 49 | } 50 | return default_display; 51 | } 52 | 53 | Display * 54 | spi_get_display () 55 | { 56 | if (!default_display) 57 | spi_set_display (NULL); 58 | 59 | return default_display; 60 | } 61 | 62 | Window 63 | spi_get_root_window () 64 | { 65 | if (!default_display) 66 | spi_set_display (NULL); 67 | 68 | return DefaultRootWindow (default_display); 69 | } 70 | 71 | static int (*old_x_error_handler) (Display *, XErrorEvent *); 72 | static int x_error_code; 73 | 74 | static int 75 | spi_x_error_handler (Display *display, XErrorEvent *error) 76 | { 77 | if (error->error_code) 78 | x_error_code = error->error_code; 79 | else 80 | x_error_code = 0; 81 | 82 | return 0; 83 | } 84 | 85 | void 86 | spi_x_error_trap (void) 87 | { 88 | old_x_error_handler = XSetErrorHandler (spi_x_error_handler); 89 | } 90 | 91 | int 92 | spi_x_error_release (void) 93 | { 94 | XSetErrorHandler (old_x_error_handler); 95 | return x_error_code; 96 | } 97 | -------------------------------------------------------------------------------- /registryd/display.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2009 Nokia. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef SPI_DISPLAY_H_ 24 | #define SPI_DISPLAY_H_ 25 | 26 | #include 27 | 28 | Display *spi_set_display (const char *display_name); 29 | Display *spi_get_display (); 30 | 31 | Window spi_get_root_window (); 32 | 33 | void spi_x_error_trap (void); 34 | int spi_x_error_release (void); 35 | 36 | #endif /* SPI_DISPLAY_H_ */ 37 | -------------------------------------------------------------------------------- /registryd/event-source.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2009 Nokia. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef SPI_EVENT_SOURCE_H_ 24 | #define SPI_EVENT_SOURCE_H_ 25 | 26 | #include 27 | 28 | void spi_events_init (Display *display); 29 | void spi_events_uninit (); 30 | void spi_set_events (long event_mask); 31 | void spi_set_filter (void (*filter) (XEvent *, void *), void *data); 32 | 33 | #endif /* SPI_EVENT_SOURCE_H_ */ 34 | -------------------------------------------------------------------------------- /registryd/keymasks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef SPI_KEYMASKS_H_ 25 | #define SPI_KEYMASKS_H_ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | typedef unsigned long SpiKeyMaskType; 32 | 33 | /* Values taken from Xlib.h */ 34 | #define SPI_KEYMASK_ALT (1 << 3) /* Mod1Mask */ 35 | #define SPI_KEYMASK_MOD1 (1 << 3) /* Mod1Mask */ 36 | #define SPI_KEYMASK_MOD2 (1 << 4) /* Mod2Mask */ 37 | #define SPI_KEYMASK_MOD3 (1 << 5) /* Mod3Mask */ 38 | #define SPI_KEYMASK_MOD4 (1 << 6) /* Mod4Mask */ 39 | #define SPI_KEYMASK_MOD5 (1 << 7) /* Mod5Mask */ 40 | #define SPI_KEYMASK_BUTTON1 (1L << 8) /* Button1Mask */ 41 | #define SPI_KEYMASK_BUTTON2 (1L << 9) /* Button2Mask */ 42 | #define SPI_KEYMASK_BUTTON3 (1L << 10) /* Button3Mask */ 43 | #define SPI_KEYMASK_BUTTON4 (1L << 11) /* Button4Mask */ 44 | #define SPI_KEYMASK_BUTTON5 (1L << 12) /* Button5Mask */ 45 | #define SPI_KEYMASK_CONTROL (1 << 2) /* ControlMask */ 46 | #define SPI_KEYMASK_SHIFT (1 << 0) /* ShiftMask */ 47 | #define SPI_KEYMASK_SHIFTLOCK (1 << 1) /* LockMask */ 48 | #define SPI_KEYMASK_NUMLOCK (1 << 14) 49 | #define SPI_KEYMASK_UNMODIFIED 0 50 | 51 | G_END_DECLS 52 | 53 | #endif /* SPI_KEYMASKS_H_ */ 54 | -------------------------------------------------------------------------------- /registryd/marshal-dbus.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2009 Codethink Ltd 6 | * Copyright 2001, 2002 Sun Microsystems Inc., 7 | * Copyright 2001, 2002 Ximian, Inc. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the 21 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | */ 24 | 25 | #ifndef SPI_DE_MARSHALLER_H_ 26 | #define SPI_DE_MARSHALLER_H_ 27 | 28 | #include 29 | 30 | #include "de-types.h" 31 | 32 | dbus_bool_t spi_dbus_message_iter_get_struct (DBusMessageIter *iter, ...); 33 | dbus_bool_t spi_dbus_message_iter_append_struct (DBusMessageIter *iter, ...); 34 | dbus_bool_t spi_dbus_marshal_deviceEvent (DBusMessage *message, const Accessibility_DeviceEvent *e); 35 | dbus_bool_t spi_dbus_demarshal_deviceEvent (DBusMessage *message, Accessibility_DeviceEvent *e); 36 | 37 | #endif /* SPI_DE_MARSHALLER_H_ */ 38 | -------------------------------------------------------------------------------- /registryd/meson.build: -------------------------------------------------------------------------------- 1 | atspi_introspection_path = '' 2 | 3 | registryd_sources = [ 4 | introspection_generated, 5 | 'deviceeventcontroller.c', 6 | 'marshal-dbus.c', 7 | 'reentrant-list.c', 8 | 'registry-main.c', 9 | 'registry.c', 10 | ] 11 | 12 | registryd_deps = [ 13 | gio_dep, 14 | libdbus_dep, 15 | atspi_dep, 16 | dl_dep, 17 | ] 18 | 19 | if x11_dep.found() 20 | registryd_sources += [ 21 | 'deviceeventcontroller-x11.c', 22 | 'display.c', 23 | 'event-source.c', 24 | 'ucs2keysym.c', 25 | ] 26 | 27 | registryd_deps += x11_deps 28 | endif 29 | 30 | executable('at-spi2-registryd', registryd_sources, 31 | dependencies: registryd_deps, 32 | install: true, 33 | install_dir: atspi_libexecdir) 34 | 35 | libexec_conf = configuration_data() 36 | libexec_conf.set('libexecdir', atspi_libexecdir) 37 | 38 | configure_file(input: 'org.a11y.atspi.Registry.service.in', 39 | output: 'org.a11y.atspi.Registry.service', 40 | configuration: libexec_conf, 41 | install_dir: join_paths(atspi_datadir, 'dbus-1/accessibility-services')) 42 | -------------------------------------------------------------------------------- /registryd/org.a11y.atspi.Registry.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=org.a11y.atspi.Registry 3 | Exec=@libexecdir@/at-spi2-registryd --use-gnome-session 4 | -------------------------------------------------------------------------------- /registryd/reentrant-list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef REENTRANT_LIST_H_ 25 | #define REENTRANT_LIST_H_ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | typedef enum 32 | { 33 | SPI_RE_ENTRANT_CONTINUE = 0, 34 | SPI_RE_ENTRANT_TERMINATE 35 | } SpiReEntrantContinue; 36 | 37 | typedef SpiReEntrantContinue (*SpiReEntrantFn) (GList *const *list, 38 | gpointer user_data); 39 | 40 | void spi_re_entrant_list_delete_link (GList *const *element_ptr); 41 | void spi_re_entrant_list_foreach (GList **list, 42 | SpiReEntrantFn func, 43 | gpointer user_data); 44 | 45 | G_END_DECLS 46 | 47 | #endif /* REENTRANT_LIST_H_ */ 48 | -------------------------------------------------------------------------------- /registryd/registry.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) 4 | * 5 | * Copyright 2001, 2002 Sun Microsystems Inc., 6 | * Copyright 2001, 2002 Ximian, Inc. 7 | * 8 | * This library is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * This library is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with this library; if not, write to the 20 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 | * Boston, MA 02110-1301, USA. 22 | */ 23 | 24 | #ifndef SPI_REGISTRY_H_ 25 | #define SPI_REGISTRY_H_ 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | typedef struct _SpiRegistry SpiRegistry; 33 | typedef struct _SpiRegistryClass SpiRegistryClass; 34 | 35 | #include "deviceeventcontroller.h" 36 | 37 | G_BEGIN_DECLS 38 | 39 | #define SPI_REGISTRY_TYPE (spi_registry_get_type ()) 40 | #define SPI_REGISTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SPI_REGISTRY_TYPE, SpiRegistry)) 41 | #define SPI_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SPI_REGISTRY_TYPE, SpiRegistryClass)) 42 | #define SPI_IS_REGISTRY(o) (G_TYPE_CHECK__INSTANCE_TYPE ((o), SPI_REGISTRY_TYPE)) 43 | #define SPI_IS_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SPI_REGISTRY_TYPE)) 44 | 45 | struct _SpiRegistry 46 | { 47 | GObject parent; 48 | SpiDEController *dec; 49 | GPtrArray *apps; 50 | dbus_int32_t id; 51 | 52 | DBusConnection *bus; 53 | char *bus_unique_name; 54 | GList *events; 55 | }; 56 | 57 | struct _SpiRegistryClass 58 | { 59 | GObjectClass parent_class; 60 | }; 61 | 62 | GType spi_registry_get_type (void); 63 | SpiRegistry *spi_registry_new (DBusConnection *bus, SpiDEController *dec); 64 | 65 | G_END_DECLS 66 | 67 | #endif /* SPI_REGISTRY_H_ */ 68 | -------------------------------------------------------------------------------- /registryd/ucs2keysym.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$#" = 0 ] 4 | then 5 | echo "Usage: $0 /path/to/keysymdef.h" 6 | exit 1 7 | fi 8 | 9 | # We are only interested in 10 | # - keysyms which have well-defined unicode equivalent 11 | # - and are not just trivial unicode keysyms 12 | # - non-latin1 keysyms 13 | # - not the lamda aliases 14 | # and we tinker with the alias parentheses to make sorting easier 15 | 16 | grep '^#define' "$1" | \ 17 | grep -i "U+" | \ 18 | grep -vi "0x100[0-9a-f][0-9a-f][0-9a-f][0-9a-f]" | \ 19 | grep -vi " 0x00[0-9a-f][0-9a-f] " | \ 20 | grep -vi "_lamda " | \ 21 | sed -e 's/\/\*(/& /' | \ 22 | sed -e 's/)\*\// &/' | \ 23 | sort -k 5 | \ 24 | perl -CS -e ' 25 | my $last = 0; 26 | while (<>) { 27 | chomp; 28 | if ( /^\#define XK_([a-zA-Z_0-9]+)(\s*) 0x([0-9a-f]+)\s*\/\*(\(?) U\+([0-9A-F]{4,6}) (.*) \)?\*\/\s*$/ ) { 29 | my ( $xk, $space, $keysym, $paren, $unicode, $unistr ) = ( $1, $2, $3, $4, $5, $6); 30 | $unicode = hex("0x".$unicode); 31 | 32 | print "\n" if (int($unicode / 256) != int($last / 256)); 33 | $last = $unicode; 34 | 35 | printf " { 0x$keysym, 0x%04x }, /* $space$xk %lc $unistr */\n", $unicode, $unicode; 36 | } 37 | } 38 | ' 39 | -------------------------------------------------------------------------------- /subprojects/gi-docgen.wrap: -------------------------------------------------------------------------------- 1 | [wrap-git] 2 | directory=gi-docgen 3 | url=https://gitlab.gnome.org/GNOME/gi-docgen.git 4 | push-url=git@gitlab.gnome.org:GNOME/gi-docgen.git 5 | revision=main 6 | depth=1 7 | 8 | [provide] 9 | program_names = gi-docgen 10 | -------------------------------------------------------------------------------- /subprojects/glib.wrap: -------------------------------------------------------------------------------- 1 | [wrap-git] 2 | directory=glib 3 | url=https://gitlab.gnome.org/GNOME/glib.git 4 | push-url=git@gitlab.gnome.org:GNOME/glib.git 5 | revision=main 6 | depth=1 7 | 8 | [provide] 9 | dependency_names = gthread-2.0, gobject-2.0, gmodule-no-export-2.0, gmodule-export-2.0, gmodule-2.0, glib-2.0, gio-2.0, gio-windows-2.0, gio-unix-2.0 10 | program_names = glib-genmarshal, glib-mkenums, glib-compile-schemas, glib-compile-resources, gio-querymodules, gdbus-codegen 11 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | /.deps 2 | /.libs 3 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/atk-object-xml-loader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2014 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef ATK_OBJECT_XML_LOADER_H 24 | #define ATK_OBJECT_XML_LOADER_H 25 | 26 | #include "my-atk.h" 27 | #include 28 | 29 | MyAtkObject *atk_object_xml_parse (gchar *filename); 30 | 31 | #endif /*ATK_OBJECT_XML_LOADER_H*/ 32 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/atk_suite.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2014 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #include "atk_suite.h" 24 | #include "atk_test_util.h" 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | static void 33 | atk_suite_build (void) 34 | { 35 | atk_test_accessible (); 36 | atk_test_action (); 37 | atk_test_component (); 38 | atk_test_collection (); 39 | atk_test_document (); 40 | 41 | atk_test_editable_text (); 42 | atk_test_hyperlink (); 43 | atk_test_hypertext (); 44 | atk_test_image (); 45 | atk_test_selection (); 46 | atk_test_state_set (); 47 | atk_test_table (); 48 | atk_test_table_cell (); 49 | atk_test_text (); 50 | atk_test_value (); 51 | } 52 | 53 | int 54 | main (int argc, char **argv) 55 | { 56 | int init_result; 57 | 58 | g_test_init (&argc, &argv, NULL); 59 | 60 | setlocale (LC_ALL, ""); 61 | init_result = atspi_init (); 62 | if (init_result != 0) 63 | { 64 | g_error ("Could not initialize atspi, code %d", init_result); 65 | } 66 | 67 | fixture_listener_init (); 68 | 69 | atk_suite_build (); 70 | 71 | int result = g_test_run (); 72 | g_assert_cmpint (result, ==, 0); 73 | 74 | int leaked = atspi_exit (); 75 | g_assert_cmpint (leaked, ==, 0); 76 | 77 | return 0; 78 | } 79 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/atk_suite.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2014 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef _ATK_SUITE_H 24 | #define _ATK_SUITE_H 25 | 26 | #include 27 | 28 | void atk_test_accessible (void); 29 | void atk_test_action (void); 30 | void atk_test_component (void); 31 | void atk_test_collection (void); 32 | void atk_test_document (void); 33 | void atk_test_editable_text (void); 34 | void atk_test_hyperlink (void); 35 | void atk_test_hypertext (void); 36 | void atk_test_image (void); 37 | void atk_test_selection (void); 38 | void atk_test_state_set (void); 39 | void atk_test_table (void); 40 | void atk_test_table_cell (void); 41 | void atk_test_text (void); 42 | void atk_test_value (void); 43 | 44 | #endif /* _ATK_SUITE_H */ 45 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/atk_test_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef _ATK_TEST_UTIL_H 24 | #define _ATK_TEST_UTIL_H 25 | 26 | #include "atk_suite.h" 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | typedef enum 37 | { 38 | FIXTURE_STATE_WAITING_FOR_CHILD, 39 | FIXTURE_STATE_CHILD_ACQUIRED, 40 | } FixtureState; 41 | 42 | typedef struct 43 | { 44 | FixtureState state; 45 | 46 | char *name_to_claim; 47 | 48 | guint wait_for_test_app_timeout; 49 | gboolean test_app_timed_out; 50 | pid_t child_pid; 51 | 52 | AtspiAccessible *root_obj; 53 | } TestAppFixture; 54 | 55 | extern pid_t child_pid; 56 | 57 | void fixture_listener_init (void); 58 | void fixture_listener_destroy (void); 59 | void fixture_setup (TestAppFixture *fixture, gconstpointer user_data); 60 | void fixture_teardown (TestAppFixture *fixture, gconstpointer user_data); 61 | 62 | void check_name (AtspiAccessible *accessible, const char *expected_name); 63 | #endif /* _ATK_TEST_UTIL_H */ 64 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-accessible.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-action.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-collection.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-component.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-document.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-editable-text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-hypertext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-selection.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-text.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test-value.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/data/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/meson.build: -------------------------------------------------------------------------------- 1 | dummyatk_sources = [ 2 | 'my-atk-action.c', 3 | 'my-atk-component.c', 4 | 'my-atk-document.c', 5 | 'my-atk-editable-text.c', 6 | 'my-atk-hyperlink.c', 7 | 'my-atk-hypertext.c', 8 | 'my-atk-image.c', 9 | 'my-atk-text.c', 10 | 'my-atk-object.c', 11 | 'my-atk-table.c', 12 | 'my-atk-table-cell.c', 13 | 'my-atk-selection.c', 14 | 'my-atk-value.c', 15 | ] 16 | 17 | dummyatk = static_library('dummyatk', dummyatk_sources, 18 | include_directories: root_inc, 19 | dependencies: [ glib_dep, gobject_dep, libatk_dep ]) 20 | 21 | dummyatk_dep = declare_dependency(link_with: dummyatk, 22 | dependencies: [ glib_dep, gobject_dep, libatk_dep ], 23 | include_directories: include_directories('.')) 24 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-component.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef MY_ATK_COMPONENT_H 24 | #define MY_ATK_COMPONENT_H 25 | 26 | #include 27 | 28 | #define MY_TYPE_ATK_COMPONENT (my_atk_component_get_type ()) 29 | #define MY_ATK_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_COMPONENT, MyAtkComponent)) 30 | #define MY_ATK_COMPONENT_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_COMPONENT, MyAtkComponentClass)) 31 | #define MY_IS_ATK_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_COMPONENT)) 32 | #define MY_IS_ATK_COMPONENT_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_COMPONENT)) 33 | #define MY_ATK_COMPONENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_COMPONENT, MyAtkComponentClass)) 34 | 35 | typedef struct _MyAtkComponent MyAtkComponent; 36 | typedef struct _MyAtkComponentClass MyAtkComponentClass; 37 | 38 | typedef void (*MyAtkComponentFunc) (MyAtkComponent *component); 39 | 40 | struct _MyAtkComponent 41 | { 42 | MyAtkObject parent; 43 | AtkRectangle extent; 44 | gboolean extent_may_change; 45 | gboolean is_manage_descendants; 46 | AtkLayer layer; 47 | gint zorder; 48 | gdouble alpha; 49 | }; 50 | 51 | struct _MyAtkComponentClass 52 | { 53 | MyAtkObjectClass parent; 54 | }; 55 | 56 | GType my_atk_component_get_type (); 57 | 58 | void my_atk_component_set_layer (AtkComponent *component, AtkLayer layer); 59 | void my_atk_component_set_mdi_zorder (AtkComponent *component, gint mdi_zorder); 60 | void my_atk_component_set_alpha (AtkComponent *component, gdouble alpha); 61 | 62 | #endif /*MY_ATK_COMPONENT_H*/ 63 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-document.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef MY_ATK_DOCUMENT_H 24 | #define MY_ATK_DOCUMENT_H 25 | 26 | #include "my-atk-object.h" 27 | #include 28 | #include 29 | #include 30 | 31 | #define MY_TYPE_ATK_DOCUMENT (my_atk_document_get_type ()) 32 | #define MY_ATK_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_DOCUMENT, MyAtkDocument)) 33 | #define MY_ATK_DOCUMENT_CLASS(vdocument) (G_TYPE_CHECK_CLASS_CAST ((vdocument), MY_TYPE_ATK_DOCUMENT, MyAtkDocumentClass)) 34 | #define MY_IS_ATK_DOCUMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_DOCUMENT)) 35 | #define MY_IS_ATK_DOCUMENT_CLASS(vdocument) (G_TYPE_CHECK_CLASS_TYPE ((vdocument), MY_TYPE_ATK_DOCUMENT)) 36 | #define MY_ATK_DOCUMENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_DOCUMENT, MyAtkDocumentClass)) 37 | 38 | // default string values 39 | #define DEF_LOCALE_TEXT "en-US" 40 | #define DEF_TYPE_TEXT "default type" 41 | 42 | typedef struct _MyAtkDocument MyAtkDocument; 43 | typedef struct _MyAtkDocumentClass MyAtkDocumentClass; 44 | 45 | struct _MyAtkDocument 46 | { 47 | MyAtkObject parent; 48 | gboolean disposed; 49 | gchar *locale; 50 | gchar *document_type; 51 | gint pages; 52 | gint current_page; 53 | AtkAttributeSet *attributes; 54 | GArray *text_selections; 55 | }; 56 | 57 | struct _MyAtkDocumentClass 58 | { 59 | MyAtkObjectClass parent; 60 | }; 61 | 62 | GType my_atk_document_get_type (void); 63 | 64 | void my_atk_set_document (AtkDocument *obj, gint page, gint page_num); 65 | 66 | #endif /*MY_ATK_DOCUMENT_H*/ 67 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-editable-text.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef MY_ATK_EDITABLE_TEXT_H_ 24 | #define MY_ATK_EDITABLE_TEXT_H_ 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #include "my-atk-object.h" 31 | 32 | #define MY_TYPE_ATK_EDITABLE_TEXT (my_atk_editable_text_get_type ()) 33 | #define MY_ATK_EDITABLE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_EDITABLE_TEXT, MyAtkEditableText)) 34 | #define MY_ATK_EDITABLE_TEXT_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_EDITABLE_TEXT, MyAtkEditableTextClass)) 35 | #define MY_IS_ATK_EDITABLE_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_EDITABLE_TEXT)) 36 | #define MY_IS_ATK_EDITABLE_TEXT_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_EDITABLE_TEXT)) 37 | #define MY_ATK_EDITABLE_TEXT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_EDITABLE_TEXT, MyAtkEditableTextClass)) 38 | 39 | typedef struct _MyAtkEditableText MyAtkEditableText; 40 | typedef struct _MyAtkEditableTextClass MyAtkEditableTextClass; 41 | 42 | typedef void (*MyAtkEditableTextFunc) (MyAtkEditableText *editable_text); 43 | 44 | struct _MyAtkEditableText 45 | { 46 | MyAtkObject parent; 47 | gchar *text; 48 | }; 49 | 50 | struct _MyAtkEditableTextClass 51 | { 52 | MyAtkObjectClass parent; 53 | }; 54 | 55 | GType my_atk_editable_text_get_type (void); 56 | 57 | guint my_atk_set_editable_text (AtkEditableText *editable_text, const gchar *text); 58 | 59 | #endif /* MY_ATK_EDITABLE_TEXT_H_ */ 60 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-hyperlink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Codethink Ltd. 3 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef MY_ATK_HYPERLINK_H_ 22 | #define MY_ATK_HYPERLINK_H_ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "my-atk-object.h" 29 | 30 | #define MY_TYPE_ATK_HYPERLINK (my_atk_hyperlink_get_type ()) 31 | #define MY_ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_HYPERLINK, MyAtkHyperlink)) 32 | #define MY_ATK_HYPERLINK_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_HYPERLINK, MyAtkHyperlinkClass)) 33 | #define MY_IS_ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_HYPERLINK)) 34 | #define MY_IS_ATK_HYPERLINK_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_HYPERLINK)) 35 | #define MY_ATK_HYPERLINK_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_HYPERLINK, MyAtkHyperlinkClass)) 36 | 37 | typedef struct _MyAtkHyperlink MyAtkHyperlink; 38 | typedef struct _MyAtkHyperlinkClass MyAtkHyperlinkClass; 39 | 40 | struct _MyAtkHyperlink 41 | { 42 | MyAtkObject parent; 43 | gchar *uri; 44 | gint start; 45 | gint end; 46 | gboolean state; 47 | gboolean selected; 48 | }; 49 | 50 | struct _MyAtkHyperlinkClass 51 | { 52 | MyAtkObjectClass parent; 53 | }; 54 | 55 | GType my_atk_hyperlink_get_type (void); 56 | 57 | MyAtkHyperlink *new_MyAtkHyperlink (void); 58 | 59 | gint my_atk_set_hyperlink (AtkHyperlink *obj, const gchar *uri, gint start, gint end); 60 | 61 | #endif /* MY_ATK_HYPERLINK_H_ */ 62 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-hypertext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Codethink Ltd. 3 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef MY_ATK_HYPERTEXT_H_ 22 | #define MY_ATK_HYPERTEXT_H_ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "my-atk-object.h" 29 | #define MY_TYPE_ATK_HYPERTEXT (my_atk_hypertext_get_type ()) 30 | #define MY_ATK_HYPERTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_HYPERTEXT, MyAtkHypertext)) 31 | #define MY_ATK_HYPERTEXT_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_HYPERTEXT, MyAtkHypertextClass)) 32 | #define MY_IS_ATK_HYPERTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_HYPERTEXT)) 33 | #define MY_IS_ATK_HYPERTEXT_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_HYPERTEXT)) 34 | #define MY_ATK_HYPERTEXT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_HYPERTEXT, MyAtkHypertextClass)) 35 | 36 | typedef struct _MyAtkHypertext MyAtkHypertext; 37 | typedef struct _MyAtkHypertextClass MyAtkHypertextClass; 38 | 39 | struct _MyAtkHypertext 40 | { 41 | MyAtkObject parent; 42 | GPtrArray *array; 43 | }; 44 | 45 | struct _MyAtkHypertextClass 46 | { 47 | MyAtkObjectClass parent; 48 | }; 49 | 50 | GType my_atk_hypertext_get_type (void); 51 | 52 | gint my_atk_set_hypertext (AtkHypertext *obj, const gchar *text); 53 | 54 | #endif /* MY_ATK_HYPERTEXT_H_ */ 55 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2014 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef MY_ATK_OBJECT_H 24 | #define MY_ATK_OBJECT_H 25 | 26 | #include 27 | 28 | #define MY_TYPE_ATK_OBJECT (my_atk_object_get_type ()) 29 | #define MY_ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_OBJECT, MyAtkObject)) 30 | #define MY_ATK_OBJECT_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_OBJECT, MyAtkObjectClass)) 31 | #define MY_IS_ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_OBJECT)) 32 | #define MY_IS_ATK_OBJECT_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_OBJECT)) 33 | #define MY_ATK_OBJECT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_OBJECT, MyAtkObjectClass)) 34 | 35 | typedef struct _MyAtkObject MyAtkObject; 36 | typedef struct _MyAtkObjectClass MyAtkObjectClass; 37 | 38 | struct _MyAtkObject 39 | { 40 | AtkObject parent; 41 | AtkStateSet *state_set; 42 | AtkRelationSet *relation_set; 43 | GPtrArray *children; 44 | gint id; 45 | gboolean selected; 46 | }; 47 | 48 | struct _MyAtkObjectClass 49 | { 50 | AtkObjectClass parent; 51 | }; 52 | 53 | GType my_atk_object_get_type (); 54 | 55 | void my_atk_object_add_child (MyAtkObject *parent, 56 | MyAtkObject *child); 57 | 58 | void my_atk_object_remove_child (MyAtkObject *parent, 59 | MyAtkObject *child); 60 | 61 | #endif /*MY_ATK_OBJECT_H*/ 62 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-selection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef MY_ATK_SELECTION_H 24 | #define MY_ATK_SELECTION_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #include "my-atk-object.h" 31 | 32 | #define MY_TYPE_ATK_SELECTION (my_atk_selection_get_type ()) 33 | #define MY_ATK_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_SELECTION, MyAtkSelection)) 34 | #define MY_ATK_SELECTION_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_SELECTION, MyAtkSelectionClass)) 35 | #define MY_IS_ATK_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_SELECTION)) 36 | #define MY_IS_ATK_SELECTION_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_SELECTION)) 37 | #define MY_ATK_SELECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_SELECTION, MyAtkSelectionClass)) 38 | 39 | /* Number of child objects for the MyAtkSelection instance */ 40 | #define TEST_SELECTION_NCHILDREN 10 41 | 42 | typedef struct _MyAtkSelection MyAtkSelection; 43 | typedef struct _MyAtkSelectionClass MyAtkSelectionClass; 44 | 45 | struct _MyAtkSelection 46 | { 47 | MyAtkObject parent; 48 | // gboolean disposed; 49 | // gboolean multisel_supported; 50 | // MyAtkObject* child[TEST_SELECTION_NCHILDREN]; 51 | // gboolean is_selected[TEST_SELECTION_NCHILDREN]; 52 | }; 53 | 54 | struct _MyAtkSelectionClass 55 | { 56 | MyAtkObjectClass parent; 57 | }; 58 | 59 | GType my_atk_selection_get_type (void); 60 | 61 | guint my_atk_selection_set (MyAtkSelection *selection); 62 | #endif /*MY_ATK_SELECTION_H*/ 63 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-table-cell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Codethink Ltd. 3 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef MY_ATK_TABLE_CELL_H_ 22 | #define MY_ATK_TABLE_CELL_H_ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "my-atk-object.h" 29 | #define MY_TYPE_ATK_TABLE_CELL (my_atk_tablecell_get_type ()) 30 | #define MY_ATK_TABLE_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_TABLE_CELL, MyAtkTableCell)) 31 | #define MY_ATK_TABLE_CELL_CLASS (vtablecell) (G_TYPE_CHECK_CLASS_CAST ((vtablecell), MY_TYPE_ATK_TABLE_CELL, MyAtkTableCellClass)) 32 | #define MY_IS_ATK_TABLE_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_TABLE_CELL)) 33 | #define MY_IS_ATK_TABLE_CELL_CLASS (vtablecell) (G_TYPE_CHECK_CLASS_TYPE ((vtablecell), MY_TYPE_ATK_TABLE_CELL)) 34 | #define MY_ATK_TABLE_CELL_GET_CLASS (inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_TABLE_CELL, MyAtkTableCellClass)) 35 | 36 | typedef struct _MyAtkTableCell MyAtkTableCell; 37 | typedef struct _MyAtkTableCellClass MyAtkTableCellClass; 38 | 39 | struct _MyAtkTableCell 40 | { 41 | MyAtkObject parent; 42 | MyAtkObject *parent_table; 43 | gpointer value; 44 | gint x; 45 | gint y; 46 | gint column_span; 47 | gint row_span; 48 | gint column_index; 49 | gboolean selected; 50 | gchar *row_desc; 51 | gint xy[2]; 52 | }; 53 | 54 | struct _MyAtkTableCellClass 55 | { 56 | MyAtkObjectClass parent; 57 | }; 58 | 59 | GType my_atk_tablecell_get_type (void); 60 | 61 | gboolean my_atk_set_table_cell (AtkTableCell *self, gint x, gint y, gint row, gint column); 62 | gboolean my_atk_set_tablecell (MyAtkTableCell *self, gpointer value, const gchar *row_desc, MyAtkObject *parent_table, gboolean selected, gint *xy); 63 | 64 | #endif /* MY_ATK_TABLE_CELL_H_ */ 65 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk-value.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Codethink Ltd. 3 | * Copyright (c) 2015 Samsung Electronics Co., Ltd. 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef MY_ATK_VALUE_H_ 22 | #define MY_ATK_VALUE_H_ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "my-atk-object.h" 29 | #define MY_TYPE_ATK_VALUE (my_atk_value_get_type ()) 30 | #define MY_ATK_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_VALUE, MyAtkValue)) 31 | #define MY_ATK_VALUE_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_VALUE, MyAtkValueClass)) 32 | #define MY_IS_ATK_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_VALUE)) 33 | #define MY_IS_ATK_VALUE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_VALUE)) 34 | #define MY_ATK_VALUE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_VALUE, MyAtkValueClass)) 35 | 36 | typedef struct _MyAtkValue MyAtkValue; 37 | typedef struct _MyAtkValueClass MyAtkValueClass; 38 | 39 | struct _MyAtkValue 40 | { 41 | MyAtkObject parent; 42 | gdouble min; 43 | gdouble cur; 44 | gdouble max; 45 | gdouble step; 46 | }; 47 | 48 | struct _MyAtkValueClass 49 | { 50 | MyAtkObjectClass parent; 51 | }; 52 | 53 | GType my_atk_value_get_type (void); 54 | 55 | guint my_atk_set_value (AtkValue *obj, gdouble min, gdouble cur, gdouble max, gdouble step); 56 | 57 | #endif /* MY_ATK_VALUE_H_ */ 58 | -------------------------------------------------------------------------------- /tests/at-spi2-atk/dummyatk/my-atk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AT-SPI - Assistive Technology Service Provider Interface 3 | * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility) 4 | * 5 | * Copyright (c) 2014 Samsung Electronics Co., Ltd. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | */ 22 | 23 | #ifndef MY_ATK_H 24 | #define MY_ATK_H 25 | 26 | #include "my-atk-action.h" 27 | #include "my-atk-component.h" 28 | #include "my-atk-document.h" 29 | #include "my-atk-editable-text.h" 30 | #include "my-atk-hyperlink.h" 31 | #include "my-atk-hypertext.h" 32 | #include "my-atk-image.h" 33 | #include "my-atk-object.h" 34 | #include "my-atk-selection.h" 35 | #include "my-atk-table-cell.h" 36 | #include "my-atk-table.h" 37 | #include "my-atk-text.h" 38 | #include "my-atk-value.h" 39 | 40 | #endif /*MY_ATK_H*/ 41 | -------------------------------------------------------------------------------- /tests/atk/README: -------------------------------------------------------------------------------- 1 | teststateset 2 | ============ 3 | This module tests the interfaces in atk/atkstateset.h 4 | 5 | testrelation 6 | ============ 7 | This module tests the interfaces in atk/atkrelation.h 8 | 9 | testrole 10 | ======== 11 | This module tests the methods related with roles and role names, 12 | defined at atk/atkobject.h -------------------------------------------------------------------------------- /tests/atk/meson.build: -------------------------------------------------------------------------------- 1 | tests = [ 2 | 'testdocument', 3 | 'testrole', 4 | 'testrelation', 5 | 'teststateset', 6 | 'testvalue', 7 | ] 8 | 9 | foreach test_name: tests 10 | test_src = test_name + '.c' 11 | test_bin = executable(test_name, test_src, 12 | dependencies: libatk_dep, 13 | include_directories: root_inc, 14 | c_args: common_cflags + [ 15 | '-DG_DISABLE_DEPRECATED', 16 | ], 17 | ) 18 | 19 | test(test_name, test_bin, 20 | env: [ 21 | 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), 22 | 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), 23 | ], 24 | ) 25 | endforeach 26 | -------------------------------------------------------------------------------- /tests/atk/testatk_vc.mak: -------------------------------------------------------------------------------- 1 | !include ..\build\detectenv-msvc.mak 2 | 3 | LD_CFLAGS = /link 4 | EXEEXT = .exe 5 | GLIB_LIBS = gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib 6 | 7 | ATK_API_VERSION = 1.0 8 | 9 | BUILD_PATH = ..\build\win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin 10 | LDFLAGS_PATH = /libpath:$(BUILD_PATH) /libpath:..\..\vs$(VSVER)\$(PLAT)\lib 11 | 12 | TEST_ATK_LIBS = atk-$(ATK_API_VERSION).lib $(GLIB_LIBS) 13 | 14 | LDFLAGS = \ 15 | $(LDFLAGS_PATH) \ 16 | $(LDFLAGS_ARCH) 17 | 18 | CFLAGS = \ 19 | $(CFLAGS_ADD) /DG_DISABLE_DEPRECATED /I.. \ 20 | /I..\..\vs$(VSVER)\$(PLAT)\include\glib-2.0 \ 21 | /I..\..\vs$(VSVER)\$(PLAT)\lib\glib-2.0\include \ 22 | /I..\..\vs$(VSVER)\$(PLAT)\include\glib-2.0 23 | 24 | EMPTY_ITEM = 25 | 26 | test_programs = \ 27 | testdocument$(EXEEXT) \ 28 | testrole$(EXEEXT) \ 29 | testrelation$(EXEEXT) \ 30 | teststateset$(EXEEXT) \ 31 | testvalue$(EXEEXT) \ 32 | $(EMPTY_ITEM) 33 | 34 | !if "$(VALID_CFGSET)" == "FALSE" 35 | all: 36 | !@-echo You need to run "nmake -f testatk_vc.mak CFG=release" or 37 | !@-echo "nmake -f testatk_vc.mak CFG=debug" to use this Makefile to 38 | !@-echo build the test programs. 39 | 40 | clean: 41 | @-del /q/f *$(EXEEXT).manifest 42 | @-del /q/f *$(EXEEXT) 43 | @-del /q/f *.idb 44 | @-del /q/f *.obj 45 | @-del /q/f *.pdb 46 | !else 47 | all: $(test_programs) 48 | 49 | .c$(EXEEXT): 50 | $(CC) $(CFLAGS) $< $(LD_CFLAGS) $(LDFLAGS) $(TEST_ATK_LIBS) /Fe$@ 51 | @-if exist $@.manifest mt /nologo /manifest $@.manifest /outputresource:$@;1 52 | 53 | clean: 54 | @-del /q/f *$(EXEEXT).manifest 55 | @-del /q/f *$(EXEEXT) 56 | @-del /q/f *.idb 57 | @-del /q/f *.obj 58 | @-del /q/f *.pdb 59 | !endif 60 | -------------------------------------------------------------------------------- /tests/atk/testrole.c: -------------------------------------------------------------------------------- 1 | /* ATK - Accessibility Toolkit 2 | * Copyright (C) 2013 Igalia, S.L. 3 | * 4 | * Author: Alejandro Piñeiro Iglesias 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | #include 22 | #include 23 | 24 | static void 25 | test_role (void) 26 | { 27 | AtkRole role1, role2; 28 | const gchar *name; 29 | 30 | name = atk_role_get_name (ATK_ROLE_PAGE_TAB); 31 | g_assert_cmpstr (name, ==, "page tab"); 32 | 33 | name = atk_role_get_name (ATK_ROLE_LAYERED_PANE); 34 | g_assert_cmpstr (name, ==, "layered pane"); 35 | 36 | role1 = atk_role_for_name ("list item"); 37 | g_assert_cmpint (role1, ==, ATK_ROLE_LIST_ITEM); 38 | 39 | role2 = atk_role_for_name ("TEST_ROLE"); 40 | g_assert_cmpint (role2, ==, ATK_ROLE_INVALID); 41 | /* 42 | * Check that a non-existent role returns NULL 43 | */ 44 | g_assert_null (atk_role_get_name (ATK_ROLE_LAST_DEFINED + 2)); 45 | } 46 | 47 | int 48 | main (gint argc, 49 | char *argv[]) 50 | { 51 | g_test_init (&argc, &argv, NULL); 52 | g_test_add_func ("/atk/role/roles", test_role); 53 | 54 | return g_test_run (); 55 | } 56 | -------------------------------------------------------------------------------- /tests/atspi/meson.build: -------------------------------------------------------------------------------- 1 | testapp = executable('test-application', 2 | 'test-application.c', 3 | include_directories: root_inc, 4 | dependencies: [ atspi_dep ], 5 | ) 6 | 7 | memory = executable('memory', 8 | 'memory.c', 9 | include_directories: root_inc, 10 | dependencies: [ atspi_dep ], 11 | ) 12 | 13 | test( 14 | 'memory', 15 | memory, 16 | depends: testapp, 17 | is_parallel: false, 18 | ) 19 | -------------------------------------------------------------------------------- /tests/meson.build: -------------------------------------------------------------------------------- 1 | subdir('atspi') 2 | subdir('atk') 3 | subdir('at-spi2-atk') 4 | -------------------------------------------------------------------------------- /tests/registryd/__init__.py: -------------------------------------------------------------------------------- 1 | dummy = "hello" 2 | -------------------------------------------------------------------------------- /tests/registryd/test_introspection.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import dbus 3 | import xml.etree.ElementTree as ElementTree 4 | 5 | INTROSPECTABLE_IFACE = 'org.freedesktop.DBus.Introspectable' 6 | 7 | # obj: a dbus proxy object to introspect 8 | # expected_ifaces: sequence of interface names as strings 9 | def check_object_supports_interfaces(obj, expected_ifaces): 10 | xml_str = str(obj.Introspect(dbus_interface=INTROSPECTABLE_IFACE)) 11 | root = ElementTree.fromstring(xml_str) 12 | assert root.tag == 'node' 13 | 14 | interface_elements = root.findall('./interface') 15 | iface_names = map(lambda e: e.attrib['name'], interface_elements) 16 | iface_names = list(iface_names) 17 | iface_names.sort() 18 | 19 | expected_ifaces.sort() 20 | 21 | assert iface_names == expected_ifaces 22 | 23 | # Test that the root object at /org/a11y/atspi/accessible/root advertises the correct interfaces 24 | def test_introspect_root(registry_root, session_manager): 25 | check_object_supports_interfaces( 26 | registry_root, 27 | ['org.a11y.atspi.Accessible', 28 | 'org.a11y.atspi.Component', 29 | 'org.a11y.atspi.Socket', 30 | ] 31 | ) 32 | 33 | # Test that the registry object at /org/a11y/atspi/registry advertises the correct interfaces 34 | def test_introspect_registry(registry_registry, session_manager): 35 | check_object_supports_interfaces( 36 | registry_registry, 37 | ['org.a11y.atspi.Registry'] 38 | ) 39 | -------------------------------------------------------------------------------- /tests/registryd/test_root.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import dbus 3 | 4 | from utils import check_unknown_property_yields_error 5 | 6 | def test_root_property_on_invalid_interface(registry_root, session_manager): 7 | check_unknown_property_yields_error(registry_root, 'this.is.not.a.supported.interface') 8 | -------------------------------------------------------------------------------- /tests/registryd/test_root_application.py: -------------------------------------------------------------------------------- 1 | # Pytest will pick up this module automatically when running just "pytest". 2 | # 3 | # Each test_*() function gets passed test fixtures, which are defined 4 | # in conftest.py. So, a function "def test_foo(bar)" will get a bar() 5 | # fixture created for it. 6 | 7 | import pytest 8 | import dbus 9 | 10 | from utils import get_property, check_unknown_property_yields_error 11 | 12 | APPLICATION_IFACE = 'org.a11y.atspi.Application' 13 | 14 | def test_application_iface_properties(registry_root, session_manager): 15 | values = [ 16 | ('ToolkitName', 'at-spi-registry'), 17 | ('Version', '2.0'), 18 | ] 19 | 20 | for prop_name, expected in values: 21 | assert get_property(registry_root, APPLICATION_IFACE, prop_name) == expected 22 | 23 | def test_unknown_property_yields_error(registry_root, session_manager): 24 | check_unknown_property_yields_error(registry_root, APPLICATION_IFACE) 25 | -------------------------------------------------------------------------------- /tests/registryd/test_root_component.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import dbus 3 | 4 | COMPONENT_IFACE = 'org.a11y.atspi.Component' 5 | 6 | COORD_TYPE_WINDOW = 1 7 | LAYER_WIDGET = 3 8 | 9 | def test_contains(registry_root, session_manager): 10 | assert registry_root.Contains(0, 0, COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) == False 11 | 12 | def test_get_accessible_at_point(registry_root, session_manager): 13 | (name, path) = registry_root.GetAccessibleAtPoint(0, 0, COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) 14 | assert path == '/org/a11y/atspi/null' 15 | 16 | def test_get_extents(registry_root, session_manager): 17 | assert registry_root.GetExtents(COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) == (0, 0, 1024, 768) 18 | 19 | def test_get_position(registry_root, session_manager): 20 | assert registry_root.GetPosition(COORD_TYPE_WINDOW, dbus_interface=COMPONENT_IFACE) == (0, 0) 21 | 22 | def test_get_size(registry_root, session_manager): 23 | assert registry_root.GetSize(dbus_interface=COMPONENT_IFACE) == (1024, 768) 24 | 25 | def test_get_layer(registry_root, session_manager): 26 | assert registry_root.GetLayer(dbus_interface=COMPONENT_IFACE) == LAYER_WIDGET 27 | 28 | def test_get_mdi_z_order(registry_root, session_manager): 29 | assert registry_root.GetMDIZOrder(dbus_interface=COMPONENT_IFACE) == 0 30 | 31 | def test_grab_focus(registry_root, session_manager): 32 | assert registry_root.GrabFocus(dbus_interface=COMPONENT_IFACE) == False 33 | 34 | def test_get_alpha(registry_root, session_manager): 35 | assert registry_root.GetAlpha(dbus_interface=COMPONENT_IFACE) == 1.0 36 | -------------------------------------------------------------------------------- /tests/registryd/utils.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import dbus 3 | 4 | PROPERTIES_IFACE = 'org.freedesktop.DBus.Properties' 5 | 6 | def get_property(proxy, iface_name, prop_name): 7 | return proxy.Get(iface_name, prop_name, dbus_interface=PROPERTIES_IFACE) 8 | 9 | def check_unknown_property_yields_error(obj, iface): 10 | with pytest.raises(dbus.exceptions.DBusException): 11 | get_property(obj, iface, 'NonexistentProperty') 12 | -------------------------------------------------------------------------------- /xml/Collection.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /xml/DeviceEventListener.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /xml/Document.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /xml/EditableText.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /xml/Hyperlink.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /xml/Hypertext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /xml/Image.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /xml/Registry.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /xml/Selection.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /xml/TableCell.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /xml/Value.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /xml/meson.build: -------------------------------------------------------------------------------- 1 | generator = find_program('generate-introspection.py') 2 | 3 | introspection_sources = [ 4 | 'Accessible.xml', 5 | 'Action.xml', 6 | 'Application.xml', 7 | 'Cache.xml', 8 | 'Collection.xml', 9 | 'Component.xml', 10 | 'DeviceEventController.xml', 11 | 'DeviceEventListener.xml', 12 | 'Document.xml', 13 | 'EditableText.xml', 14 | 'Event.xml', 15 | 'Hyperlink.xml', 16 | 'Hypertext.xml', 17 | 'Image.xml', 18 | 'Registry.xml', 19 | 'Selection.xml', 20 | 'Socket.xml', 21 | 'Table.xml', 22 | 'TableCell.xml', 23 | 'Text.xml', 24 | 'Value.xml', 25 | ] 26 | 27 | introspection_generated = custom_target( 28 | 'introspection_generated', 29 | input: introspection_sources, 30 | output: [ 'introspection.c', 'introspection.h' ], 31 | command: [ generator, '@INPUT@', '--c-output=@OUTPUT0@', '--h-output=@OUTPUT1@' ], 32 | ) 33 | --------------------------------------------------------------------------------