From f1e9590bafb75e3810b01655f45fb57aba548874 Mon Sep 17 00:00:00 2001 From: Pawel Kurowski Date: Tue, 16 Jan 2018 15:42:06 +0100 Subject: [PATCH 01/16] Redefine universal-switch vconf keys. Change-Id: Ib01e580d4b263af6694cd473a3c313d6cdfc8bd6 --- bus/at-spi-bus-launcher.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index ee4735d..9fb138e 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -36,8 +36,8 @@ #endif //TODO: move to vconf/vconf-internal-setting-keys.h? -#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH "db/setting/accessibility/universal-switch" -#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SCANNING "db/setting/accessibility/universal-switch/scanning" +#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE "db/setting/accessibility/universal-switch/configuration-service" +#define VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE "db/setting/accessibility/universal-switch/interaction-service" #define MAX_NUMBER_OF_KEYS_PER_CLIENT 2 @@ -1076,8 +1076,8 @@ main (int argc, _global_app->universal_switch.name = "universal-switch"; _global_app->universal_switch.app_control_operation = APP_CONTROL_OPERATION_UNIVERSAL_SWITCH; - _global_app->universal_switch.vconf_key[0] = VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH; - _global_app->universal_switch.vconf_key[1] = VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_SCANNING; + _global_app->universal_switch.vconf_key[0] = VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_CONFIGURATION_SERVICE; + _global_app->universal_switch.vconf_key[1] = VCONFKEY_SETAPPL_ACCESSIBILITY_UNIVERSAL_SWITCH_INTERACTION_SERVICE; _global_app->universal_switch.number_of_keys = 2; for (i = 1; i < argc; i++) -- 2.7.4 From 70280c8010a04900fc0f9f67d08fc9464b639615 Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Wed, 23 Jan 2019 15:38:41 +0100 Subject: [PATCH 02/16] 2.31.1 Change-Id: I5608051794e244fbcec00fbfafb9a6d71f485254 --- Makefile.am | 31 ----- NEWS | 37 +++++ atspi-2.pc.in | 11 -- atspi/Makefile.am | 160 ---------------------- atspi/atspi-collection.c | 4 +- atspi/atspi-component.c | 57 ++++++++ atspi/atspi-component.h | 4 + atspi/atspi-constants.h | 240 +++++++++++++++++++-------------- atspi/atspi-device-listener.c | 6 +- atspi/atspi-enum-types.c.template | 2 +- atspi/atspi-enum-types.h.template | 2 +- atspi/atspi-event-listener.c | 6 +- atspi/atspi-gmain.c | 18 +-- atspi/atspi-matchrule.c | 2 +- atspi/atspi-misc-private.h | 2 +- atspi/atspi-misc.c | 8 +- atspi/atspi-registry.c | 7 +- atspi/meson.build | 19 ++- autogen.sh | 18 --- bus/Makefile.am | 48 ------- bus/at-spi-bus-launcher.c | 237 ++++++++++++++++++++++++-------- bus/meson.build | 32 ++++- configure.ac | 188 -------------------------- dbind/Makefile.am | 27 ---- dbind/dbtest.c | 8 +- dbind/meson.build | 10 +- doc/Makefile.am | 4 - doc/libatspi/libatspi-docs.sgml | 2 - doc/libatspi/libatspi-sections.txt | 209 +++++++++++++++++++--------- doc/libatspi/tmpl/atspi-constants.sgml | 23 ++++ idl/component.didl | 41 +++++- idl/controller.didl | 4 +- meson.build | 18 +-- meson_options.txt | 9 ++ po/Makevars | 78 ----------- po/fr.po | 22 +-- registryd/Makefile.am | 68 ---------- registryd/de-types.h | 2 + registryd/deviceeventcontroller-x11.c | 16 ++- registryd/deviceeventcontroller.c | 6 + registryd/reentrant-list.c | 2 +- test/Makefile.am | 10 -- xml/Component.xml | 10 ++ xml/Makefile.am | 41 ------ 44 files changed, 761 insertions(+), 988 deletions(-) delete mode 100644 Makefile.am delete mode 100644 atspi-2.pc.in delete mode 100644 atspi/Makefile.am delete mode 100755 autogen.sh delete mode 100644 bus/Makefile.am delete mode 100644 configure.ac delete mode 100644 dbind/Makefile.am delete mode 100644 doc/Makefile.am delete mode 100644 po/Makevars delete mode 100644 registryd/Makefile.am delete mode 100644 test/Makefile.am delete mode 100644 xml/Makefile.am diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index dff484a..0000000 --- a/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -DISTCHECK_CONFIGURE_FLAGS = --enable-introspection --enable-gtk-doc - --include $(INTROSPECTION_MAKEFILE) -INTROSPECTION_GIRS = -INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) -INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) - -SUBDIRS = po dbind xml atspi bus registryd doc test - -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} - -EXTRA_DIST = \ - atspi-2.pc.in \ - meson.build \ - meson_options.txt - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = atspi-2.pc - -DISTCLEANFILES = \ - atspi-2.pc - -MAINTAINERCLEANFILES = \ - $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \ - $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \ - $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \ - gtk-doc.make \ - m4/gtk-doc.m4 \ - m4/intltool.m4 - --include $(top_srcdir)/git.mk diff --git a/NEWS b/NEWS index 0abf5f2..0dd86dc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,40 @@ +What's new in at-spi2-core 2.31.1: + +* Bus launcher: fix an issue where the error wasn't cleared on failure. + +* Add support for locking/unlocking modifiers. + +* Update error log text for consistency. + +* Documentation clean-ups. + +What's new in at-spi2-core 2.29.1: + +* Add dbus-broker support to bus launcher. + +* Add ScrollTo and ScrollToPoint component interfaces. + +* Do not use deprecated GSettings API + +* Fix various compiler warnings and documentation annotations. + +What's new in at-spi2-core 2.27.92: + +* Support building a static library (bgo#793652). +\ +* Fix build on FreeBSD (bgo#791608). + +What's new in at-spi2-core 2.27.1: + +* Dropped autotools support. + +* documentation: Remove list association from + ATSPI_ROLE_DESCRIPTION_{TERM,VALUE} (bgo#791021). + +* Fix a potential buffer overflow in at-spi-bus-launcher (bgo#791124). + +* Make the build reproducible (bgo#791167). + What's new in at-spi2-core 2.26.1: * Remove unused dependency on libxkbcommon. diff --git a/atspi-2.pc.in b/atspi-2.pc.in deleted file mode 100644 index 71d028a..0000000 --- a/atspi-2.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: atspi -Description: Accessibility Technology software library -Requires: dbus-1 glib-2.0 -Version: @VERSION@ -Libs: -L${libdir} -latspi -Cflags: -I${includedir}/at-spi-2.0 diff --git a/atspi/Makefile.am b/atspi/Makefile.am deleted file mode 100644 index 636cc76..0000000 --- a/atspi/Makefile.am +++ /dev/null @@ -1,160 +0,0 @@ -lib_LTLIBRARIES = - -BUILT_SOURCES = - -CLEANFILES = -DISTCLEANFILES = -EXTRA_DIST = \ - meson.build - -lib_LTLIBRARIES += libatspi.la - -libatspi_la_LDFLAGS = \ - @LDFLAGS@ @LT_VERSION_INFO@ @LIBTOOL_EXPORT_OPTIONS@ \ - -no-undefined - -libatspi_la_CFLAGS = \ - $(DBUS_CFLAGS) \ - $(DBIND_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I$(top_srcdir)/registryd \ - -I$(top_builddir)/registryd \ - -I$(top_builddir) \ - -I$(top_srcdir) - -libatspi_la_LIBADD = \ - $(DBUS_LIBS) \ - $(GOBJ_LIBS) \ - $(X11_LIBS) \ - $(top_builddir)/dbind/libdbind.la - -libatspi_la_DEPENDENCIES = $(top_builddir)/dbind/libdbind.la - -atspi_headers = \ - atspi.h \ - atspi-accessible.h \ - atspi-action.h \ - atspi-application.h \ - atspi-collection.h \ - atspi-component.h \ - atspi-constants.h \ - atspi-device-listener.h \ - atspi-device-listener-private.h \ - atspi-document.h \ - atspi-editabletext.h \ - atspi-event-listener.h \ - atspi-event-listener-private.h \ - atspi-gmain.h \ - atspi-hyperlink.h \ - atspi-hypertext.h \ - atspi-image.h \ - atspi-matchrule.h \ - atspi-misc.h \ - atspi-object.h \ - atspi-private.h \ - atspi-registry.h \ - atspi-relation.h \ - atspi-selection.h \ - atspi-stateset.h \ - atspi-table.h \ - atspi-table-cell.h \ - atspi-text.h \ - atspi-types.h \ - atspi-value.h - -libatspi_la_SOURCES = \ - $(BUILT_SOURCES) \ - atspi-accessible.c \ - atspi-accessible-private.h \ - atspi-action.c \ - atspi-application.c \ - atspi-collection.c \ - atspi-component.c \ - atspi-device-listener.c \ - atspi-device-listener-private.h \ - atspi-document.c \ - atspi-editabletext.c \ - atspi-event-listener.c \ - atspi-event-listener-private.h \ - atspi-gmain.c \ - atspi-hyperlink.c \ - atspi-hypertext.c \ - atspi-image.c \ - atspi-matchrule.c \ - atspi-matchrule-private.h \ - atspi-misc.c \ - atspi-misc-private.h \ - atspi-object.c \ - atspi-private.h \ - atspi-registry.c \ - atspi-relation.c \ - atspi-selection.c \ - atspi-stateset.c \ - atspi-table.c \ - atspi-table-cell.c \ - atspi-text.c \ - atspi-value.c \ - $() - -BUILT_SOURCES += \ - atspi-enum-types.c \ - atspi-enum-types.h - -libatspiincludedir = $(includedir)/at-spi-2.0/atspi -libatspiinclude_HEADERS = $(atspi_headers) atspi-enum-types.h - -#CLEANFILES = atspi-constants.h - -#atspi-constants.h: $(top_srcdir)/xml/spec.xml $(top_srcdir)/tools/c-constants-gen.py -# python $(top_srcdir)/tools/c-constants-gen.py Atspi $(top_srcdir)/xml/spec.xml atspi-constants - -ENUM_TYPES = \ - atspi-constants.h \ - atspi-types.h - -atspi-enum-types.h: atspi-enum-types.h.template $(ENUM_TYPES) - $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/atspi-enum-types.h.template $(addprefix $(srcdir)/, $(ENUM_TYPES)) > $@.tmp \ - && (cmp -s $@.tmp $@ || cp -f $@.tmp $@) \ - && rm -f $@.tmp - -atspi-enum-types.c: atspi-enum-types.c.template $(ENUM_TYPES) - $(AM_V_GEN) $(GLIB_MKENUMS) --template $(srcdir)/atspi-enum-types.c.template $(addprefix $(srcdir)/, $(ENUM_TYPES)) > $@.tmp \ - && (cmp -s $@.tmp $@ || cp -f $@.tmp $@) \ - && rm -f $@.tmp - -CLEANFILES += \ - atspi-enum-types.c \ - atspi-enum-types.h - -EXTRA_DIST += \ - atspi-enum-types.c.template \ - atspi-enum-types.h.template - --include $(INTROSPECTION_MAKEFILE) -INTROSPECTION_GIRS = -INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all -INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) - -if HAVE_INTROSPECTION -Atspi-2.0.gir: libatspi.la -Atspi_2_0_gir_INCLUDES = DBus-1.0 GLib-2.0 GObject-2.0 -Atspi_2_0_gir_EXPORT_PACKAGES = atspi-2 -Atspi_2_0_gir_CFLAGS = -I$(top_builddir) -I$(top_srcdir) -Atspi_2_0_gir_LIBS = libatspi.la $(top_builddir)/dbind/libdbind.la -Atspi_2_0_gir_FILES = $(libatspi_la_SOURCES) $(atspi_headers) atspi-enum-types.c atspi-enum-types.h -Atspi_2_0_gir_SCANNERFLAGS = --namespace Atspi --nsversion=2.0 -INTROSPECTION_SCANNER_ARGS += --c-include='atspi/atspi.h' -INTROSPECTION_GIRS += Atspi-2.0.gir - -girdir = $(datadir)/gir-1.0 -gir_DATA = $(INTROSPECTION_GIRS) - -typelibdir = $(libdir)/girepository-1.0 -typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) - -CLEANFILES += \ - $(gir_DATA) \ - $(typelib_DATA) -endif - --include $(top_srcdir)/git.mk diff --git a/atspi/atspi-collection.c b/atspi/atspi-collection.c index f4e33ef..d3f27da 100644 --- a/atspi/atspi-collection.c +++ b/atspi/atspi-collection.c @@ -36,7 +36,7 @@ atspi_collection_is_ancestor_of (AtspiCollection *collection, AtspiAccessible *test, GError **error) { - g_warning ("Atspi: TODO: Implement is_ancestor_of"); + g_warning ("AT-SPI: TODO: Implement is_ancestor_of"); return FALSE; } @@ -267,7 +267,7 @@ atspi_collection_get_matches_from (AtspiCollection *collection, AtspiAccessible * atspi_collection_get_active_descendant (AtspiCollection *collection, GError **error) { - g_warning ("atspi: TODO: Implement get_active_descendants"); + g_warning ("AT-SPI: TODO: Implement get_active_descendants"); return NULL; } diff --git a/atspi/atspi-component.c b/atspi/atspi-component.c index 0ab552b..ed22582 100644 --- a/atspi/atspi-component.c +++ b/atspi/atspi-component.c @@ -412,6 +412,63 @@ atspi_component_set_size (AtspiComponent *obj, return ret; } +/** + * atspi_component_scroll_to: + * @obj: a pointer to the #AtspiComponent object on which to operate. + * @type: a #AtspiScrollType indicating where the object should be placed on the + * screen. + * + * Scrolls whatever container of the #AtspiComponent object so it becomes + * visible on the screen. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_component_scroll_to (AtspiComponent *obj, + AtspiScrollType type, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_component, + "ScrollTo", error, "u=>b", type, &retval); + + return retval; +} + +/** + * atspi_component_scroll_to_point: + * @obj: a pointer to the #AtspiComponent object on which to operate. + * @coords: a #AtspiCoordType indicating whether the coordinates are relative to + * the screen, to the window, or to the parent object. + * @x: the x coordinate of the point to reach + * @y: the y coordinate of the point to reach + * @error: return location for a #GError + * + * Scrolls whatever container of the #AtspiComponent object so it becomes + * visible on the screen at a given position. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_component_scroll_to_point (AtspiComponent *obj, + AtspiCoordType coords, + gint x, + gint y, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_component, + "ScrollToPoint", error, "uii=>b", coords, x, y, &retval); + + return retval; +} + static void atspi_component_base_init (AtspiComponent *klass) { diff --git a/atspi/atspi-component.h b/atspi/atspi-component.h index dd3455a..c84232d 100644 --- a/atspi/atspi-component.h +++ b/atspi/atspi-component.h @@ -107,6 +107,10 @@ gboolean atspi_component_set_position (AtspiComponent *obj, gint x, gint y, Atsp gboolean atspi_component_set_size (AtspiComponent *obj, gint width, gint height, GError **error); +gboolean atspi_component_scroll_to (AtspiComponent *obj, AtspiScrollType type, GError **error); + +gboolean atspi_component_scroll_to_point (AtspiComponent *obj, AtspiCoordType coords, gint x, gint y, GError **error); + G_END_DECLS #endif /* _ATSPI_COMPONENT_H_ */ diff --git a/atspi/atspi-constants.h b/atspi/atspi-constants.h index 1af391d..b9f41ef 100644 --- a/atspi/atspi-constants.h +++ b/atspi/atspi-constants.h @@ -53,6 +53,8 @@ Accessibility::StateType\n Accessibility::Event\n Accessibility::EventDetails \n + Accessibility::ScrollType \n + Accessibility::CoordType \n \section Registry Accessibility also includes Accessibility::Registry, @@ -124,8 +126,10 @@ typedef enum { /** * AtspiCoordType: * @ATSPI_COORD_TYPE_SCREEN: Specifies xy coordinates relative to the screen. - * @ATSPI_COORD_TYPE_WINDOW: Specifies xy coordinates relative to the widget's + * @ATSPI_COORD_TYPE_WINDOW: Specifies xy coordinates relative to the widget's * top-level window. + * @ATSPI_COORD_TYPE_PARENT: Specifies xy coordinates relative to the widget's + * immediate parent. * * Enumeration used by #AtspiComponent, #AtspiImage, and #AtspiText interfaces * to specify whether coordinates are relative to the window or the screen. @@ -134,6 +138,7 @@ typedef enum { typedef enum { ATSPI_COORD_TYPE_SCREEN, ATSPI_COORD_TYPE_WINDOW, + ATSPI_COORD_TYPE_PARENT, } AtspiCoordType; /** @@ -141,18 +146,20 @@ typedef enum { * * One higher than the highest valid value of #AtspiCoordType. **/ -#define ATSPI_COORD_TYPE_COUNT (1+1) +#define ATSPI_COORD_TYPE_COUNT (2+1) /** * AtspiCollectionSortOrder: - * @ATSPI_Collection_SORT_ORDER_INVALID: - * @ATSPI_Collection_SORT_ORDER_CANONICAL: - * @ATSPI_Collection_SORT_ORDER_FLOW: - * @ATSPI_Collection_SORT_ORDER_TAB: - * @ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL: - * @ATSPI_Collection_SORT_ORDER_REVERSE_FLOW: - * @ATSPI_Collection_SORT_ORDER_REVERSE_TAB: - * @ATSPI_Collection_SORT_ORDER_LAST_DEFINED: + * @ATSPI_Collection_SORT_ORDER_INVALID: Invalid sort order + * @ATSPI_Collection_SORT_ORDER_CANONICAL: Canonical sort order + * @ATSPI_Collection_SORT_ORDER_FLOW: Flow sort order + * @ATSPI_Collection_SORT_ORDER_TAB: Tab sort order + * @ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL: Reverse canonical sort order + * @ATSPI_Collection_SORT_ORDER_REVERSE_FLOW: Reverse flow sort order + * @ATSPI_Collection_SORT_ORDER_REVERSE_TAB: Reverse tab sort order + * @ATSPI_Collection_SORT_ORDER_LAST_DEFINED: Used only to determine the end of the + * enumeration. + * * Enumeration used by interface #AtspiCollection to specify * the way #AtspiAccesible objects should be sorted. @@ -178,14 +185,14 @@ typedef enum { /** * AtspiCollectionMatchType: - * @ATSPI_Collection_MATCH_INVALID: Indicates an error condition or + * @ATSPI_Collection_MATCH_INVALID: Indicates an error condition or * uninitialized value. * @ATSPI_Collection_MATCH_ALL: #TRUE if all of the criteria are met. * @ATSPI_Collection_MATCH_ANY: #TRUE if any of the criteria are met. * @ATSPI_Collection_MATCH_NONE: #TRUE if none of the criteria are met. * @ATSPI_Collection_MATCH_EMPTY: Same as @ATSPI_Collection_MATCH_ALL if - * the criteria is non-empty; for empty criteria this rule requires returned - * value to also have empty set. + * the criteria is non-empty; for empty criteria this rule requires returned + * value to also have empty set. * @ATSPI_Collection_MATCH_LAST_DEFINED: Used only to determine the end of the * enumeration. * @@ -211,10 +218,11 @@ typedef enum { /** * AtspiCollectionTreeTraversalType: - * @ATSPI_Collection_TREE_RESTRICT_CHILDREN: - * @ATSPI_Collection_TREE_RESTRICT_SIBLING: - * @ATSPI_Collection_TREE_INORDER: - * @ATSPI_Collection_TREE_LAST_DEFINED: + * @ATSPI_Collection_TREE_RESTRICT_CHILDREN: Restrict children tree traveral + * @ATSPI_Collection_TREE_RESTRICT_SIBLING: Restrict sibling tree traversal + * @ATSPI_Collection_TREE_INORDER: In-order tree traversal. + * @ATSPI_Collection_TREE_LAST_DEFINED: Used only to determine the end of the + * enumeration. * * Enumeration used by interface #AtspiCollection to specify * restrictions on #AtspiAccesible objects to be traversed. @@ -414,7 +422,7 @@ typedef enum { * @ATSPI_STATE_ACTIVE: Indicates a window is currently the active window, or * an object is the active subelement within a container or table. * @ATSPI_STATE_ACTIVE should not be used for objects which have - * @ATSPI_STATE_FOCUSABLE or @ATSPI_STATE_SELECTABLE: Those objects should use + * #ATSPI_STATE_FOCUSABLE or #ATSPI_STATE_SELECTABLE: Those objects should use * @ATSPI_STATE_FOCUSED and @ATSPI_STATE_SELECTED respectively. * @ATSPI_STATE_ACTIVE is a means to indicate that an object which is not * focusable and not selectable is the currently-active item within its @@ -438,8 +446,8 @@ typedef enum { * disclosure of its children. * @ATSPI_STATE_EXPANDED: Indicates this object is expanded. * @ATSPI_STATE_FOCUSABLE: Indicates this object can accept keyboard focus, - * which means all events resulting from typing on the keyboard will - * normally be passed to it when it has focus. + * which means all events resulting from typing on the keyboard will + * normally be passed to it when it has focus. * @ATSPI_STATE_FOCUSED: Indicates this object currently has the keyboard * focus. * @ATSPI_STATE_HAS_TOOLTIP: Indicates that the object has an associated @@ -636,8 +644,8 @@ typedef enum { /** * AtspiKeyEventType: - * @ATSPI_KEY_PRESSED: - * @ATSPI_KEY_RELEASED: + * @ATSPI_KEY_PRESSED: Key press event + * @ATSPI_KEY_RELEASED: Key release event * * Deprecated. Should not be used. * @@ -707,6 +715,8 @@ typedef enum { * subject to the out-of-keymap limitations described for * @ATSPI_KEY_SYM. In practice this limitation primarily effects * Chinese and Japanese locales. + * @ATSPI_KEY_LOCKMODIFIERS: Emulates locking a set of modifiers. + * @ATSPI_KEY_UNLOCKMODIFIERS: Emulates unlocking a set of modifiers. * * Enumeration used when synthesizing keyboard input via * #atspi_generate_keyboard_event. @@ -718,6 +728,8 @@ typedef enum { ATSPI_KEY_PRESSRELEASE, ATSPI_KEY_SYM, ATSPI_KEY_STRING, + ATSPI_KEY_LOCKMODIFIERS, + ATSPI_KEY_UNLOCKMODIFIERS, } AtspiKeySynthType; /** @@ -864,7 +876,7 @@ typedef enum { * the valuator. Common examples include association of scrollbars with the * viewport or panel which they control. * - * + * * Enumeration used to specify * the type of relation encapsulated in an #AtspiRelation object. * @@ -1154,81 +1166,76 @@ typedef enum { * @ATSPI_ROLE_INFO_BAR: An object designed to present a message to the user * within an existing window. * @ATSPI_ROLE_LEVEL_BAR: A bar that serves as a level indicator to, for - * instance, show the strength of a password or the state of a battery. - * Since: 2.8 - *@ATSPI_ROLE_TITLE_BAR: A bar that serves as the title of a window or a - * dialog. @Since: 2.12 - *@ATSPI_ROLE_BLOCK_QUOTE: An object which contains a text section - * that is quoted from another source. @Since: 2.12 - *@ATSPI_ROLE_AUDIO: An object which represents an audio - * element. @Since: 2.12 - *@ATSPI_ROLE_VIDEO: An object which represents a video - * element. @Since: 2.12 - *@ATSPI_ROLE_DEFINITION: A definition of a term or concept. @Since: 2.12 - *@ATSPI_ROLE_ARTICLE: A section of a page that consists of a - * composition that forms an independent part of a document, page, or - * site. Examples: A blog entry, a news story, a forum post. @Since: - * 2.12 - *@ATSPI_ROLE_LANDMARK: A region of a web page intended as a - * navigational landmark. This is designed to allow Assistive - * Technologies to provide quick navigation among key regions within a - * document. @Since: 2.12 - *@ATSPI_ROLE_LOG: A text widget or container holding log content, such - * as chat history and error logs. In this role there is a - * relationship between the arrival of new items in the log and the - * reading order. The log contains a meaningful sequence and new - * information is added only to the end of the log, not at arbitrary - * points. @Since: 2.12 - *@ATSPI_ROLE_MARQUEE: A container where non-essential information - * changes frequently. Common usages of marquee include stock tickers - * and ad banners. The primary difference between a marquee and a log - * is that logs usually have a meaningful order or sequence of - * important content changes. @Since: 2.12 - *@ATSPI_ROLE_MATH: A text widget or container that holds a mathematical - * expression. @Since: 2.12 - *@ATSPI_ROLE_RATING: A widget whose purpose is to display a rating, - * such as the number of stars associated with a song in a media - * player. Objects of this role should also implement - * AtspiValue. @Since: 2.12 - *@ATSPI_ROLE_TIMER: An object containing a numerical counter which - * indicates an amount of elapsed time from a start point, or the time - * remaining until an end point. @Since: 2.12 - *@ATSPI_ROLE_STATIC: A generic non-container object whose purpose is to display - * a brief amount of information to the user and whose role is known by the - * implementor but lacks semantic value for the user. Examples in which - * @ATSPI_ROLE_STATIC is appropriate include the message displayed in a message - * box and an image used as an alternative means to display text. - * @ATSPI_ROLE_STATIC should not be applied to widgets which are traditionally - * interactive, objects which display a significant amount of content, or any - * object which has an accessible relation pointing to another object. The - * displayed information, as a general rule, should be exposed through the - * accessible name of the object. For labels which describe another widget, see - * @ATSPI_ROLE_LABEL. For text views, see @ATSPI_ROLE_TEXT. For generic - * containers, see @ATSPI_ROLE_PANEL. For objects whose role is not known by the - * implementor, see @ATSPI_ROLE_UNKNOWN. @Since: 2.16. - *@ATSPI_ROLE_MATH_FRACTION: An object that represents a mathematical fraction. - * @Since: 2.16. - *@ATSPI_ROLE_MATH_ROOT: An object that represents a mathematical expression - * displayed with a radical. @Since: 2.16. - *@ATSPI_ROLE_SUBSCRIPT: An object that contains text that is displayed as a - * subscript. @Since: 2.16. - *@ATSPI_ROLE_SUPERSCRIPT: An object that contains text that is displayed as a - * superscript. @Since: 2.16. - *@ATSPI_ROLE_DESCRIPTION_LIST: An object that represents a list of term-value - * groups. A term-value group represents an individual description and consist - * of one or more names (@ATSPI_ROLE_DESCRIPTION_TERM) followed by one or more - * values (@ATSPI_ROLE_DESCRIPTION_VALUE). For each list, there should not be - * more than one group with the same term name. @Since: 2.26. - *@ATSPI_ROLE_DESCRIPTION_TERM: An object that represents the term, or name, - * part of a term-description group in a description list. @Since: 2.26. - *@ATSPI_ROLE_DESCRIPTION_VALUE: An object that represents the description, - * definition, or value of a term-description group in a description list. - * The values within a group are alternatives, meaning that you can have - * several @ATSPI_ROLE_DESCRIPTION_VALUE objects for a given - * @ATSPI_ROLE_DESCRIPTION_TERM. @Since: 2.26. - *@ATSPI_ROLE_FOOTNOTE: An object that contains the text of a footnote. @Since: 2.26. - * @ATSPI_ROLE_LAST_DEFINED: Not a valid role, used for finding end of - * enumeration. + * instance, show the strength of a password or the state of a battery. @Since: 2.8 + * @ATSPI_ROLE_TITLE_BAR: A bar that serves as the title of a window or a + * dialog. @Since: 2.12 + * @ATSPI_ROLE_BLOCK_QUOTE: An object which contains a text section + * that is quoted from another source. @Since: 2.12 + * @ATSPI_ROLE_AUDIO: An object which represents an audio + * element. @Since: 2.12 + * @ATSPI_ROLE_VIDEO: An object which represents a video + * element. @Since: 2.12 + * @ATSPI_ROLE_DEFINITION: A definition of a term or concept. @Since: 2.12 + * @ATSPI_ROLE_ARTICLE: A section of a page that consists of a + * composition that forms an independent part of a document, page, or + * site. Examples: A blog entry, a news story, a forum post. @Since: + * 2.12 + * @ATSPI_ROLE_LANDMARK: A region of a web page intended as a + * navigational landmark. This is designed to allow Assistive + * Technologies to provide quick navigation among key regions within a + * document. @Since: 2.12 + * @ATSPI_ROLE_LOG: A text widget or container holding log content, such + * as chat history and error logs. In this role there is a + * relationship between the arrival of new items in the log and the + * reading order. The log contains a meaningful sequence and new + * information is added only to the end of the log, not at arbitrary + * points. @Since: 2.12 + * @ATSPI_ROLE_MARQUEE: A container where non-essential information + * changes frequently. Common usages of marquee include stock tickers + * and ad banners. The primary difference between a marquee and a log + * is that logs usually have a meaningful order or sequence of + * important content changes. @Since: 2.12 + * @ATSPI_ROLE_MATH: A text widget or container that holds a mathematical + * expression. @Since: 2.12 + * @ATSPI_ROLE_RATING: A widget whose purpose is to display a rating, + * such as the number of stars associated with a song in a media + * player. Objects of this role should also implement + * AtspiValue. @Since: 2.12 + * @ATSPI_ROLE_TIMER: An object containing a numerical counter which + * indicates an amount of elapsed time from a start point, or the time + * remaining until an end point. @Since: 2.12 + * @ATSPI_ROLE_STATIC: A generic non-container object whose purpose is to display + * a brief amount of information to the user and whose role is known by the + * implementor but lacks semantic value for the user. Examples in which + * @ATSPI_ROLE_STATIC is appropriate include the message displayed in a message + * box and an image used as an alternative means to display text. + * @ATSPI_ROLE_STATIC should not be applied to widgets which are traditionally + * interactive, objects which display a significant amount of content, or any + * object which has an accessible relation pointing to another object. The + * displayed information, as a general rule, should be exposed through the + * accessible name of the object. For labels which describe another widget, see + * @ATSPI_ROLE_LABEL. For text views, see @ATSPI_ROLE_TEXT. For generic + * containers, see @ATSPI_ROLE_PANEL. For objects whose role is not known by the + * implementor, see @ATSPI_ROLE_UNKNOWN. @Since: 2.16. + * @ATSPI_ROLE_MATH_FRACTION: An object that represents a mathematical fraction. @Since: 2.16. + * @ATSPI_ROLE_MATH_ROOT: An object that represents a mathematical expression + * displayed with a radical. @Since: 2.16. + * @ATSPI_ROLE_SUBSCRIPT: An object that contains text that is displayed as a + * subscript. @Since: 2.16. + * @ATSPI_ROLE_SUPERSCRIPT: An object that contains text that is displayed as a + * superscript. @Since: 2.16. + * @ATSPI_ROLE_DESCRIPTION_LIST: An object that represents a list of term-value + * groups. A term-value group represents an individual description and consist + * of one or more names (@ATSPI_ROLE_DESCRIPTION_TERM) followed by one or more + * values (@ATSPI_ROLE_DESCRIPTION_VALUE). For each list, there should not be + * more than one group with the same term name. @Since: 2.26. + * @ATSPI_ROLE_DESCRIPTION_TERM: An object that represents a term or phrase + * with a corresponding definition. @Since: 2.26. + * @ATSPI_ROLE_DESCRIPTION_VALUE: An object that represents the description, + * definition, or value of a term. @Since: 2.26. + * @ATSPI_ROLE_FOOTNOTE: An object that contains the text of a footnote. @Since: 2.26. + * @ATSPI_ROLE_LAST_DEFINED: Not a valid role, used for finding end of + * enumeration. * * Enumeration used by interface #AtspiAccessible to specify the role * of an #AtspiAccessible object. @@ -1386,6 +1393,43 @@ typedef enum ATSPI_CACHE_UNDEFINED = 0x40000000, } AtspiCache; +/** + * AtspiScrollType: + * @ATSPI_SCROLL_TOP_LEFT: Scroll the object to the top left corner of the + * window. + * @ATSPI_SCROLL_BOTTOM_RIGHT: Scroll the object to the bottom right corner of + * the window. + * @ATSPI_SCROLL_TOP_EDGE: Scroll the object to the top edge of the window. + * @ATSPI_SCROLL_BOTTOM_EDGE: Scroll the object to the bottom edge of the + * window. + * @ATSPI_SCROLL_LEFT_EDGE: Scroll the object to the left edge of the + * window. + * @ATSPI_SCROLL_RIGHT_EDGE: Scroll the object to the right edge of the + * window. + * @ATSPI_SCROLL_ANYWHERE: Scroll the object to application-dependent position + * on the window. + * + * Enumeration used by interface #AtspiAccessible to specify where an + * #AtspiAccessible object should be placed on the screen when using scroll_to. + * + */ +typedef enum { + ATSPI_SCROLL_TOP_LEFT, + ATSPI_SCROLL_BOTTOM_RIGHT, + ATSPI_SCROLL_TOP_EDGE, + ATSPI_SCROLL_BOTTOM_EDGE, + ATSPI_SCROLL_LEFT_EDGE, + ATSPI_SCROLL_RIGHT_EDGE, + ATSPI_SCROLL_ANYWHERE +} AtspiScrollType; + +/** + * ATSPI_SCROLLTYPE_COUNT: + * + * One higher than the highest valid value of #AtspiScrollType. + */ +#define ATSPI_SCROLLTYPE_COUNT (6+1) + #define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry" #define ATSPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry" #define ATSPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry" diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c index 5aac60a..56597f7 100644 --- a/atspi/atspi-device-listener.c +++ b/atspi/atspi-device-listener.c @@ -351,13 +351,13 @@ _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void if (strcmp (dbus_message_get_signature (message), "(uiuuisb)") != 0) { - g_warning ("Atspi: Unknown signature for an event"); + g_warning ("AT-SPI: Unknown signature for an event"); goto done; } if (sscanf (path, "/org/a11y/atspi/listeners/%d", &id) != 1) { - g_warning ("Atspi: Bad listener path: %s\n", path); + g_warning ("AT-SPI: Bad listener path: %s\n", path); goto done; } @@ -379,7 +379,7 @@ _atspi_dbus_handle_DeviceEvent (DBusConnection *bus, DBusMessage *message, void retval = (*klass->device_event) (listener, &event); if (retval != 0 && retval != 1) { - g_warning ("at-spi: device event handler returned %d; should be 0 or 1", retval); + g_warning ("AT-SPI: device event handler returned %d; should be 0 or 1", retval); retval = 0; } } diff --git a/atspi/atspi-enum-types.c.template b/atspi/atspi-enum-types.c.template index cd92f99..385d0ee 100644 --- a/atspi/atspi-enum-types.c.template +++ b/atspi/atspi-enum-types.c.template @@ -4,7 +4,7 @@ /*** END file-header ***/ /*** BEGIN file-production ***/ -/* enumerations from "@filename@" */ +/* enumerations from "@basename@" */ #include "@filename@" /*** END file-production ***/ diff --git a/atspi/atspi-enum-types.h.template b/atspi/atspi-enum-types.h.template index bd297b5..789ad2e 100644 --- a/atspi/atspi-enum-types.h.template +++ b/atspi/atspi-enum-types.h.template @@ -9,7 +9,7 @@ G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ -/* Enumerations from "@filename@" */ +/* Enumerations from "@basename@" */ /*** END file-production ***/ diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c index 752547d..6a3fe6b 100644 --- a/atspi/atspi-event-listener.c +++ b/atspi/atspi-event-listener.c @@ -101,7 +101,7 @@ callback_unref (gpointer callback) info = g_hash_table_lookup (callbacks, callback); if (!info) { - g_warning ("Atspi: Dereferencing invalid callback %p\n", callback); + g_warning ("AT-SPI: Dereferencing invalid callback %p\n", callback); return; } info->ref_count--; @@ -679,7 +679,7 @@ atspi_event_listener_register_from_callback_full (AtspiEventListenerCB callback, dbus_bus_add_match (_atspi_bus(), matchrule, &d_error); if (dbus_error_is_set (&d_error)) { - g_warning ("Atspi: Adding match: %s", d_error.message); + g_warning ("AT-SPI: Adding match: %s", d_error.message); dbus_error_free (&d_error); /* TODO: Set error */ } @@ -916,7 +916,7 @@ _atspi_send_event (AtspiEvent *e) if (!convert_event_type_to_dbus (e->type, &category, &name, &detail, NULL)) { - g_warning ("Atspi: Couldn't parse event: %s\n", e->type); + g_warning ("AT-SPI: Couldn't parse event: %s\n", e->type); return; } for (l = event_listeners; l; l = g_list_next (l)) diff --git a/atspi/atspi-gmain.c b/atspi/atspi-gmain.c index 3ab985b..588a60d 100644 --- a/atspi/atspi-gmain.c +++ b/atspi/atspi-gmain.c @@ -33,7 +33,7 @@ #define _(x) dgettext (GETTEXT_PACKAGE, x) #define N_(x) x -/** +/* * DBusGMessageQueue: * A GSource subclass for dispatching DBusConnection messages. * We need this on top of the IO handlers, because sometimes @@ -41,8 +41,8 @@ */ typedef struct { - GSource source; /**< the parent GSource */ - DBusConnection *connection; /**< the connection to dispatch */ + GSource source; /* the parent GSource */ + DBusConnection *connection; /* the connection to dispatch */ } DBusGMessageQueue; static gboolean message_queue_prepare (GSource *source, @@ -95,11 +95,11 @@ message_queue_dispatch (GSource *source, typedef struct { - GMainContext *context; /**< the main context */ - GSList *ios; /**< all IOHandler */ - GSList *timeouts; /**< all TimeoutHandler */ - DBusConnection *connection; /**< NULL if this is really for a server not a connection */ - GSource *message_queue_source; /**< DBusGMessageQueue */ + GMainContext *context; /* the main context */ + GSList *ios; /* all IOHandler */ + GSList *timeouts; /* all TimeoutHandler */ + DBusConnection *connection; /* NULL if this is really for a server not a connection */ + GSource *message_queue_source; /* DBusGMessageQueue */ } ConnectionSetup; @@ -510,7 +510,7 @@ connection_setup_new_from_old (GMainContext *context, return cs; } -/** @} */ /* End of GLib bindings internals */ +/* @} */ /* End of GLib bindings internals */ /** * atspi_dbus_connection_setup_with_g_main: (skip) diff --git a/atspi/atspi-matchrule.c b/atspi/atspi-matchrule.c index e995459..cf6a306 100644 --- a/atspi/atspi-matchrule.c +++ b/atspi/atspi-matchrule.c @@ -164,7 +164,7 @@ atspi_match_rule_new (AtspiStateSet *states, if (role < 128) rule->roles [role / 32] |= (1 << (role % 32)); else - g_warning ("Atspi: unexpected role %d\n", role); + g_warning ("AT-SPI: unexpected role %d\n", role); } } else diff --git a/atspi/atspi-misc-private.h b/atspi/atspi-misc-private.h index fe5ca56..314746e 100644 --- a/atspi/atspi-misc-private.h +++ b/atspi/atspi-misc-private.h @@ -125,7 +125,7 @@ void _atspi_dbus_set_state (AtspiAccessible *accessible, DBusMessageIter *iter); } \ if (strcmp (dbus_message_get_signature (message), type) != 0) \ { \ - g_warning ("at-spi: Expected message signature %s but got %s at %s line %d", type, dbus_message_get_signature (message), __FILE__, __LINE__); \ + g_warning ("AT-SPI: Expected message signature %s but got %s at %s line %d", type, dbus_message_get_signature (message), __FILE__, __LINE__); \ dbus_message_unref (message); \ return (ret); \ } diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c index eebbed4..9b97b18 100644 --- a/atspi/atspi-misc.c +++ b/atspi/atspi-misc.c @@ -203,7 +203,7 @@ handle_get_bus_address (DBusPendingCall *pending, void *user_data) else { if (!strcmp (error.name, DBUS_ERROR_FILE_NOT_FOUND)) - g_warning ("Unable to open bus connection: %s", error.message); + g_warning ("AT-SPI: Unable to open bus connection: %s", error.message); dbus_error_free (&error); } } @@ -1258,7 +1258,7 @@ _atspi_dbus_get_property (gpointer obj, const char *interface, const char *name, dbus_message_iter_init (reply, &iter); if (dbus_message_iter_get_arg_type (&iter) != 'v') { - g_warning ("AT-SPI: expected a variant when fetching %s from interface %s; got %s\n", name, interface, dbus_message_get_signature (reply)); + g_warning ("atspi_dbus_get_property: expected a variant when fetching %s from interface %s; got %s\n", name, interface, dbus_message_get_signature (reply)); goto done; } dbus_message_iter_recurse (&iter, &iter_variant); @@ -1530,7 +1530,7 @@ get_accessibility_bus_address_dbus (void) if (!reply) { - g_warning ("Error retrieving accessibility bus address: %s: %s", + g_warning ("AT-SPI: Error retrieving accessibility bus address: %s: %s", error.name, error.message); dbus_error_free (&error); goto out; @@ -1584,7 +1584,7 @@ atspi_get_a11y_bus (void) if (a11y_dbus_slot == -1) if (!dbus_connection_allocate_data_slot (&a11y_dbus_slot)) - g_warning ("at-spi: Unable to allocate D-Bus slot"); + g_warning ("AT-SPI: Unable to allocate D-Bus slot"); address_env = g_getenv ("AT_SPI_BUS_ADDRESS"); if (address_env != NULL && *address_env != 0) diff --git a/atspi/atspi-registry.c b/atspi/atspi-registry.c index c9b11f0..76b1926 100644 --- a/atspi/atspi-registry.c +++ b/atspi/atspi-registry.c @@ -426,8 +426,8 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener, /** * atspi_generate_keyboard_event: - * @keyval: a #gint indicating the keycode or keysym of the key event - * being synthesized. + * @keyval: a #gint indicating the keycode or keysym or modifier mask of the + * key event being synthesized. * @keystring: (allow-none): an (optional) UTF-8 string which, if * @synth_type is %ATSPI_KEY_STRING, indicates a 'composed' * keyboard input string being synthesized; this type of @@ -436,7 +436,8 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener, * input method (such as XIM) were used. * @synth_type: an #AtspiKeySynthType flag indicating whether @keyval * is to be interpreted as a keysym rather than a keycode - * (%ATSPI_KEY_SYM) or a string (%ATSPI_KEY_STRING), or + * (%ATSPI_KEY_SYM) or a string (%ATSPI_KEY_STRING) or a modifier + * mask (%ATSPI_KEY_LOCKMODIFIERS and %ATSPI_KEY_UNLOCKMODIFIERS), or * whether to synthesize %ATSPI_KEY_PRESS, * %ATSPI_KEY_RELEASE, or both (%ATSPI_KEY_PRESSRELEASE). * @error: (allow-none): a pointer to a %NULL #GError pointer, or %NULL diff --git a/atspi/meson.build b/atspi/meson.build index ea48ddb..b7a9357 100644 --- a/atspi/meson.build +++ b/atspi/meson.build @@ -67,9 +67,9 @@ atspi_enums = gnome.mkenums('atspi-enum-types', install_header: true) atspi_enum_h = atspi_enums[1] -atspi = shared_library('atspi', atspi_sources + atspi_enums, - version: soversion.split('.')[0], - soversion: soversion, +atspi = library('atspi', atspi_sources + atspi_enums, + version: soversion, + soversion: soversion.split('.')[0], include_directories: [ root_inc, registryd_inc ], dependencies: [ libdbus_dep, gobject_dep, dbind_dep, x11_deps ], install: true) @@ -90,7 +90,8 @@ if have_gir gir_extra_args = [ '--c-include=atspi/atspi.h', - '--pkg-export=atspi-2' + '--pkg-export=atspi-2', + '--quiet', ] gir_dir = join_paths(atspi_datadir, 'gir-1.0') @@ -112,3 +113,13 @@ if have_gir ) endif +pkgconfig = import('pkgconfig') +pkgconfig.generate( + name: 'atspi', + description: 'Accessibility Technology software library', + version: meson.project_version(), + libraries: atspi, + requires: 'dbus-1 glib-2.0', + subdirs: 'at-spi-2.0', + filebase: 'atspi-2', +) diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 4576400..0000000 --- a/autogen.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -test -n "$srcdir" || srcdir=`dirname "$0"` -test -n "$srcdir" || srcdir=. - -olddir=`pwd` -cd "$srcdir" - -# run gtkdocize -gtkdocize || exit 1 - -# gnome-autogen.sh runs configure, so do likewise. -autoreconf -vif - -cd "$olddir" - -test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" - diff --git a/bus/Makefile.am b/bus/Makefile.am deleted file mode 100644 index 688f82a..0000000 --- a/bus/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ -CLEANFILES = -DISTCLEANFILES = -EXTRA_DIST = \ - meson.build - -libexec_PROGRAMS = at-spi-bus-launcher -at_spi_bus_launcher_SOURCES = at-spi-bus-launcher.c -at_spi_bus_launcher_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DDATADIR=\"$(datadir)\" \ - -DDBUS_DAEMON=\"$(DBUS_DAEMON)\" -at_spi_bus_launcher_CFLAGS = $(GIO_CFLAGS) -at_spi_bus_launcher_LDADD = $(GIO_LIBS) $(X11_LIBS) - -substitutions = "s,@libexecdir[@],$(libexecdir)," - -default_sessiondir = $(sysconfdir)/xdg/autostart -default_session_DATA = at-spi-dbus-bus.desktop -at-spi-dbus-bus.desktop: at-spi-dbus-bus.desktop.in - $(AM_V_GEN) $(SED) -e$ $(substitutions) $< > $@.tmp && mv $@.tmp $@ - -EXTRA_DIST += at-spi-dbus-bus.desktop.in -CLEANFILES += at-spi-dbus-bus.desktop - -dbusservicedir = $(DBUS_SERVICES_DIR) -dbusservice_DATA = org.a11y.Bus.service -org.a11y.Bus.service: org.a11y.Bus.service.in - $(AM_V_GEN) $(SED) -e $(substitutions) $< > $@.tmp && mv $@.tmp $@ - -EXTRA_DIST += org.a11y.Bus.service.in -CLEANFILES += org.a11y.Bus.service - -systemd_userdir = $(prefix)/lib/systemd/user -systemd_user_DATA = at-spi-dbus-bus.service -at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile - $(AM_V_GEN) $(SED) -e $(substitutions) $< > $@.tmp && mv $@.tmp $@ - -EXTRA_DIST += at-spi-dbus-bus.service.in -CLEANFILES += at-spi-dbus-bus.service - -busconfigdir = $(datadir)/defaults/at-spi2 -busconfig_DATA = accessibility.conf -accessibility.conf: accessibility.conf.in - $(AM_V_GEN) $(SED) -e "s|[@]DATADIR[@]|$(datadir)|" $(srcdir)/$@.in > $@ - -EXTRA_DIST += accessibility.conf.in -CLEANFILES += accessibility.conf - --include $(top_srcdir)/git.mk diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index 261353f..17f01c0 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -2,7 +2,7 @@ * * at-spi-bus-launcher: Manage the a11y bus as a child process * - * Copyright 2011 Red Hat, Inc. + * Copyright 2011-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -25,6 +25,11 @@ #include #include #include +#ifdef __linux__ +#include +#include +#include +#endif #include #include #include @@ -50,6 +55,7 @@ typedef struct { GDBusConnection *session_bus; GSettings *a11y_schema; GSettings *interface_schema; + int name_owner_id; GDBusProxy *client_proxy; @@ -58,6 +64,7 @@ typedef struct { int a11y_bus_pid; char *a11y_bus_address; int pipefd[2]; + int listenfd; char *a11y_launch_error_message; } A11yBusLauncher; @@ -215,23 +222,6 @@ name_appeared_handler (GDBusConnection *connection, register_client (app); } -static void -setup_bus_child (gpointer data) -{ - A11yBusLauncher *app = data; - (void) app; - - close (app->pipefd[0]); - dup2 (app->pipefd[1], 3); - close (app->pipefd[1]); - - /* On Linux, tell the bus process to exit if this process goes away */ -#ifdef __linux -#include - prctl (PR_SET_PDEATHSIG, 15); -#endif -} - /** * unix_read_all_fd_to_string: * @@ -244,7 +234,7 @@ unix_read_all_fd_to_string (int fd, { ssize_t bytes_read; - while (max_bytes > 1 && (bytes_read = read (fd, buf, MAX (4096, max_bytes - 1)))) + while (max_bytes > 1 && (bytes_read = read (fd, buf, MIN (4096, max_bytes - 1)))) { if (bytes_read < 0) return FALSE; @@ -276,33 +266,41 @@ on_bus_exited (GPid pid, g_main_loop_quit (app->loop); } +#ifdef DBUS_DAEMON +static void +setup_bus_child_daemon (gpointer data) +{ + A11yBusLauncher *app = data; + (void) app; + + close (app->pipefd[0]); + dup2 (app->pipefd[1], 3); + close (app->pipefd[1]); + + /* On Linux, tell the bus process to exit if this process goes away */ +#ifdef __linux__ + prctl (PR_SET_PDEATHSIG, 15); +#endif +} + static gboolean -ensure_a11y_bus (A11yBusLauncher *app) +ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) { + char *argv[] = { DBUS_DAEMON, config_path, "--nofork", "--print-address", "3", NULL }; GPid pid; - char *argv[] = { DBUS_DAEMON, NULL, "--nofork", "--print-address", "3", NULL }; char addr_buf[2048]; GError *error = NULL; - const char *config_path = NULL; - - if (app->a11y_bus_pid != 0) - return FALSE; - - if (g_file_test (SYSCONFDIR"/at-spi2/accessibility.conf", G_FILE_TEST_EXISTS)) - config_path = "--config-file="SYSCONFDIR"/at-spi2/accessibility.conf"; - else - config_path = "--config-file="DATADIR"/defaults/at-spi2/accessibility.conf"; - - argv[1] = config_path; if (pipe (app->pipefd) < 0) g_error ("Failed to create pipe: %s", strerror (errno)); - + + g_clear_pointer (&app->a11y_launch_error_message, g_free); + if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, - setup_bus_child, + setup_bus_child_daemon, app, &pid, &error)) @@ -335,6 +333,138 @@ ensure_a11y_bus (A11yBusLauncher *app) app->a11y_bus_address = g_strchomp (g_strdup (addr_buf)); g_debug ("a11y bus address: %s", app->a11y_bus_address); + return TRUE; + +error: + close (app->pipefd[0]); + close (app->pipefd[1]); + app->state = A11Y_BUS_STATE_ERROR; + + return FALSE; +} +#else +static gboolean +ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) +{ + return FALSE; +} +#endif + +#ifdef DBUS_BROKER +static void +setup_bus_child_broker (gpointer data) +{ + A11yBusLauncher *app = data; + gchar *pid_str; + (void) app; + + dup2 (app->listenfd, 3); + close (app->listenfd); + g_setenv("LISTEN_FDS", "1", TRUE); + + pid_str = g_strdup_printf("%u", getpid()); + g_setenv("LISTEN_PID", pid_str, TRUE); + g_free(pid_str); + + /* Tell the bus process to exit if this process goes away */ + prctl (PR_SET_PDEATHSIG, SIGTERM); +} + +static gboolean +ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path) +{ + char *argv[] = { DBUS_BROKER, config_path, "--scope", "user", NULL }; + struct sockaddr_un addr = { .sun_family = AF_UNIX }; + socklen_t addr_len = sizeof(addr); + GPid pid; + GError *error = NULL; + + if ((app->listenfd = socket (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) < 0) + g_error ("Failed to create listening socket: %s", strerror (errno)); + + if (bind (app->listenfd, (struct sockaddr *)&addr, sizeof(sa_family_t)) < 0) + g_error ("Failed to bind listening socket: %s", strerror (errno)); + + if (getsockname (app->listenfd, (struct sockaddr *)&addr, &addr_len) < 0) + g_error ("Failed to get socket name for listening socket: %s", strerror(errno)); + + if (listen (app->listenfd, 1024) < 0) + g_error ("Failed to listen on socket: %s", strerror(errno)); + + g_clear_pointer (&app->a11y_launch_error_message, g_free); + + if (!g_spawn_async (NULL, + argv, + NULL, + G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, + setup_bus_child_broker, + app, + &pid, + &error)) + { + app->a11y_bus_pid = -1; + app->a11y_launch_error_message = g_strdup (error->message); + g_clear_error (&error); + goto error; + } + + close (app->listenfd); + app->listenfd = -1; + + g_child_watch_add (pid, on_bus_exited, app); + app->a11y_bus_pid = pid; + g_debug ("Launched a11y bus, child is %ld", (long) pid); + app->state = A11Y_BUS_STATE_RUNNING; + + app->a11y_bus_address = g_strconcat("unix:abstract=", addr.sun_path + 1, NULL); + g_debug ("a11y bus address: %s", app->a11y_bus_address); + + return TRUE; + +error: + close (app->listenfd); + app->state = A11Y_BUS_STATE_ERROR; + + return FALSE; +} +#else +static gboolean +ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path) +{ + return FALSE; +} +#endif + +static gboolean +ensure_a11y_bus (A11yBusLauncher *app) +{ + char *config_path = NULL; + gboolean success = FALSE; + + if (app->a11y_bus_pid != 0) + return FALSE; + + if (g_file_test (SYSCONFDIR"/at-spi2/accessibility.conf", G_FILE_TEST_EXISTS)) + config_path = "--config-file="SYSCONFDIR"/at-spi2/accessibility.conf"; + else + config_path = "--config-file="DATADIR"/defaults/at-spi2/accessibility.conf"; + +#ifdef WANT_DBUS_BROKER + success = ensure_a11y_bus_broker (app, config_path); + if (!success) + { + if (!ensure_a11y_bus_daemon (app, config_path)) + return FALSE; + } +#else + success = ensure_a11y_bus_daemon (app, config_path); + if (!success) + { + if (!ensure_a11y_bus_broker (app, config_path)) + return FALSE; + } +#endif + #ifdef HAVE_X11 { Display *display = XOpenDisplay (NULL); @@ -353,13 +483,6 @@ ensure_a11y_bus (A11yBusLauncher *app) #endif return TRUE; - - error: - close (app->pipefd[0]); - close (app->pipefd[1]); - app->state = A11Y_BUS_STATE_ERROR; - - return FALSE; } static void @@ -695,6 +818,15 @@ already_running () static GSettings * get_schema (const gchar *name) { +#if GLIB_CHECK_VERSION (2, 32, 0) + GSettingsSchemaSource *source = g_settings_schema_source_get_default (); + GSettingsSchema *schema = g_settings_schema_source_lookup (source, name, FALSE); + + if (schema == NULL) + return NULL; + + return g_settings_new_full (schema, NULL, NULL); +#else const char * const *schemas = NULL; gint i; @@ -706,13 +838,13 @@ get_schema (const gchar *name) } return NULL; +#endif } static void gsettings_key_changed (GSettings *gsettings, const gchar *key, void *user_data) { gboolean new_val = g_settings_get_boolean (gsettings, key); - A11yBusLauncher *app = user_data; if (!strcmp (key, "toolkit-accessibility")) handle_a11y_enabled_change (_global_app, new_val, FALSE); @@ -724,10 +856,6 @@ int main (int argc, char **argv) { - GError *error = NULL; - GMainLoop *loop; - GDBusConnection *session_bus; - int name_owner_id; gboolean a11y_set = FALSE; gboolean screen_reader_set = FALSE; gint i; @@ -783,14 +911,15 @@ main (int argc, introspection_data = g_dbus_node_info_new_for_xml (introspection_xml, NULL); g_assert (introspection_data != NULL); - name_owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, - "org.a11y.Bus", - G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, - on_bus_acquired, - on_name_acquired, - on_name_lost, - _global_app, - NULL); + _global_app->name_owner_id = + g_bus_own_name (G_BUS_TYPE_SESSION, + "org.a11y.Bus", + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, + on_bus_acquired, + on_name_acquired, + on_name_lost, + _global_app, + NULL); g_main_loop_run (_global_app->loop); diff --git a/bus/meson.build b/bus/meson.build index 909103c..5c7e03d 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -31,8 +31,13 @@ configure_file(input: 'at-spi-dbus-bus.service.in', install: true, install_dir: systemd_user_dir) +launcher_args = [ + '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), + '-DDATADIR="@0@"'.format(atspi_datadir), + ] + if get_option('dbus_daemon') != 'default' - dbus_daemon = get_option('dbus_daemon') + launcher_args += '-DDBUS_DAEMON="@0@"'.format(get_option('dbus_daemon')) else dbus_daemon = find_program('dbus-daemon', '/sbin/dbus-daemon', @@ -40,16 +45,29 @@ else '/libexec/dbus-daemon', '/usr/libexec/dbus-daemon', '/usr/pkg/bin/dbus-daemon', - required: true).path() + required: false) + if dbus_daemon.found() + launcher_args += '-DDBUS_DAEMON="@0@"'.format(dbus_daemon.path()) + endif +endif + +if get_option('dbus_broker') != 'default' + launcher_args += '-DDBUS_BROKER="@0@"'.format(get_option('dbus_broker')) +else + dbus_broker = find_program('dbus-broker-launch', + required: false) + if dbus_broker.found() + launcher_args += '-DDBUS_BROKER="@0@"'.format(dbus_broker.path()) + endif +endif + +if get_option('default_bus') == 'dbus-broker' + launcher_args += '-DWANT_DBUS_BROKER' endif executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c', include_directories: [ root_inc, include_directories('.') ], dependencies: [ gio_dep, x11_deps ], - c_args: [ - '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), - '-DDATADIR="@0@"'.format(atspi_datadir), - '-DDBUS_DAEMON="@0@"'.format(dbus_daemon), - ], + c_args: launcher_args, install: true, install_dir: atspi_libexecdir) diff --git a/configure.ac b/configure.ac deleted file mode 100644 index a84dcbd..0000000 --- a/configure.ac +++ /dev/null @@ -1,188 +0,0 @@ -AC_INIT([at-spi2-core], [2.26.1], [accessibility-atspi@lists.linux-foundation.org]) -AC_PREREQ([2.59]) -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_MACRO_DIR([m4]) - -AT_SPI_CORE_MAJOR_VERSION=0 -AT_SPI_CORE_MINOR_VERSION=1 -AT_SPI_CORE_MICRO_VERSION=3 -AT_SPI_CORE_VERSION="$AT_SPI_CORE_MAJOR_VERSION.$AT_SPI_CORE_MINOR_VERSION" -AC_SUBST(AT_SPI_CORE_VERSION) - -LT_RELEASE=$AT_SPI_CORE_VERSION -LT_CURRENT=0 -LT_REVISION=1 -LT_AGE=0 -LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}' -AC_SUBST(LT_VERSION_INFO) -AC_SUBST(LT_RELEASE) -AC_SUBST(LT_CURRENT) -AC_SUBST(LT_REVISION) -AC_SUBST(LT_AGE) - -AM_INIT_AUTOMAKE([1.13 -Wall -Wno-portability foreign subdir-objects no-dist-gzip dist-xz]) - -# Support silent build rules. Disable -# by either passing --disable-silent-rules to configure or passing V=1 -# to make -AM_SILENT_RULES([yes]) - -AM_PROG_CC_C_O -LT_INIT([disable-static]) -PKG_PROG_PKG_CONFIG - -AC_CONFIG_HEADERS([config.h]) - -AC_PROG_SED - -AM_GNU_GETTEXT_VERSION([0.19.8]) -AM_GNU_GETTEXT([external]) - -GETTEXT_PACKAGE="${PACKAGE}" -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], - ["$GETTEXT_PACKAGE"], - [The prefix for our gettext translation domains.]) - -PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0]) -AC_SUBST(DBUS_LIBS) -AC_SUBST(DBUS_CFLAGS) - -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36.0]) -AC_SUBST(GLIB_LIBS) -AC_SUBST(GLIB_CFLAGS) - -# Use pkg-config to find the glib-mkenums script -GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` -AC_SUBST(GLIB_MKENUMS) - -PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0]) -AC_SUBST(GOBJ_LIBS) -AC_SUBST(GOBJ_CFLAGS) - -PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.28]) -AC_SUBST(GIO_LIBS) -AC_SUBST(GIO_CFLAGS) - -# -------------------------------------------------------------------- -# Find DL functionality - -AC_CHECK_LIB(c, dlopen, DL_LIBS="", - AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl", - AC_MSG_ERROR([Could not find a library with the dlopen function]) - ) -) - -AC_SUBST(DL_LIBS) - -AC_ARG_ENABLE(x11, - [AS_HELP_STRING([--disable-x11], - [disable the X11 backend])],, - [enable_x11=auto]) - -AS_IF([test "x$enable_x11" = xno], [ - AM_CONDITIONAL(USE_X11, false) -], [ - PKG_CHECK_MODULES(X11, [x11], [ - AC_DEFINE(HAVE_X11, 1, [Define to use X11]) - AC_SUBST(HAVE_X11) - have_x11=yes - ], [ - AS_IF([test "x$enable_x11" = xyes], [ - AC_MSG_ERROR([Unable to find X11 development files]) - ]) - have_x11=no - ]) - - # Check for additional X11 extensions - AS_IF([test "x$have_x11" = xyes], [ - # XTest (mandatory) - PKG_CHECK_MODULES(XTST, [xtst]) - X11_CFLAGS="$X11_CFLAGS $XTST_CFLAGS" - X11_LIBS="$X11_LIBS $XTST_LIBS" - - # XInput (mandatory) - PKG_CHECK_MODULES(XINPUT, [xi]) - X11_CFLAGS="$X11_CFLAGS $XINPUT_CFLAGS" - X11_LIBS="$X11_LIBS $XINPUT_LIBS" - - # XKB (optional) - AC_CHECK_LIB(X11, XkbGetMap, [ - AC_DEFINE(HAVE_XKB, 1, [Define to use XKB]) - ], [:]) - ]) - - AC_SUBST(X11_CFLAGS) - AC_SUBST(X11_LIBS) - - AM_CONDITIONAL(USE_X11, test "x$have_x11" = xyes) -]) - -AC_ARG_WITH([dbus_daemondir], - [AS_HELP_STRING([--with-dbus-daemondir=], - [Directory where the DBUS daemon is installed])], - [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"], - [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND], - [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl -[/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl -[$PATH_SEPARATOR/usr/pkg/bin])] - ) -if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then - DBUS_DAEMON = "$bindir/dbus-daemon" - AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found]) - AC_MSG_WARN([we assume that it will be installed in "$bindir"]) -fi -AC_SUBST(DBUS_DAEMON) - -AC_ARG_WITH(dbus-services, - [AS_HELP_STRING([--with-dbus-services=], - [where D-BUS services directory is])]) -if ! test -z "$with_dbus_services" ; then - DBUS_SERVICES_DIR="$with_dbus_services" -else - DBUS_SERVICES_DIR="$datadir/dbus-1/services" -fi -AC_SUBST(DBUS_SERVICES_DIR) - -GOBJECT_INTROSPECTION_CHECK([1.32.0]) - -AC_SUBST(LIBTOOL_EXPORT_OPTIONS) - -dnl find sizes & alignments -orig_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" -AC_CHECK_ALIGNOF(char) -AC_CHECK_ALIGNOF(dbus_bool_t, [#include ]) -AC_CHECK_ALIGNOF(dbus_int16_t, [#include ]) -AC_CHECK_ALIGNOF(dbus_int32_t, [#include ]) -AC_CHECK_ALIGNOF(dbus_int64_t, [#include ]) -AC_CHECK_ALIGNOF(double, [#include ]) -AC_CHECK_ALIGNOF(dbind_pointer, [AC_INCLUDES_DEFAULT -typedef void *dbind_pointer;]) -AC_CHECK_ALIGNOF(dbind_struct, [AC_INCLUDES_DEFAULT -typedef struct {char s1;} dbind_struct;]) - -GTK_DOC_CHECK([1.25]) - -if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Werror-implicit-function-declaration" -fi - -CPPFLAGS=$orig_CPPFLAGS - -AC_CONFIG_FILES([ - Makefile - po/Makefile.in - xml/Makefile - dbind/Makefile - atspi/Makefile - registryd/Makefile - bus/Makefile - doc/Makefile - doc/libatspi/Makefile - doc/libatspi/version.xml - test/Makefile - atspi-2.pc -]) - -AC_OUTPUT diff --git a/dbind/Makefile.am b/dbind/Makefile.am deleted file mode 100644 index 6594e3e..0000000 --- a/dbind/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -noinst_LTLIBRARIES = libdbind.la - -AM_CPPFLAGS = \ - -DG_LOG_DOMAIN=\"dbind\" \ - -I$(top_srcdir) \ - $(WARN_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) - -libdbind_la_SOURCES = \ - dbind.h \ - dbind.c \ - dbind-any.h \ - dbind-any.c -libdbind_la_LIBADD = $(DBUS_LIBS) $(GLIB_LIBS) - -TESTS = dbtest - -check_PROGRAMS = dbtest -dbtest_SOURCES = dbtest.c ../atspi/atspi-gmain.c -dbtest_LDFLAGS = libdbind.la -dbtest_LDADD = $(DBUS_LIBS) - -EXTRA_DIST = \ - meson.build - --include $(top_srcdir)/git.mk diff --git a/dbind/dbtest.c b/dbind/dbtest.c index abd241a..42c1919 100644 --- a/dbind/dbtest.c +++ b/dbind/dbtest.c @@ -27,7 +27,7 @@ #define DESKICE_PATH "/Novell/ICEDesktop/Daemon" #define DESKICE_NAMESPACE "Novell.ICEDesktop.Daemon" -void marshal (DBusMessage *msg, char *type, void *ptr) +void marshal (DBusMessage *msg, const char *type, void *ptr) { DBusMessageIter iter; @@ -35,7 +35,7 @@ void marshal (DBusMessage *msg, char *type, void *ptr) dbind_any_marshal (&iter, &type, &ptr); } -void demarshal (DBusMessage *msg, char *type, void *ptr) +void demarshal (DBusMessage *msg, const char *type, void *ptr) { DBusMessageIter iter; @@ -317,8 +317,8 @@ void test_twovals () DBusMessage *msg; DBusMessageIter iter; TwoVal i, o; - char *type_twoval = TYPEOF_TWOVAL; - char *type; + const char *type_twoval = TYPEOF_TWOVAL; + const char *type; void *ptr; msg = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_CALL); diff --git a/dbind/meson.build b/dbind/meson.build index e122645..5a9f02d 100644 --- a/dbind/meson.build +++ b/dbind/meson.build @@ -3,12 +3,10 @@ dbind_sources = [ 'dbind-any.c', ] -dbind = static_library('dbind', dbind_sources, - include_directories: root_inc, - dependencies: [ libdbus_dep, glib_dep ], - c_args: [ '-DG_LOG_DOMAIN="dbind"' ]) - -dbind_dep = declare_dependency(link_with: dbind) +dbind_dep = declare_dependency(sources: dbind_sources, + include_directories: root_inc, + compile_args: [ '-DG_LOG_DOMAIN="dbind"' ], + dependencies: [ libdbus_dep, glib_dep ]) test('dbind-test', executable('dbind-test', [ 'dbtest.c', '../atspi/atspi-gmain.c' ], diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index b478520..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ - -SUBDIRS=libatspi - --include $(top_srcdir)/git.mk diff --git a/doc/libatspi/libatspi-docs.sgml b/doc/libatspi/libatspi-docs.sgml index 8b9ff0d..935767c 100644 --- a/doc/libatspi/libatspi-docs.sgml +++ b/doc/libatspi/libatspi-docs.sgml @@ -42,8 +42,6 @@ - - diff --git a/doc/libatspi/libatspi-sections.txt b/doc/libatspi/libatspi-sections.txt index 78abe76..14304ff 100644 --- a/doc/libatspi/libatspi-sections.txt +++ b/doc/libatspi/libatspi-sections.txt @@ -1,10 +1,8 @@
atspi-text AtspiRange -ATSPI_TYPE_RANGE atspi_range_copy AtspiTextRange -ATSPI_TYPE_TEXT_RANGE atspi_text_get_type AtspiText atspi_text_range_get_type @@ -29,12 +27,17 @@ atspi_text_get_selection atspi_text_add_selection atspi_text_remove_selection atspi_text_set_selection +atspi_text_get_string_at_offset +atspi_text_get_text_attribute_value +atspi_text_get_text_attributes ATSPI_TEXT ATSPI_IS_TEXT ATSPI_TYPE_TEXT atspi_range_get_type ATSPI_TEXT_GET_IFACE +ATSPI_TYPE_RANGE +ATSPI_TYPE_TEXT_RANGE
@@ -97,6 +100,9 @@ AtspiAction atspi_action_get_n_actions atspi_action_get_description atspi_action_get_key_binding +atspi_action_get_action_description +atspi_action_get_action_name +atspi_action_get_localized_name atspi_action_get_name atspi_action_do_action @@ -161,6 +167,10 @@ AtspiDocument atspi_document_get_locale atspi_document_get_attribute_value atspi_document_get_attributes +atspi_document_get_current_page_number +atspi_document_get_document_attribute_value +atspi_document_get_document_attributes +atspi_document_get_page_count ATSPI_DOCUMENT ATSPI_IS_DOCUMENT @@ -207,6 +217,8 @@ atspi_accessible_get_attributes_as_array atspi_accessible_get_locale atspi_accessible_get_toolkit_name atspi_accessible_get_toolkit_version +atspi_accessible_get_atspi_version +atspi_accessible_get_id atspi_accessible_get_application atspi_accessible_get_action atspi_accessible_get_collection @@ -218,8 +230,24 @@ atspi_accessible_get_hypertext atspi_accessible_get_image atspi_accessible_get_selection atspi_accessible_get_table +atspi_accessible_get_table_cell atspi_accessible_get_text atspi_accessible_get_value +atspi_accessible_get_object_locale +atspi_accessible_set_cache_mask +atspi_accessible_clear_cache +atspi_accessible_get_process_id +atspi_accessible_get_action_iface +atspi_accessible_get_collection_iface +atspi_accessible_get_component_iface +atspi_accessible_get_document_iface +atspi_accessible_get_editable_text_iface +atspi_accessible_get_hypertext_iface +atspi_accessible_get_image_iface +atspi_accessible_get_selection_iface +atspi_accessible_get_table_iface +atspi_accessible_get_text_iface +atspi_accessible_get_value_iface atspi_accessible_get_interfaces ATSPI_ACCESSIBLE @@ -229,6 +257,9 @@ atspi_accessible_get_type ATSPI_ACCESSIBLE_CLASS ATSPI_IS_ACCESSIBLE_CLASS ATSPI_ACCESSIBLE_GET_CLASS + + +AtspiAccessiblePrivate
@@ -253,6 +284,20 @@ ATSPI_DEVICE_LISTENER_GET_CLASS
+atspi-hypertext +AtspiHypertext +atspi_hypertext_get_n_links +atspi_hypertext_get_link +atspi_hypertext_get_link_index + +ATSPI_HYPERTEXT +ATSPI_IS_HYPERTEXT +ATSPI_TYPE_HYPERTEXT +atspi_hypertext_get_type +ATSPI_HYPERTEXT_GET_IFACE +
+ +
atspi-hyperlink AtspiHyperlink AtspiHyperlink @@ -278,7 +323,6 @@ ATSPI_HYPERLINK_GET_CLASS
atspi-editabletext AtspiEditableText -atspi_editable_text_set_attributes atspi_editable_text_insert_text atspi_editable_text_copy_text atspi_editable_text_cut_text @@ -290,6 +334,8 @@ ATSPI_IS_EDITABLE_TEXT ATSPI_TYPE_EDITABLE_TEXT atspi_editable_text_get_type ATSPI_EDITABLE_TEXT_GET_IFACE + +atspi_editable_text_set_attributes
@@ -356,12 +402,13 @@ atspi_table_cell_get_position atspi_table_cell_get_row_column_span atspi_table_cell_get_table -ATSPI_TABLE -ATSPI_IS_TABLE -ATSPI_TYPE_TABLE -atspi_table_get_type -ATSPI_TABLE_GET_IFACE +ATSPI_TABLE_CELL +ATSPI_IS_TABLE_CELL +ATSPI_TYPE_TABLE_CELL +atspi_table_cell_get_type +ATSPI_TABLE_CELL_GET_IFACE
+
atspi-selection AtspiSelection @@ -393,7 +440,9 @@ atspi_event_listener_new atspi_event_listener_new_simple atspi_event_listener_register atspi_event_listener_register_from_callback +atspi_event_listener_register_from_callback_full atspi_event_listener_register_no_data +atspi_event_listener_register_full atspi_event_listener_deregister atspi_event_listener_deregister_from_callback atspi_event_listener_deregister_no_data @@ -408,20 +457,6 @@ ATSPI_EVENT_LISTENER_GET_CLASS
-atspi-hypertext -AtspiHypertext -atspi_hypertext_get_n_links -atspi_hypertext_get_link -atspi_hypertext_get_link_index - -ATSPI_HYPERTEXT -ATSPI_IS_HYPERTEXT -ATSPI_TYPE_HYPERTEXT -atspi_hypertext_get_type -ATSPI_HYPERTEXT_GET_IFACE -
- -
atspi-component AtspiRect ATSPI_TYPE_RECT @@ -441,6 +476,11 @@ atspi_component_get_layer atspi_component_get_mdi_z_order atspi_component_grab_focus atspi_component_get_alpha +atspi_component_scroll_to +atspi_component_scroll_to_point +atspi_component_set_extents +atspi_component_set_position +atspi_component_set_size ATSPI_COMPONENT ATSPI_IS_COMPONENT @@ -465,20 +505,6 @@ atspi_generate_mouse_event
atspi-types -AtspiAccessible -AtspiAction -AtspiCollection -AtspiComponent -AtspiDocument -AtspiEditableText -AtspiHyperlink -AtspiHypertext -AtspiImage -AtspiSelection -AtspiTable -AtspiTableCell -AtspiText -AtspiValue AtspiControllerEventMask AtspiKeyMaskType AtspiKeyEventMask @@ -487,9 +513,13 @@ AtspiDeviceEvent AtspiEventListenerMode AtspiKeyDefinition AtspiEvent -ATSPI_TYPE_EVENT AtspiKeystrokeListener AtspiKeyListenerSyncType + + +ATSPI_TYPE_EVENT +atspi_device_event_get_type +atspi_key_listener_sync_type_get_type
@@ -506,6 +536,7 @@ AtspiCollectionTreeTraversalType ATSPI_TREETRAVERSALTYPE AtspiComponentLayer ATSPI_COMPONENTLAYER_COUNT +AtspiTextGranularity AtspiTextBoundaryType ATSPI_TEXT_BOUNDARY_TYPE_COUNT AtspiTextClipType @@ -524,40 +555,83 @@ AtspiRelationType ATSPI_RELATIONTYPE_COUNT AtspiRole ATSPI_ROLE_COUNT +AtspiCache +AtspiScrollType +ATSPI_SCROLLTYPE_COUNT + + +atspi_cache_get_type +atspi_collection_match_type_get_type +atspi_collection_sort_order_get_type +atspi_collection_tree_traversal_type_get_type +atspi_component_layer_get_type +atspi_coord_type_get_type +atspi_event_type_get_type +atspi_key_event_type_get_type +atspi_key_synth_type_get_type +atspi_locale_type_get_type +atspi_modifier_type_get_type +atspi_modifier_type_get_type +atspi_relation_type_get_type +atspi_role_get_type +atspi_scroll_type_get_type +atspi_state_type_get_type +atspi_text_boundary_type_get_type +atspi_text_clip_type_get_type +atspi_text_granularity_get_type +ATSPI_TYPE_CACHE +ATSPI_TYPE_COLLECTION_MATCH_TYPE +ATSPI_TYPE_COLLECTION_SORT_ORDER +ATSPI_TYPE_COLLECTION_TREE_TRAVERSAL_TYPE +ATSPI_TYPE_COMPONENT_LAYER +ATSPI_TYPE_COORD_TYPE +ATSPI_TYPE_DEVICE_EVENT +ATSPI_TYPE_EVENT_TYPE +ATSPI_TYPE_KEY_EVENT_TYPE +ATSPI_TYPE_KEY_LISTENER_SYNC_TYPE +ATSPI_TYPE_KEY_SYNTH_TYPE +ATSPI_TYPE_LOCALE_TYPE +ATSPI_TYPE_MODIFIER_TYPE +ATSPI_TYPE_RELATION_TYPE +ATSPI_TYPE_ROLE +ATSPI_TYPE_SCROLL_TYPE +ATSPI_TYPE_STATE_TYPE +ATSPI_TYPE_TEXT_BOUNDARY_TYPE +ATSPI_TYPE_TEXT_CLIP_TYPE +ATSPI_TYPE_TEXT_GRANULARITY
atspi-misc atspi_init +atspi_is_initialized +atspi_set_timeout +atspi_set_main_context atspi_event_main atspi_event_quit atspi_exit -
-
-atspi-misc-private -ATSPI_CACHE_PARENT + +atspi_main_loop +atspi_get_a11y_bus +atspi_dbus_connection_setup_with_g_main +atspi_dbus_server_setup_with_g_main +atspi_bus_registry ATSPI_CACHE_CHILDREN -ATSPI_CACHE_NAME ATSPI_CACHE_DESCRIPTION -ATSPI_CACHE_STATES -ATSPI_CACHE_ROLE ATSPI_CACHE_INTERFACES -AtspiReference -ATSPI_DBUS_NAME_REGISTRY -ATSPI_DBUS_PATH_REGISTRY -ATSPI_DBUS_INTERFACE_REGISTRY -ATSPI_DBUS_PATH_NULL -ATSPI_DBUS_PATH_ROOT -ATSPI_DBUS_PATH_DEC -ATSPI_DBUS_INTERFACE_DEC -ATSPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER -ATSPI_DBUS_INTERFACE_CACHE +ATSPI_CACHE_NAME +ATSPI_CACHE_PARENT +ATSPI_CACHE_ROLE +ATSPI_CACHE_STATES ATSPI_DBUS_INTERFACE_ACCESSIBLE ATSPI_DBUS_INTERFACE_ACTION ATSPI_DBUS_INTERFACE_APPLICATION +ATSPI_DBUS_INTERFACE_CACHE ATSPI_DBUS_INTERFACE_COLLECTION ATSPI_DBUS_INTERFACE_COMPONENT +ATSPI_DBUS_INTERFACE_DEC +ATSPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER ATSPI_DBUS_INTERFACE_DOCUMENT ATSPI_DBUS_INTERFACE_EDITABLE_TEXT ATSPI_DBUS_INTERFACE_EVENT_KEYBOARD @@ -566,18 +640,22 @@ ATSPI_DBUS_INTERFACE_EVENT_OBJECT ATSPI_DBUS_INTERFACE_HYPERLINK ATSPI_DBUS_INTERFACE_HYPERTEXT ATSPI_DBUS_INTERFACE_IMAGE +ATSPI_DBUS_INTERFACE_REGISTRY ATSPI_DBUS_INTERFACE_SELECTION +ATSPI_DBUS_INTERFACE_SOCKET ATSPI_DBUS_INTERFACE_TABLE +ATSPI_DBUS_INTERFACE_TABLE_CELL ATSPI_DBUS_INTERFACE_TEXT ATSPI_DBUS_INTERFACE_VALUE -ATSPI_DBUS_INTERFACE_SOCKET -atspi_path_dec -atspi_path_registry -atspi_path_root -atspi_bus_registry +ATSPI_DBUS_NAME_REGISTRY +ATSPI_DBUS_PATH_DEC +ATSPI_DBUS_PATH_NULL +ATSPI_DBUS_PATH_REGISTRY +ATSPI_DBUS_PATH_ROOT atspi_interface_accessible atspi_interface_action atspi_interface_application +atspi_interface_cache atspi_interface_collection atspi_interface_component atspi_interface_dec @@ -592,12 +670,13 @@ atspi_interface_selection atspi_interface_table atspi_interface_table_cell atspi_interface_text -atspi_interface_cache atspi_interface_value -
+atspi_no_cache +atspi_path_dec +atspi_path_registry +atspi_path_root +AtspiReference +AtspiError +ATSPI_ERROR -
-atspi-listener-private -atspi_dbus_handle_deviceEvent
- diff --git a/doc/libatspi/tmpl/atspi-constants.sgml b/doc/libatspi/tmpl/atspi-constants.sgml index 8763873..af2ec33 100644 --- a/doc/libatspi/tmpl/atspi-constants.sgml +++ b/doc/libatspi/tmpl/atspi-constants.sgml @@ -39,6 +39,26 @@ Constant definitions needed by multiple interfaces. + + + + + +@ATSPI_SCROLL_TOP_LEFT: +@ATSPI_SCROLL_BOTTOM_RIGHT: +@ATSPI_SCROLL_TOP_EDGE: +@ATSPI_SCROLL_BOTTOM_EDGE: +@ATSPI_SCROLL_LEFT_EDGE: +@ATSPI_SCROLL_RIGHT_EDGE: +@ATSPI_SCROLL_ANYWHERE: + + + + + + + + @@ -46,6 +66,7 @@ Constant definitions needed by multiple interfaces. @ATSPI_COORD_TYPE_SCREEN: @ATSPI_COORD_TYPE_WINDOW: +@ATSPI_COORD_TYPE_PARENT: @@ -270,6 +291,8 @@ Constant definitions needed by multiple interfaces. @ATSPI_KEY_PRESSRELEASE: @ATSPI_KEY_SYM: @ATSPI_KEY_STRING: +@ATSPI_KEY_LOCKMODIFIERS: +@ATSPI_KEY_UNLOCKMODIFIERS: diff --git a/idl/component.didl b/idl/component.didl index aa40e78..31cfbf0 100644 --- a/idl/component.didl +++ b/idl/component.didl @@ -54,7 +54,30 @@ interface org.freestandards.atspi.Component { LAYER_WINDOW, LAYER_LAST_DEFINED } - + + /* + Describes where the object should be placed on the window. + */ + enum uint32 ScrollType { + SCROLL_TOP_LEFT = 0, + SCROLL_BOTTOM_RIGHT, + SCROLL_TOP_EDGE, + SCROLL_BOTTOM_EDGE, + SCROLL_LEFT_EDGE, + SCROLL_RIGHT_EDGE, + SCROLL_ANYWHERE + } + + /* + Specifies whether the coordinates are relative to the screen, to the + window, or to the parent object. + */ + enum uint32 CoordType { + COORD_TYPE_SCREEN = 0, + COORD_TYPE_WINDOW, + COORD_TYPE_PARENT + } + /* True if the specified point lies within the components bounding box. */ @@ -136,4 +159,20 @@ interface org.freestandards.atspi.Component { method GetAlpha reply { double alpha; } + + /* + Scroll this object so it becomes visible on the screen. + */ + method ScrollTo { + ScrollType type; + } + + /* + Scroll this object so it becomes visible on the screen at a given position. + */ + method ScrollToPoint { + CoordType type; + int32 x; + int32 y; + } } diff --git a/idl/controller.didl b/idl/controller.didl index 53b5f71..4519a0a 100644 --- a/idl/controller.didl +++ b/idl/controller.didl @@ -6,7 +6,9 @@ interface org.freestandards.atspi.DeviceEventController { KEY_RELEASE, KEY_PRESSRELEASE, KEY_SYM, - KEY_STRING + KEY_STRING, + KEY_LOCKMODIFIERS, + KEY_UNLOCKMODIFIERS } /* diff --git a/meson.build b/meson.build index 0cfdbef..351b207 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('at-spi2-core', 'c', - version: '2.26.1', + version: '2.31.1', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', @@ -8,7 +8,7 @@ project('at-spi2-core', 'c', ], meson_version: '>= 0.40.1') -add_project_arguments([ '-D_POSIX_C_SOURCE', '-D_DEFAULT_SOURCE' ], language: 'c') +add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_DEFAULT_SOURCE' ], language: 'c') atspi_gir_ns = 'Atspi' @@ -109,20 +109,6 @@ xgettext = find_program('xgettext', required : false) configure_file(output: 'config.h', configuration: at_spi_conf) -# Compat variables for pkgconfig -pkgconf = configuration_data() -pkgconf.set('prefix', get_option('prefix')) -pkgconf.set('exec_prefix', get_option('prefix')) -pkgconf.set('libdir', atspi_libdir) -pkgconf.set('includedir', atspi_includedir) -pkgconf.set('VERSION', meson.project_version()) - -configure_file(input: 'atspi-2.pc.in', - output: 'atspi-2.pc', - configuration: pkgconf, - install: true, - install_dir: join_paths(get_option('libdir'), 'pkgconfig')) - gnome = import('gnome') subdir('dbind') diff --git a/meson_options.txt b/meson_options.txt index c9afe2f..f8ec862 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,6 +6,15 @@ option('dbus_daemon', description: 'The path of the DBus daemon', type: 'string', value: 'default') +option('dbus_broker', + description: 'The path of the DBus broker', + type: 'string', + value: 'default') +option('default_bus', + description: 'The default DBus implementation to use', + type: 'combo', + choices: ['dbus-daemon', 'dbus-broker'], + value: 'dbus-daemon') option('systemd_user_dir', description: 'Location of the systemd user services', type: 'string', diff --git a/po/Makevars b/po/Makevars deleted file mode 100644 index b40107f..0000000 --- a/po/Makevars +++ /dev/null @@ -1,78 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = at-spi2-core authors - -# This tells whether or not to prepend "GNU " prefix to the package -# name that gets inserted into the header of the $(DOMAIN).pot file. -# Possible values are "yes", "no", or empty. If it is empty, try to -# detect it automatically by scanning the files in $(top_srcdir) for -# "GNU packagename" string. -PACKAGE_GNU = no - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = https://bugzilla.gnome.org/enter_bug.cgi?product=at-spi&keywords=I18N+L10N&component=at-spi2-core - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = - -# These options get passed to msginit. -# If you want to disable line wrapping when writing PO files, add -# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and -# MSGINIT_OPTIONS. -MSGINIT_OPTIONS = - -# This tells whether or not to regenerate a PO file when $(DOMAIN).pot -# has changed. Possible values are "yes" and "no". Set this to no if -# the POT file is checked in the repository and the version control -# program ignores timestamps. -PO_DEPENDS_ON_POT = no - -# This tells whether or not to forcibly update $(DOMAIN).pot and -# regenerate PO files on "make dist". Possible values are "yes" and -# "no". Set this to no if the POT file and PO files are maintained -# externally. -DIST_DEPENDS_ON_UPDATE_PO = no diff --git a/po/fr.po b/po/fr.po index 6e1ba90..f0eb565 100644 --- a/po/fr.po +++ b/po/fr.po @@ -2,27 +2,27 @@ # Copyright (C) 2011 Listed translators # This file is distributed under the same license as the at-spi2-core package. # Claude Paroz , 2011. +# Charles Monzat , 2018. # msgid "" msgstr "" "Project-Id-Version: at-spi2-core master\n" -"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=at-" -"spi&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2014-02-03 23:50+0000\n" -"PO-Revision-Date: 2014-03-11 22:53+0100\n" -"Last-Translator: Claude Paroz \n" -"Language-Team: GNOME French Team \n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/at-spi2-core/issues\n" +"POT-Creation-Date: 2018-10-05 04:46+0000\n" +"PO-Revision-Date: 2018-11-14 18:35+0100\n" +"Last-Translator: Charles Monzat \n" +"Language-Team: français \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Gtranslator 3.30.0\n" -#: ../atspi/atspi-component.c:325 ../atspi/atspi-misc.c:1034 -#: ../atspi/atspi-value.c:111 +#: atspi/atspi-component.c:326 atspi/atspi-misc.c:1073 atspi/atspi-value.c:111 msgid "The application no longer exists" -msgstr "L'application n'existe plus" +msgstr "L’application n’existe plus" -#: ../atspi/atspi-misc.c:1777 +#: atspi/atspi-misc.c:1850 msgid "Attempted synchronous call where prohibited" -msgstr "La tentative d'appel synchrone est interdite" +msgstr "La tentative d’appel synchrone est interdite" diff --git a/registryd/Makefile.am b/registryd/Makefile.am deleted file mode 100644 index 6a4b1d8..0000000 --- a/registryd/Makefile.am +++ /dev/null @@ -1,68 +0,0 @@ -EXTRA_DIST = \ - meson.build - -libexec_PROGRAMS = at-spi2-registryd - -at_spi2_registryd_CFLAGS = \ - $(GLIB_CFLAGS) \ - $(GIO_CFLAGS) \ - $(DBUS_CFLAGS) \ - $(GOBJ_CFLAGS) \ - $(ATK_CFLAGS) \ - $(X11_CFLAGS) \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(top_builddir)/atspi \ - -DATSPI_INTROSPECTION_PATH=\"$(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH)\" - -at_spi2_registryd_LDADD = \ - ../atspi/libatspi.la \ - $(GLIB_LIBS) \ - $(GIO_LIBS) \ - $(DBUS_LIBS) \ - $(GOBJ_CFLAGS) \ - $(ATK_LIBS) \ - $(X11_LIBS) \ - $(DL_LIBS) - -at_spi2_registryd_SOURCES = \ - de-marshaller.h \ - de-marshaller.c \ - de-types.h \ - keymasks.h \ - paths.h \ - registry-main.c \ - registry.c \ - registry.h \ - introspection.h \ - introspection.c \ - deviceeventcontroller.c \ - deviceeventcontroller.h \ - reentrant-list.c \ - reentrant-list.h - -X11_SOURCES = \ - deviceeventcontroller-x11.c \ - display.h \ - display.c \ - event-source.c \ - event-source.h \ - ucs2keysym.c - -if USE_X11 -at_spi2_registryd_SOURCES += $(X11_SOURCES) -else -EXTRA_DIST += $(X11_SOURCES) -endif - -servicedir=$(datadir)/dbus-1/accessibility-services -service_in_files = org.a11y.atspi.Registry.service.in -service_DATA = $(service_in_files:.service.in=.service) - -$(service_DATA): $(service_in_files) Makefile - $(AM_V_GEN)$(SED) -e "s|[@]libexecdir[@]|$(libexecdir)|" $(srcdir)/$@.in > $@ - -DISTCLEANFILES = org.a11y.atspi.Registry.service -EXTRA_DIST += org.a11y.atspi.Registry.service.in - --include $(top_srcdir)/git.mk diff --git a/registryd/de-types.h b/registryd/de-types.h index a338e38..f08823c 100644 --- a/registryd/de-types.h +++ b/registryd/de-types.h @@ -47,6 +47,8 @@ typedef enum { Accessibility_KEY_PRESSRELEASE, Accessibility_KEY_SYM, Accessibility_KEY_STRING, + Accessibility_KEY_LOCKMODIFIERS, + Accessibility_KEY_UNLOCKMODIFIERS, } Accessibility_KeySynthType; typedef struct _Accessibility_DeviceEvent Accessibility_DeviceEvent; diff --git a/registryd/deviceeventcontroller-x11.c b/registryd/deviceeventcontroller-x11.c index d9d9a6c..e5b8dfc 100644 --- a/registryd/deviceeventcontroller-x11.c +++ b/registryd/deviceeventcontroller-x11.c @@ -1018,8 +1018,10 @@ spi_dec_x11_synth_keycode_press (SpiDEController *controller, { unsigned int time = CurrentTime; unsigned int bounce_delay; +#ifdef THIS_IS_BROKEN unsigned int elapsed_msec; struct timeval tv; +#endif DEControllerPrivateData *priv = controller->priv; spi_x_error_trap (); @@ -1028,15 +1030,15 @@ spi_dec_x11_synth_keycode_press (SpiDEController *controller, bounce_delay = xkb_get_bouncekeys_delay (controller); if (bounce_delay) { +#ifdef THIS_IS_BROKEN gettimeofday (&tv, NULL); elapsed_msec = (tv.tv_sec - priv->last_release_time.tv_sec) * 1000 + (tv.tv_usec - priv->last_release_time.tv_usec) / 1000; -#ifdef SPI_XKB_DEBUG +# ifdef SPI_XKB_DEBUG fprintf (stderr, "%d ms elapsed (%ld usec)\n", elapsed_msec, (long) (tv.tv_usec - priv->last_release_time.tv_usec)); -#endif -#ifdef THIS_IS_BROKEN +# endif if (elapsed_msec < bounce_delay) time = bounce_delay - elapsed_msec + 1; #else @@ -1062,8 +1064,10 @@ spi_dec_x11_synth_keycode_release (SpiDEController *controller, { unsigned int time = CurrentTime; unsigned int slow_delay; +#ifdef THIS_IS_BROKEN_DUNNO_WHY unsigned int elapsed_msec; struct timeval tv; +#endif DEControllerPrivateData *priv = controller->priv; spi_x_error_trap (); @@ -1072,15 +1076,15 @@ spi_dec_x11_synth_keycode_release (SpiDEController *controller, slow_delay = xkb_get_slowkeys_delay (controller); if (slow_delay) { +#ifdef THIS_IS_BROKEN_DUNNO_WHY gettimeofday (&tv, NULL); elapsed_msec = (tv.tv_sec - priv->last_press_time.tv_sec) * 1000 + (tv.tv_usec - priv->last_press_time.tv_usec) / 1000; -#ifdef SPI_XKB_DEBUG +# ifdef SPI_XKB_DEBUG fprintf (stderr, "%d ms elapsed (%ld usec)\n", elapsed_msec, (long) (tv.tv_usec - priv->last_press_time.tv_usec)); -#endif -#ifdef THIS_IS_BROKEN_DUNNO_WHY +# endif if (elapsed_msec < slow_delay) time = slow_delay - elapsed_msec + 1; #else diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index 0c965ef..4e25ad6 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -1762,6 +1762,12 @@ impl_generate_keyboard_event (DBusConnection *bus, DBusMessage *message, void *u fprintf (stderr, "Keystring synthesis failure, string=%s\n", keystring); break; + case Accessibility_KEY_LOCKMODIFIERS: + spi_dec_plat_lock_modifiers (controller, keycode); + break; + case Accessibility_KEY_UNLOCKMODIFIERS: + spi_dec_plat_unlock_modifiers (controller, keycode); + break; } reply = dbus_message_new_method_return (message); return reply; diff --git a/registryd/reentrant-list.c b/registryd/reentrant-list.c index 29bdfca..7f9a716 100644 --- a/registryd/reentrant-list.c +++ b/registryd/reentrant-list.c @@ -45,7 +45,7 @@ spi_re_entrant_list_delete_link (GList * const *element_ptr) GList *next; GList *element; gboolean first_item; - GList *dummy; /* suppress warning */ + GList *dummy G_GNUC_UNUSED; g_return_if_fail (element_ptr != NULL); diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index b76db0a..0000000 --- a/test/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -LDADD = $(top_builddir)/atspi/libatspi.la -noinst_PROGRAMS = memory -memory_SOURCES = memory.c -memory_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) -I$(top_builddir)/atspi -memory_CFLAGS = $(GLIB_CFLAGS) $(GOBJ_LIBS) $(DBUS_CFLAGS) -memory_LDFLAGS = - --include $(top_srcdir)/git.mk - -EXTRA_DIST = meson.build diff --git a/xml/Component.xml b/xml/Component.xml index c67dde9..c1258d2 100644 --- a/xml/Component.xml +++ b/xml/Component.xml @@ -72,5 +72,15 @@ + + + + + + + + + + diff --git a/xml/Makefile.am b/xml/Makefile.am deleted file mode 100644 index edb71d3..0000000 --- a/xml/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -EXTRA_DIST = \ - Accessibility.xml \ - Accessible.xml \ - Action.xml \ - Application.xml \ - Cache.xml \ - Collection.xml \ - Component.xml \ - create-introspection.sh \ - DeviceEventController.xml \ - DeviceEventListener.xml \ - Document.xml \ - EditableText.xml \ - Event.xml \ - Hyperlink.xml \ - Hypertext.xml \ - Image.xml \ - Registry.xml \ - remove-annotations.xsl \ - Selection.xml \ - Socket.xml \ - Table.xml \ - Text.xml \ - Value.xml \ - versioned-introspection.py - -CLEANFILES = \ - introspection.c \ - introspection.h \ - Processed.xml - -#BUILT_SOURCES = spec.xml -#CLEANFILES += spec.xml - -XML_SPEC = $(filter %.xml,$(EXTRA_DIST)) - -spec.xml: $(XML_SPEC) - xsltproc --xinclude $(top_srcdir)/tools/identity.xsl Accessibility.xml >spec.xml - - --include $(top_srcdir)/git.mk -- 2.7.4 From f5f115439475eb34445b7ab3a952758a34e72d28 Mon Sep 17 00:00:00 2001 From: Jongmin Lee Date: Thu, 14 Feb 2019 08:42:07 +0900 Subject: [PATCH 03/16] resolve build error in aarch64 and x86_64 Change-Id: I7cb193c626a19a818ed0c232d3cc788866679c82 --- packaging/at-spi2-core.spec | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/packaging/at-spi2-core.spec b/packaging/at-spi2-core.spec index 74cb63b..b4ac7f0 100644 --- a/packaging/at-spi2-core.spec +++ b/packaging/at-spi2-core.spec @@ -73,7 +73,7 @@ to develop applications that require these. cp %{SOURCE1001} . %build -meson build -Dwith-dbus-daemondir=%{_bindir} \ +meson --prefix /usr/ build -Dwith-dbus-daemondir=%{_bindir} \ %if !%{with x} -Denable-x11=no \ %else @@ -81,12 +81,14 @@ meson build -Dwith-dbus-daemondir=%{_bindir} \ %endif -Denable-static=no -(cd build && ninja) +ninja -C build all %install find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f -(cd build && DESTDIR=%{buildroot} ninja install) +export DESTDIR=%{buildroot} +ninja -C build install + %find_lang %{name} %clean @@ -99,21 +101,21 @@ rm -fr %{buildroot} %files -f %{name}.lang %manifest %{name}.manifest %defattr(-,root,root) -/usr/local/libexec/at_spi2_tool +%{_libexecdir}/at_spi2_tool %doc AUTHORS README %license COPYING -/usr/local/libexec/at-spi-bus-launcher -/usr/local/libexec/at-spi2-registryd -/usr/local/share/defaults/at-spi2/accessibility.conf -/usr/local/etc/xdg/autostart/at-spi-dbus-bus.desktop -/usr/local/share/dbus-1/accessibility-services/org.a11y.atspi.Registry.service -/usr/local/share/dbus-1/services/org.a11y.Bus.service -/usr/local/lib/systemd/user/at-spi-dbus-bus.service +%{_libexecdir}/at-spi-bus-launcher +%{_libexecdir}/at-spi2-registryd +%{_datadir}/defaults/at-spi2/accessibility.conf +%{_sysconfdir}/xdg/autostart/at-spi-dbus-bus.desktop +%{_datadir}/dbus-1/accessibility-services/org.a11y.atspi.Registry.service +%{_datadir}/dbus-1/services/org.a11y.Bus.service +%{_prefix}/lib/systemd/user/at-spi-dbus-bus.service %files -n libatspi0 %manifest %{name}.manifest %defattr(-, root, root) -/usr/local/lib/libatspi.so.0* +%{_libdir}/libatspi.so.0* %files -n typelib-1_0-Atspi-2_0 %manifest %{name}.manifest @@ -122,6 +124,6 @@ rm -fr %{buildroot} %files devel %manifest %{name}.manifest %defattr(-, root, root) -/usr/local/include/at-spi-2.0 -/usr/local/lib/libatspi.so -/usr/local/lib/pkgconfig/atspi-2.pc +%{_includedir}/at-spi-2.0 +%{_libdir}/libatspi.so +%{_libdir}/pkgconfig/atspi-2.pc -- 2.7.4 From 2e7b47c984f7f7d96604e1d4badbe29b74ccca8f Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Mon, 4 Mar 2019 13:09:32 +0100 Subject: [PATCH 04/16] Fix for invalid at-spi configuration Fixes not working configuration (dbus-daemon binary not found), which caused at-spi2-bus-launcher not to start. Fixes crash due to missing schema for GSetting. Change-Id: I5f1692144b4c7487f33739832780224707be001c --- bus/at-spi-bus-launcher.c | 6 ++++-- packaging/at-spi2-core.spec | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index f8ae02b..e42a26d 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -1,6 +1,6 @@ /* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*- - * - * at-spi-bus-launcher: Manage the a11y bus as a child process + * + * at-spi-bus-launcher: Manage the a11y bus as a child process * * Copyright 2011-2018 Red Hat, Inc. * @@ -929,6 +929,8 @@ get_schema (const gchar *name) { #if GLIB_CHECK_VERSION (2, 32, 0) GSettingsSchemaSource *source = g_settings_schema_source_get_default (); + if (!source) return NULL; + GSettingsSchema *schema = g_settings_schema_source_lookup (source, name, FALSE); if (schema == NULL) diff --git a/packaging/at-spi2-core.spec b/packaging/at-spi2-core.spec index b4ac7f0..7981bc8 100644 --- a/packaging/at-spi2-core.spec +++ b/packaging/at-spi2-core.spec @@ -73,7 +73,7 @@ to develop applications that require these. cp %{SOURCE1001} . %build -meson --prefix /usr/ build -Dwith-dbus-daemondir=%{_bindir} \ +meson --prefix /usr/ build -Dwith-dbus-daemondir=%{_bindir} -Ddbus_daemon=/usr/bin/dbus-daemon \ %if !%{with x} -Denable-x11=no \ %else -- 2.7.4 From 3f3b64df9928cfda09f68aa9554ed148deffd76a Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Thu, 28 Mar 2019 14:02:03 +0100 Subject: [PATCH 05/16] Fix for missing -fPIE build flag Adds -fPIE build flag to meson, which is required, because not ASLR binaries won't be allowed to run on target. Change-Id: I1f725eb4c7f39a32c43dd104255b16b0628d7a38 --- bus/meson.build | 2 ++ registryd/meson.build | 2 ++ test/meson.build | 2 ++ 3 files changed, 6 insertions(+) diff --git a/bus/meson.build b/bus/meson.build index 459e652..75c6591 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -34,6 +34,7 @@ configure_file(input: 'at-spi-dbus-bus.service.in', launcher_args = [ '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), '-DDATADIR="@0@"'.format(atspi_datadir), + '-fPIE' ] if get_option('dbus_daemon') != 'default' @@ -69,5 +70,6 @@ executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c', include_directories: [ root_inc, include_directories('.') ], dependencies: [ gio_dep, x11_deps, app_svc_dep ], c_args: launcher_args, + link_args: '-pie', install: true, install_dir: atspi_libexecdir) diff --git a/registryd/meson.build b/registryd/meson.build index eb8236e..be0fe95 100644 --- a/registryd/meson.build +++ b/registryd/meson.build @@ -32,6 +32,8 @@ endif executable('at-spi2-registryd', registryd_sources, dependencies: registryd_deps, + c_args: '-fPIE', + link_args: '-pie', install: true, install_dir: atspi_libexecdir) diff --git a/test/meson.build b/test/meson.build index ba6a296..e564e2a 100644 --- a/test/meson.build +++ b/test/meson.build @@ -9,6 +9,8 @@ at_spi2_tool_sources = [ executable('at_spi2_tool', at_spi2_tool_sources, dependencies: [ atspi_dep, gio_dep ], + c_args: '-fPIE', + link_args: '-pie', install: true, install_dir: atspi_libexecdir) -- 2.7.4 From c32b7e30abbed137171dd516069fc24c296d45bc Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Thu, 18 Apr 2019 12:26:46 +0200 Subject: [PATCH 06/16] Fixes SVACE issue with thread-unsafe calls to strerror Calls to strerror were replaced with calls to strerror_r, which is thread-safe. Change-Id: I6ee4908672118248b96590f375005ee424daea85 --- bus/at-spi-bus-launcher.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index e42a26d..65bb0b1 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -349,7 +349,11 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) argv[1] = (char*)config_path; if (pipe (app->pipefd) < 0) - g_error ("Failed to create pipe: %s", strerror (errno)); + { + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + g_error ("Failed to create pipe: %s", buf); + } g_clear_pointer (&app->a11y_launch_error_message, g_free); @@ -378,7 +382,9 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) LOGD("Launched a11y bus, child is %ld", (long) pid); if (!unix_read_all_fd_to_string (app->pipefd[0], addr_buf, sizeof (addr_buf))) { - app->a11y_launch_error_message = g_strdup_printf ("Failed to read address: %s", strerror (errno)); + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + app->a11y_launch_error_message = g_strdup_printf ("Failed to read address: %s", buf); kill (app->a11y_bus_pid, SIGTERM); goto error; } @@ -437,16 +443,32 @@ ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path) GError *error = NULL; if ((app->listenfd = socket (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) < 0) - g_error ("Failed to create listening socket: %s", strerror (errno)); + { + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + g_error ("Failed to create listening socket: %s", buf); + } if (bind (app->listenfd, (struct sockaddr *)&addr, sizeof(sa_family_t)) < 0) - g_error ("Failed to bind listening socket: %s", strerror (errno)); + { + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + g_error ("Failed to bind listening socket: %s", buf); + } if (getsockname (app->listenfd, (struct sockaddr *)&addr, &addr_len) < 0) - g_error ("Failed to get socket name for listening socket: %s", strerror(errno)); + { + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + g_error ("Failed to get socket name for listening socket: %s", buf); + } if (listen (app->listenfd, 1024) < 0) - g_error ("Failed to listen on socket: %s", strerror(errno)); + { + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + g_error ("Failed to listen on socket: %s", buf); + } g_clear_pointer (&app->a11y_launch_error_message, g_free); @@ -870,7 +892,11 @@ init_sigterm_handling (A11yBusLauncher *app) GIOChannel *sigterm_channel; if (pipe (sigterm_pipefd) < 0) - g_error ("Failed to create pipe: %s", strerror (errno)); + { + char buf[4096] = { 0 }; + strerror_r (errno, buf, sizeof(buf)); + g_error ("Failed to create pipe: %s", buf); + } signal (SIGTERM, sigterm_handler); sigterm_channel = g_io_channel_unix_new (sigterm_pipefd[0]); -- 2.7.4 From c64ea0f61a0842c7b71c3ccb9018fd9dce088164 Mon Sep 17 00:00:00 2001 From: Mateusz Moscicki Date: Fri, 19 Apr 2019 10:51:11 +0200 Subject: [PATCH 07/16] tizen: Add additional unit for "unified" user session The unified user session is about moving user session units, managed by systemd --user, to main systemd, where it's managed as part of newly created user@.target. user@.target will contain same units as previously available in user/, with same UID and environment setup. systemd instance is used for unit to be able to specify UID (inherited from user@.target). The rationale behind this work is following: * VD requirement to remove user session support * boot time optimization requirements, due to: + 'systemd --user' taking 1s its own startup that could be used for unit startup + ability to better rearrange units if these managed by one systemd instance Unit installed by this commit will not be used till user login mechanism will be changed in systemd package (via changing pam_systemd to start user@.target, rather than user@.service). Change-Id: I232c8be6cc6fce07ae694d5b0ac2f08d8b98c3a0 --- bus/at-spi-dbus-bus@.service.in | 12 ++++++++++++ bus/meson.build | 6 ++++++ meson.build | 6 ++++++ meson_options.txt | 4 ++++ packaging/at-spi2-core.spec | 1 + 5 files changed, 29 insertions(+) create mode 100644 bus/at-spi-dbus-bus@.service.in diff --git a/bus/at-spi-dbus-bus@.service.in b/bus/at-spi-dbus-bus@.service.in new file mode 100644 index 0000000..f8543d3 --- /dev/null +++ b/bus/at-spi-dbus-bus@.service.in @@ -0,0 +1,12 @@ +[Unit] +PartOf=userlogin@%i.target +Description=Accessibility services bus + +[Service] +User=%i +Environment=DBUS_SESSION_BUS_ADDRESS=kernel:path=/sys/fs/kdbus/%i-user/bus;unix:path=/run/user/%i/bus +Environment=XDG_RUNTIME_DIR=/run/user/%i +SmackProcessLabel=User +Type=dbus +BusName=org.a11y.Bus +ExecStart=@libexecdir@/at-spi-bus-launcher diff --git a/bus/meson.build b/bus/meson.build index 75c6591..21e453e 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -31,6 +31,12 @@ configure_file(input: 'at-spi-dbus-bus.service.in', install: true, install_dir: systemd_user_dir) +configure_file(input: 'at-spi-dbus-bus@.service.in', + output: 'at-spi-dbus-bus@.service', + configuration: libexec_conf, + install: true, + install_dir: systemd_system_dir) + launcher_args = [ '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), '-DDATADIR="@0@"'.format(atspi_datadir), diff --git a/meson.build b/meson.build index ab48912..7eaa416 100644 --- a/meson.build +++ b/meson.build @@ -42,6 +42,12 @@ else systemd_user_dir = join_paths(get_option('prefix'), 'lib/systemd/user') endif +if get_option('systemd_system_dir') != 'default' + systemd_system_dir = get_option('systemd_system_dir') +else + systemd_system_dir = join_paths(get_option('prefix'), 'lib/systemd/system') +endif + # Dependencies libdbus_req_version = '>= 1.5' glib_req_version = '>= 2.32.0' diff --git a/meson_options.txt b/meson_options.txt index f8ec862..4ff7d5e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,6 +19,10 @@ option('systemd_user_dir', description: 'Location of the systemd user services', type: 'string', value: 'default') +option('systemd_system_dir', + description: 'Location of the systemd system services', + type: 'string', + value: 'default') option('enable_docs', description: 'Generate API reference for atspi (requires GTK-Doc)', type: 'boolean', diff --git a/packaging/at-spi2-core.spec b/packaging/at-spi2-core.spec index 7981bc8..f9af8d2 100644 --- a/packaging/at-spi2-core.spec +++ b/packaging/at-spi2-core.spec @@ -112,6 +112,7 @@ rm -fr %{buildroot} %{_datadir}/dbus-1/accessibility-services/org.a11y.atspi.Registry.service %{_datadir}/dbus-1/services/org.a11y.Bus.service %{_prefix}/lib/systemd/user/at-spi-dbus-bus.service +%{_prefix}/lib/systemd/system/at-spi-dbus-bus@.service %files -n libatspi0 %manifest %{name}.manifest %defattr(-, root, root) -- 2.7.4 From 870691c1c55fe128f85ce7395ff9198ba93b2cdc Mon Sep 17 00:00:00 2001 From: YoungGun Chun Date: Tue, 7 May 2019 14:53:00 +0900 Subject: [PATCH 08/16] Fix meson build error Change-Id: If9f9fcbd94c9f562d239d4b134f97bfb3a4ea705 --- packaging/at-spi2-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/at-spi2-core.spec b/packaging/at-spi2-core.spec index f9af8d2..e6ba0f1 100644 --- a/packaging/at-spi2-core.spec +++ b/packaging/at-spi2-core.spec @@ -73,7 +73,7 @@ to develop applications that require these. cp %{SOURCE1001} . %build -meson --prefix /usr/ build -Dwith-dbus-daemondir=%{_bindir} -Ddbus_daemon=/usr/bin/dbus-daemon \ +meson --prefix /usr --libdir %{_libdir} build -Dwith-dbus-daemondir=%{_bindir} -Ddbus_daemon=/usr/bin/dbus-daemon \ %if !%{with x} -Denable-x11=no \ %else -- 2.7.4 From f912694aa82e8f2769c058ba8b40c5911342d105 Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Tue, 21 May 2019 12:43:14 +0200 Subject: [PATCH 09/16] at_spi2_tool is now in path'ed directory Change-Id: Iee3957bc7259622191e09b2f06e6d2262e67faf5 --- meson.build | 1 + packaging/at-spi2-core.spec | 2 +- test/meson.build | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index ab48912..777f821 100644 --- a/meson.build +++ b/meson.build @@ -28,6 +28,7 @@ atspi_datadir = join_paths(atspi_prefix, get_option('datadir')) atspi_libexecdir = join_paths(atspi_prefix, get_option('libexecdir')) atspi_sysconfdir = join_paths(atspi_prefix, get_option('sysconfdir')) atspi_libdir = join_paths(atspi_prefix, get_option('libdir')) +atspi_bindir = join_paths(atspi_prefix, get_option('bindir')) atspi_includedir = join_paths(atspi_prefix, get_option('includedir')) if get_option('dbus_services_dir') != 'default' diff --git a/packaging/at-spi2-core.spec b/packaging/at-spi2-core.spec index 7981bc8..f82ad74 100644 --- a/packaging/at-spi2-core.spec +++ b/packaging/at-spi2-core.spec @@ -101,7 +101,7 @@ rm -fr %{buildroot} %files -f %{name}.lang %manifest %{name}.manifest %defattr(-,root,root) -%{_libexecdir}/at_spi2_tool +%{_bindir}/at_spi2_tool %doc AUTHORS README %license COPYING diff --git a/test/meson.build b/test/meson.build index e564e2a..3f469c0 100644 --- a/test/meson.build +++ b/test/meson.build @@ -12,5 +12,5 @@ executable('at_spi2_tool', at_spi2_tool_sources, c_args: '-fPIE', link_args: '-pie', install: true, - install_dir: atspi_libexecdir) + install_dir: atspi_bindir) -- 2.7.4 From 1ac0a39bb204a1543dc7a3d52dc0a85ae6d53922 Mon Sep 17 00:00:00 2001 From: Yunmi Ha Date: Tue, 20 Aug 2019 07:19:22 +0000 Subject: [PATCH 10/16] Revert "tizen: Add additional unit for "unified" user session" This reverts commit c64ea0f61a0842c7b71c3ccb9018fd9dce088164. We've optimized systemd-user without unified system/session. So, we revert the patch for unified system/session. Change-Id: I4790604bf3b41c484aef3ffd029719f04a92fbce --- bus/at-spi-dbus-bus@.service.in | 12 ------------ bus/meson.build | 6 ------ meson.build | 6 ------ meson_options.txt | 4 ---- packaging/at-spi2-core.spec | 1 - 5 files changed, 29 deletions(-) delete mode 100644 bus/at-spi-dbus-bus@.service.in diff --git a/bus/at-spi-dbus-bus@.service.in b/bus/at-spi-dbus-bus@.service.in deleted file mode 100644 index f8543d3..0000000 --- a/bus/at-spi-dbus-bus@.service.in +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -PartOf=userlogin@%i.target -Description=Accessibility services bus - -[Service] -User=%i -Environment=DBUS_SESSION_BUS_ADDRESS=kernel:path=/sys/fs/kdbus/%i-user/bus;unix:path=/run/user/%i/bus -Environment=XDG_RUNTIME_DIR=/run/user/%i -SmackProcessLabel=User -Type=dbus -BusName=org.a11y.Bus -ExecStart=@libexecdir@/at-spi-bus-launcher diff --git a/bus/meson.build b/bus/meson.build index 21e453e..75c6591 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -31,12 +31,6 @@ configure_file(input: 'at-spi-dbus-bus.service.in', install: true, install_dir: systemd_user_dir) -configure_file(input: 'at-spi-dbus-bus@.service.in', - output: 'at-spi-dbus-bus@.service', - configuration: libexec_conf, - install: true, - install_dir: systemd_system_dir) - launcher_args = [ '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), '-DDATADIR="@0@"'.format(atspi_datadir), diff --git a/meson.build b/meson.build index 7eaa416..ab48912 100644 --- a/meson.build +++ b/meson.build @@ -42,12 +42,6 @@ else systemd_user_dir = join_paths(get_option('prefix'), 'lib/systemd/user') endif -if get_option('systemd_system_dir') != 'default' - systemd_system_dir = get_option('systemd_system_dir') -else - systemd_system_dir = join_paths(get_option('prefix'), 'lib/systemd/system') -endif - # Dependencies libdbus_req_version = '>= 1.5' glib_req_version = '>= 2.32.0' diff --git a/meson_options.txt b/meson_options.txt index 4ff7d5e..f8ec862 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,10 +19,6 @@ option('systemd_user_dir', description: 'Location of the systemd user services', type: 'string', value: 'default') -option('systemd_system_dir', - description: 'Location of the systemd system services', - type: 'string', - value: 'default') option('enable_docs', description: 'Generate API reference for atspi (requires GTK-Doc)', type: 'boolean', diff --git a/packaging/at-spi2-core.spec b/packaging/at-spi2-core.spec index f9af8d2..7981bc8 100644 --- a/packaging/at-spi2-core.spec +++ b/packaging/at-spi2-core.spec @@ -112,7 +112,6 @@ rm -fr %{buildroot} %{_datadir}/dbus-1/accessibility-services/org.a11y.atspi.Registry.service %{_datadir}/dbus-1/services/org.a11y.Bus.service %{_prefix}/lib/systemd/user/at-spi-dbus-bus.service -%{_prefix}/lib/systemd/system/at-spi-dbus-bus@.service %files -n libatspi0 %manifest %{name}.manifest %defattr(-, root, root) -- 2.7.4 From 237d12f368c890194da2c71f5df85a7e00f2dc2a Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Mon, 19 Aug 2019 10:06:58 +0200 Subject: [PATCH 11/16] fix for potential resource leak fix for potential memory leak, where pointer memory allocated and stored in a11y_bus_address property could be overwritten without releasing. Change-Id: I0835ec807c96192cc011374b81e2eb14bc910c58 --- bus/at-spi-bus-launcher.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index 65bb0b1..b15345b 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -393,6 +393,7 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) app->state = A11Y_BUS_STATE_RUNNING; /* Trim the trailing newline */ + if (app->a11y_bus_address) g_free(app->a11y_bus_address); app->a11y_bus_address = g_strchomp (g_strdup (addr_buf)); LOGD("a11y bus address: %s", app->a11y_bus_address); -- 2.7.4 From 31234e0be7d17d03895879a36ce17be814b81257 Mon Sep 17 00:00:00 2001 From: Jongmin Lee Date: Mon, 7 Oct 2019 17:36:29 +0900 Subject: [PATCH 12/16] Resolve the possible use of negative value (detected by coverity tool) Change-Id: Ibb68f024ef14a0beb10d2bc63ff28fe03d55762f --- bus/at-spi-bus-launcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index b15345b..91bdd48 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -400,8 +400,8 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) return TRUE; error: - close (app->pipefd[0]); - close (app->pipefd[1]); + if (app->pipefd[0] > 0) close (app->pipefd[0]); + if (app->pipefd[1] > 0) close (app->pipefd[1]); app->state = A11Y_BUS_STATE_ERROR; return FALSE; -- 2.7.4 From c2b7a29219b5d36c629deaca6e1ffdc1db6ecb68 Mon Sep 17 00:00:00 2001 From: Maria Bialota Date: Wed, 30 Oct 2019 15:49:41 +0100 Subject: [PATCH 13/16] Apply systemd-based dbus activation Change-Id: I3ccf53942b6c49fbe656e2e4387cc681809c2c98 --- bus/org.a11y.Bus.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus/org.a11y.Bus.service.in b/bus/org.a11y.Bus.service.in index 86724da..91e00c3 100644 --- a/bus/org.a11y.Bus.service.in +++ b/bus/org.a11y.Bus.service.in @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.a11y.Bus -Exec=@libexecdir@/at-spi-bus-launcher +Exec=/bin/false SystemdService=at-spi-dbus-bus.service -- 2.7.4 From 3785cfb93aa4a29b70ffdd39686f14d2c8e26b0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Fri, 7 Feb 2020 07:35:42 +0100 Subject: [PATCH 14/16] 2.34.0 Change-Id: I514111ff14f955ae7cc405bf8ff6298d7e982175 --- AUTHORS | 2 +- COPYING | 224 ++++++++++-------- INSTALL | 28 +-- NEWS | 65 +++++ at-spi2-core.doap | 27 +-- atspi/atspi-accessible-private.h | 13 +- atspi/atspi-accessible.c | 131 +++++++++- atspi/atspi-accessible.h | 16 +- atspi/atspi-action.c | 12 +- atspi/atspi-action.h | 12 +- atspi/atspi-application.c | 12 +- atspi/atspi-application.h | 14 +- atspi/atspi-collection.c | 12 +- atspi/atspi-collection.h | 12 +- atspi/atspi-component.c | 18 +- atspi/atspi-component.h | 12 +- atspi/atspi-constants.h | 25 +- atspi/atspi-device-listener-private.h | 12 +- atspi/atspi-device-listener.c | 12 +- atspi/atspi-device-listener.h | 12 +- atspi/atspi-document.c | 12 +- atspi/atspi-document.h | 12 +- atspi/atspi-editabletext.c | 16 +- atspi/atspi-editabletext.h | 12 +- atspi/atspi-event-listener-private.h | 12 +- atspi/atspi-event-listener.c | 83 ++++--- atspi/atspi-event-listener.h | 12 +- atspi/atspi-gmain.c | 2 +- atspi/atspi-gmain.h | 2 +- atspi/atspi-hyperlink.c | 12 +- atspi/atspi-hyperlink.h | 12 +- atspi/atspi-hypertext.c | 12 +- atspi/atspi-hypertext.h | 12 +- atspi/atspi-image.c | 18 +- atspi/atspi-image.h | 12 +- atspi/atspi-matchrule-private.h | 12 +- atspi/atspi-matchrule.c | 12 +- atspi/atspi-matchrule.h | 12 +- atspi/atspi-misc-private.h | 14 +- atspi/atspi-misc.c | 70 +++++- atspi/atspi-misc.h | 12 +- atspi/atspi-mutter-private.h | 36 +++ atspi/atspi-mutter.c | 407 ++++++++++++++++++++++++++++++++ atspi/atspi-object.c | 12 +- atspi/atspi-object.h | 12 +- atspi/atspi-private.h | 13 +- atspi/atspi-registry.c | 53 ++++- atspi/atspi-registry.h | 14 +- atspi/atspi-relation.c | 12 +- atspi/atspi-relation.h | 12 +- atspi/atspi-selection.c | 12 +- atspi/atspi-selection.h | 12 +- atspi/atspi-stateset.c | 12 +- atspi/atspi-stateset.h | 12 +- atspi/atspi-table-cell.c | 20 +- atspi/atspi-table-cell.h | 12 +- atspi/atspi-table.c | 18 +- atspi/atspi-table.h | 12 +- atspi/atspi-text.c | 82 ++++++- atspi/atspi-text.h | 15 +- atspi/atspi-types.h | 13 +- atspi/atspi-value.c | 12 +- atspi/atspi-value.h | 12 +- atspi/atspi.h | 12 +- atspi/atspimarshal.list | 25 ++ atspi/meson.build | 12 +- bus/at-spi-bus-launcher.c | 140 ++++------- bus/meson.build | 1 + dbind/dbind-any.c | 12 +- dbind/dbind-any.h | 12 +- dbind/dbind.c | 12 +- dbind/dbind.h | 12 +- dbind/dbtest.c | 12 +- doc/libatspi/libatspi-sections.txt | 4 + doc/libatspi/tmpl/atspi-accessible.sgml | 10 + idl/accessible.didl | 234 ------------------ idl/action.didl | 60 ----- idl/application.didl | 24 -- idl/cache.didl | 27 --- idl/collection.didl | 69 ------ idl/component.didl | 178 -------------- idl/controller.didl | 97 -------- idl/device.didl | 33 --- idl/document.didl | 25 -- idl/event.didl | 79 ------- idl/hypertext.didl | 82 ------- idl/image.didl | 33 --- idl/listener.didl | 9 - idl/selection.didl | 54 ----- idl/socket.didl | 31 --- idl/table.didl | 186 --------------- idl/text.didl | 311 ------------------------ idl/types.didl | 25 -- idl/value.didl | 15 -- meson.build | 18 +- meson_options.txt | 16 +- registryd/de-marshaller.c | 12 +- registryd/de-marshaller.h | 12 +- registryd/de-types.h | 12 +- registryd/deviceeventcontroller-x11.c | 25 +- registryd/deviceeventcontroller.c | 14 +- registryd/deviceeventcontroller.h | 12 +- registryd/display.c | 12 +- registryd/display.h | 12 +- registryd/event-source.c | 12 +- registryd/event-source.h | 12 +- registryd/keymasks.h | 12 +- registryd/meson.build | 2 +- registryd/paths.h | 12 +- registryd/reentrant-list.c | 12 +- registryd/reentrant-list.h | 12 +- registryd/registry-main.c | 12 +- registryd/registry.c | 12 +- registryd/registry.h | 12 +- xml/Accessible.xml | 2 + xml/Text.xml | 14 ++ 116 files changed, 1662 insertions(+), 2304 deletions(-) create mode 100644 atspi/atspi-mutter-private.h create mode 100644 atspi/atspi-mutter.c create mode 100644 atspi/atspimarshal.list delete mode 100644 idl/accessible.didl delete mode 100644 idl/action.didl delete mode 100644 idl/application.didl delete mode 100644 idl/cache.didl delete mode 100644 idl/collection.didl delete mode 100644 idl/component.didl delete mode 100644 idl/controller.didl delete mode 100644 idl/device.didl delete mode 100644 idl/document.didl delete mode 100644 idl/event.didl delete mode 100644 idl/hypertext.didl delete mode 100644 idl/image.didl delete mode 100644 idl/listener.didl delete mode 100644 idl/selection.didl delete mode 100644 idl/socket.didl delete mode 100644 idl/table.didl delete mode 100644 idl/text.didl delete mode 100644 idl/types.didl delete mode 100644 idl/value.didl diff --git a/AUTHORS b/AUTHORS index 6f89ab4..9f0f539 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,7 +2,7 @@ Authors of AT-SPI D-Bus implementation -------------------------------------- -Mike Gorse +Mike Gorse Mark Doffman diff --git a/COPYING b/COPYING index b8f9ad6..4362b49 100644 --- a/COPYING +++ b/COPYING @@ -1,13 +1,14 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] Preamble @@ -16,97 +17,109 @@ freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs @@ -145,7 +158,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -254,8 +267,8 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or + + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit @@ -282,23 +295,31 @@ of these things: Library will not necessarily be able to recompile the application to use the modified definitions.) - b) Accompany the work with a written offer, valid for at + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. - c) If distribution of the work is made by offering access to copy + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. - d) Verify that the user has already received a copy of these + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. @@ -308,7 +329,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -347,9 +368,9 @@ Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to +You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -390,7 +411,7 @@ excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. +versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. @@ -401,7 +422,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -435,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest @@ -453,19 +474,18 @@ convey the exclusion of warranty; and each file should have at least the Copyright (C) This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307 USA. + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. diff --git a/INSTALL b/INSTALL index 54c3246..c9d569f 100644 --- a/INSTALL +++ b/INSTALL @@ -1,26 +1,26 @@ Install procedure ----------------- - % gzip -cd at-spi-core-2.0.0.tar.gz | tar xvf - # unpack the sources - % cd at-spi-core-2.0.0 # change to the toplevel directory - % ./configure # run the `configure' script - % make # build at-spi-core +tar -xJf at-spi2-core-2.34.0.tar.xz # unpack the sources + % cd at-spi2-core-2.34.0 # change to the toplevel directory +mkdir build # create a build directory +meson .. # configure +ninja # build at-spi2-core [ Become root if necessary ] - % make install # install at-spi-core +ninja install # install at-spi2-core Requirements ------------ - GNU make - GNU autotools - - pkg-config +Packages with local machine architecture: +meson +ninja +pkg-config +gobject-introspection +gtk-doc (for generation of documentation) +Packages with target architecture: glib - dbus - dbus-glib - - X - XEVIE (Reccomended) +libX11, libXtst, libXi (for X11 support) diff --git a/NEWS b/NEWS index 0dd86dc..f18af9a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,68 @@ +What's new in at-spi2-core 2.34.0: + +* Fix a use after free when freeing an event. +* Clean up handling of the X11 property specifying the bus address (#18). +* Update doap. + +What's new in at-spi2-core 2.33.92: + +* Now requires meson 0.50.0. +* License is now LGPL-2.1+. +* Meson: only link to libdl when it is necessary. +* Update installation instructions. +* Clarify atspi_editable_text_insert_text documentation. +* Do not warn on no reply from pending get_items call. +* Eliminate some superfluous runtime warnings. + +What's new in at-spi2-core 2.33.90: + +* Refactor the API for the screen reader to notify listeners of its status. + +* Add a sender to the AtspiEvent struct. + +* Add missing atspi_application_get_type prototype. + +* Support mutter remote desktop interface for synthesizing keyboard/mouse + events (likely still needs work). + +What's new in at-spi2-core 2.33.2: + +* Check WAYLAND_DISPLAY, rather than XDG_SESSION_TYPE, to avoid X + connections. Fixes breakage if X is started with startx and + XDG_SESSION_TYPE is unset. + +* X11: also try mod4 and mod5 to generate keysyms. + +* Add ATSPI_ROLE_CONTENT_DELETION and ATSPI_ROLE_CONTENT_INSERTION. + +* Check for dbus-daemon in /usr/lib (for Solaris). + +What's new in at-spi2-core 2.33.1: + +* Fix meson build for meson 0.50.0. + +* Add atspi_accessible_get_accessible_id. + +* Add atspi_text_notify_reading_position. + +* Check for an actual X11 session before calling X. This will be needed + for Mutter in the future because checking $DISPLAY is not sufficient, + and xwyland could be automatically started when it isn't wanted. + +What's new in at-spi2-core 2.31.92: + +* Fix atspi_table_cell_get_(row_column)_header_cells. + +* Update documentation to indicate that extents are only meaningful + when an object has both STATE_VISIBLE and STATE_SHOWING. + +* Use a consistent style for the meson options. + +* Fix a compiler warning on BSD. + + +* Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces. + What's new in at-spi2-core 2.31.1: * Bus launcher: fix an issue where the error wasn't cleared on failure. diff --git a/at-spi2-core.doap b/at-spi2-core.doap index 1ac8f84..85d64df 100644 --- a/at-spi2-core.doap +++ b/at-spi2-core.doap @@ -5,31 +5,28 @@ xmlns="http://usefulinc.com/ns/doap#"> at-spi2-core - D-Bus accessibility specifications and registration daemon + D-Bus accessibility specifications, library, and registration daemon + The Access Technology Service Provider Interface +(AT-SPI) is a set of interfaces that allow access technologies such as screen +readers to programmatically determine what is being displayed on the screen and +simulate keyboard and mouse events. It can also be used for automated testing. + +The at-spi2-core module contains the D-Bus specification, the registry daemon, +and a C library for use by access technologies that provides a convenient +wrapper around the DBus interfaces. + + + C - Mark Doffman - - markdoffman - - - - Mike Gorse mgorse - - - Li Yuan - - liyuan - - diff --git a/atspi/atspi-accessible-private.h b/atspi/atspi-accessible-private.h index 496f7d7..e7e748b 100644 --- a/atspi/atspi-accessible-private.h +++ b/atspi/atspi-accessible-private.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_ACCESSIBLE_PRIVATE_H_ @@ -29,6 +29,7 @@ G_BEGIN_DECLS #include "atspi-accessible.h" +#include "atspimarshal.h" struct _AtspiAccessiblePrivate { diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c index e7f1446..fd6737d 100644 --- a/atspi/atspi-accessible.c +++ b/atspi/atspi-accessible.c @@ -7,28 +7,82 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" #include "atspi-accessible-private.h" #include +enum { + REGION_CHANGED, + LAST_SIGNAL +}; + static gboolean enable_caching = FALSE; static guint quark_locale; +static guint atspi_accessible_signals[LAST_SIGNAL] = { 0, }; + +static gboolean +screen_reader_signal_watcher (GSignalInvocationHint *signal_hint, + guint n_param_values, + const GValue *param_values, + gpointer data) +{ + GObject *object; + AtspiAccessible *accessible; + GSignalQuery signal_query; + const char *name; + DBusMessage *signal; + DBusMessageIter iter, iter_struct, iter_variant, iter_array; + dbus_int32_t detail1, detail2; + const char *detail = ""; + + object = g_value_get_object (param_values + 0); + g_return_val_if_fail (ATSPI_IS_ACCESSIBLE(object), FALSE); + + g_signal_query (signal_hint->signal_id, &signal_query); + name = signal_query.signal_name; + detail1 = g_value_get_int (param_values + 1); + detail2 = g_value_get_int (param_values + 2); + accessible = ATSPI_ACCESSIBLE (object); + + signal = dbus_message_new_signal (ATSPI_DBUS_PATH_SCREEN_READER, + ATSPI_DBUS_INTERFACE_EVENT_SCREEN_READER, + "RegionChanged"); + dbus_message_iter_init_append (signal, &iter); + dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &detail); + dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &detail1); + dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &detail2); + dbus_message_iter_open_container (&iter, DBUS_TYPE_VARIANT, "(so)", + &iter_variant); + dbus_message_iter_open_container (&iter_variant, DBUS_TYPE_STRUCT, NULL, + &iter_struct); + dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_STRING, &accessible->parent.app->bus_name); + dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &accessible->parent.path); + dbus_message_iter_close_container (&iter_variant, &iter_struct); + dbus_message_iter_close_container (&iter, &iter_variant); + dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{sv}", + &iter_array); + dbus_message_iter_close_container (&iter, &iter_array); + dbus_connection_send (_atspi_bus (), signal, NULL); + dbus_message_unref (signal); + return TRUE; +} + static void atspi_action_interface_init (AtspiAction *action) { @@ -109,6 +163,13 @@ static gint accessible_count = 0; #endif static void +atspi_accessible_unref (GObject *accessible) +{ + if (accessible != NULL) + g_object_unref(accessible); +} + +static void atspi_accessible_init (AtspiAccessible *accessible) { #ifdef DEBUG_REF_COUNTS @@ -119,7 +180,7 @@ atspi_accessible_init (AtspiAccessible *accessible) accessible->priv = atspi_accessible_get_instance_private (accessible); - accessible->children = g_ptr_array_new_with_free_func (g_object_unref); + accessible->children = g_ptr_array_new_with_free_func (atspi_accessible_unref); } static void @@ -189,6 +250,8 @@ atspi_accessible_finalize (GObject *object) #endif G_OBJECT_CLASS (atspi_accessible_parent_class)->finalize (object); + + /* TODO: remove emission hook */ } static void @@ -200,6 +263,33 @@ atspi_accessible_class_init (AtspiAccessibleClass *klass) object_class->finalize = atspi_accessible_finalize; quark_locale = g_quark_from_string ("accessible-locale"); + + /** + * AtspiAccessible::region-changed: + * @atspiaccessible: the object which received the signal + * @arg1: an integer specifying the current offset of the text being read, + * if the object is textual. + * @arg2: an integer specifying the ending offset of the text being read, + * if the object is textual. + * + * The signal "region-changed" is emitted by a screen reader to indicate + * that it is now reading or tracking a new object, or, a new piece of + * text within an object. This allows a magnifier to gain the information + * needed to highlight the object that the screen reader is reading. + */ + atspi_accessible_signals[REGION_CHANGED] = + g_signal_new ("region_changed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (AtspiAccessibleClass, region_changed), + NULL, NULL, + atspi_marshal_VOID__INT_INT, + G_TYPE_NONE, + 2, G_TYPE_INT, G_TYPE_INT); + + g_signal_add_emission_hook (atspi_accessible_signals[REGION_CHANGED], 0, + screen_reader_signal_watcher, NULL, + (GDestroyNotify) NULL); } /** @@ -1767,6 +1857,33 @@ atspi_accessible_get_object_locale (AtspiAccessible *accessible, GError **error) return locale; } +/** + * atspi_accessible_get_accessible_id: + * @obj: an #AtspiAccessible + * + * Gets the accessible id of the accessible. This is not meant to be presented + * to the user, but to be an id which is stable over application development. + * Typically, this is the gtkbuilder id. + * + * Since: 2.34 + * + * Returns: a character string representing the accessible id of the + * #AtspiAccessible object or NULL on exception. + **/ +gchar* +atspi_accessible_get_accessible_id (AtspiAccessible *obj, GError **error) +{ + gchar *accessible_id; + + g_return_val_if_fail (obj != NULL, NULL); + + if (!_atspi_dbus_get_property (obj, atspi_interface_accessible, + "AccessibleId", error, "s", &accessible_id)) + return NULL; + + return accessible_id; +} + void free_value (gpointer data) { diff --git a/atspi/atspi-accessible.h b/atspi/atspi-accessible.h index 443e395..13e4962 100644 --- a/atspi/atspi-accessible.h +++ b/atspi/atspi-accessible.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_ACCESSIBLE_H_ @@ -64,6 +64,8 @@ typedef struct _AtspiAccessibleClass AtspiAccessibleClass; struct _AtspiAccessibleClass { AtspiObjectClass parent_class; + + void (*region_changed) (AtspiAccessible *accessible, gint current_offset, gint last_offset); }; GType atspi_accessible_get_type (void); @@ -167,6 +169,8 @@ void atspi_accessible_clear_cache (AtspiAccessible *obj); guint atspi_accessible_get_process_id (AtspiAccessible *accessible, GError **error); +gchar * atspi_accessible_get_accessible_id (AtspiAccessible *obj, GError **error); + /* private */ void _atspi_accessible_add_cache (AtspiAccessible *accessible, AtspiCache flag); AtspiCache _atspi_accessible_get_cache_mask (AtspiAccessible *accessible); diff --git a/atspi/atspi-action.c b/atspi/atspi-action.c index 731773a..bc9cb7b 100644 --- a/atspi/atspi-action.c +++ b/atspi/atspi-action.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-action.h b/atspi/atspi-action.h index 99de8af..e1056e7 100644 --- a/atspi/atspi-action.h +++ b/atspi/atspi-action.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_ACTION_H_ diff --git a/atspi/atspi-application.c b/atspi/atspi-application.c index f7dd225..cccaf86 100644 --- a/atspi/atspi-application.c +++ b/atspi/atspi-application.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-application.h b/atspi/atspi-application.h index a3826d5..0662031 100644 --- a/atspi/atspi-application.h +++ b/atspi/atspi-application.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_APPLICATION_H_ @@ -64,6 +64,8 @@ struct _AtspiApplicationClass AtspiApplication * _atspi_application_new (const char *bus_name); +GType atspi_application_get_type (void); + G_END_DECLS #endif /* _ATSPI_APPLICATION_H_ */ diff --git a/atspi/atspi-collection.c b/atspi/atspi-collection.c index d3f27da..d4d1537 100644 --- a/atspi/atspi-collection.c +++ b/atspi/atspi-collection.c @@ -6,19 +6,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-collection.h b/atspi/atspi-collection.h index 2ba9361..9b564c5 100644 --- a/atspi/atspi-collection.h +++ b/atspi/atspi-collection.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_COLLECTION_H_ diff --git a/atspi/atspi-component.c b/atspi/atspi-component.c index ed22582..59879bb 100644 --- a/atspi/atspi-component.c +++ b/atspi/atspi-component.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* @@ -129,6 +129,8 @@ atspi_component_get_accessible_at_point (AtspiComponent *obj, * (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). * * Gets the bounding box of the specified #AtspiComponent. + * The returned values are meaningful only if the Component has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: An #AtspiRect giving the accessible's extents. **/ @@ -164,6 +166,8 @@ atspi_component_get_extents (AtspiComponent *obj, * (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). * * Gets the minimum x and y coordinates of the specified #AtspiComponent. + * The returned values are meaningful only if the Component has both + * STATE_VISIBLE and STATE_SHOWING. * * returns: An #AtspiPoint giving the @obj's position. **/ @@ -192,6 +196,8 @@ atspi_component_get_position (AtspiComponent *obj, * @obj: a pointer to the #AtspiComponent to query. * * Gets the size of the specified #AtspiComponent. + * The returned values are meaningful only if the Component has both + * STATE_VISIBLE and STATE_SHOWING. * * returns: An #AtspiPoint giving the @obj's size. **/ diff --git a/atspi/atspi-component.h b/atspi/atspi-component.h index c84232d..4e8f0ad 100644 --- a/atspi/atspi-component.h +++ b/atspi/atspi-component.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_COMPONENT_H_ diff --git a/atspi/atspi-constants.h b/atspi/atspi-constants.h index b9f41ef..8657ead 100644 --- a/atspi/atspi-constants.h +++ b/atspi/atspi-constants.h @@ -6,19 +6,19 @@ * Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* TODO: Auto-generate this file again @@ -1234,6 +1234,12 @@ typedef enum { * @ATSPI_ROLE_DESCRIPTION_VALUE: An object that represents the description, * definition, or value of a term. @Since: 2.26. * @ATSPI_ROLE_FOOTNOTE: An object that contains the text of a footnote. @Since: 2.26. + * @ATSPI_ROLE_CONTENT_DELETION: Content previously deleted or proposed to be + * deleted, e.g. in revision history or a content view providing suggestions + * from reviewers. @Since: 2.34. + * @ATSPI_ROLE_CONTENT_INSERTION: Content previously inserted or proposed to be + * inserted, e.g. in revision history or a content view providing suggestions + * from reviewers. @Since: 2.34. * @ATSPI_ROLE_LAST_DEFINED: Not a valid role, used for finding end of * enumeration. * @@ -1367,6 +1373,8 @@ typedef enum { ATSPI_ROLE_DESCRIPTION_TERM, ATSPI_ROLE_DESCRIPTION_VALUE, ATSPI_ROLE_FOOTNOTE, + ATSPI_ROLE_CONTENT_DELETION, + ATSPI_ROLE_CONTENT_INSERTION, ATSPI_ROLE_LAST_DEFINED, } AtspiRole; @@ -1375,7 +1383,7 @@ typedef enum { * * One higher than the highest valid value of #AtspiRole. */ -#define ATSPI_ROLE_COUNT (125+1) +#define ATSPI_ROLE_COUNT (127+1) typedef enum { @@ -1462,6 +1470,9 @@ typedef enum { #define ATSPI_DBUS_INTERFACE_VALUE "org.a11y.atspi.Value" #define ATSPI_DBUS_INTERFACE_SOCKET "org.a11y.atspi.Socket" +#define ATSPI_DBUS_PATH_SCREEN_READER "/org/a11y/atspi/screenreader" +#define ATSPI_DBUS_INTERFACE_EVENT_SCREEN_READER "org.a11y.atspi.Event.ScreenReader" + #ifdef __cplusplus } #endif diff --git a/atspi/atspi-device-listener-private.h b/atspi/atspi-device-listener-private.h index 1089e45..d8b533c 100644 --- a/atspi/atspi-device-listener-private.h +++ b/atspi/atspi-device-listener-private.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_DEVICE_LISTENER_PRIVATE_H_ diff --git a/atspi/atspi-device-listener.c b/atspi/atspi-device-listener.c index 56597f7..8e04c41 100644 --- a/atspi/atspi-device-listener.c +++ b/atspi/atspi-device-listener.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-device-listener.h b/atspi/atspi-device-listener.h index 3b1b96d..d91a203 100644 --- a/atspi/atspi-device-listener.h +++ b/atspi/atspi-device-listener.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_DEVICE_LISTENER_H_ diff --git a/atspi/atspi-document.c b/atspi/atspi-document.c index 98dfc4f..a92c0e2 100644 --- a/atspi/atspi-document.c +++ b/atspi/atspi-document.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-document.h b/atspi/atspi-document.h index f326d89..429b8c6 100644 --- a/atspi/atspi-document.h +++ b/atspi/atspi-document.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_DOCUMENT_H_ diff --git a/atspi/atspi-editabletext.c b/atspi/atspi-editabletext.c index 58ac715..350617e 100644 --- a/atspi/atspi-editabletext.c +++ b/atspi/atspi-editabletext.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" @@ -86,8 +86,8 @@ atspi_editable_text_set_text_contents (AtspiEditableText *obj, * @position: a #gint indicating the character offset at which to insert * the new text. * @text: a string representing the text to insert, in UTF-8 encoding. - * @length: the number of characters of text to insert. If the character - * count of text is less than or equal to length, the entire contents + * @length: the number of characters of text to insert, in bytes. If the + * byte count of text is less than or equal to length, the entire contents * of text will be inserted. * * Inserts text into an #AtspiEditableText object. diff --git a/atspi/atspi-editabletext.h b/atspi/atspi-editabletext.h index 59b2331..efa5630 100644 --- a/atspi/atspi-editabletext.h +++ b/atspi/atspi-editabletext.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_EDITABLE_TEXT_H_ diff --git a/atspi/atspi-event-listener-private.h b/atspi/atspi-event-listener-private.h index 260db74..5a1a872 100644 --- a/atspi/atspi-event-listener-private.h +++ b/atspi/atspi-event-listener-private.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_EVENT_LISTENER_PRIVATE_H_ diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c index 6a3fe6b..249890b 100644 --- a/atspi/atspi-event-listener.c +++ b/atspi/atspi-event-listener.c @@ -7,24 +7,25 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" #include "atspi-accessible-private.h" #include +#include #include typedef struct @@ -169,12 +170,15 @@ static GList *event_listeners = NULL; static gchar * convert_name_from_dbus (const char *name, gboolean path_hack) { - gchar *ret = g_malloc (g_utf8_strlen (name, -1) * 2 + 1); + gchar *ret; const char *p = name; - gchar *q = ret; + gchar *q; - if (!ret) - return NULL; + if (!name) + return g_strdup (""); + + ret = g_malloc (g_utf8_strlen (name, -1) * 2 + 1); + q = ret; while (*p) { @@ -378,14 +382,14 @@ convert_event_type_to_dbus (const char *eventType, char **categoryp, char **name if (matchrule_array) { gchar *matchrule; + (*matchrule_array) = g_ptr_array_new (); matchrule = g_strdup_printf ("type='signal',interface='org.a11y.atspi.Event.%s'", category); if (name && name [0]) { - gchar *new_str = g_strconcat (matchrule, ",member='", name, "'", NULL); - g_free (matchrule); - matchrule = new_str; + gchar *new_str = g_strconcat (matchrule, ",member='", name, "'", NULL); + g_free (matchrule); + matchrule = new_str; } - (*matchrule_array) = g_ptr_array_new (); if (detail && detail [0]) { gchar *new_str = g_strconcat (matchrule, ",arg0='", detail, "'", NULL); @@ -467,6 +471,9 @@ listener_entry_free (EventListenerEntry *e) * object:model-changed * object:active-descendant-changed * + * (screen reader events) +* screen-reader:region-changed + * * (window events) * * window:minimize @@ -506,6 +513,9 @@ listener_entry_free (EventListenerEntry *e) * In general, listening to * toolkit-specific events is not recommended. * + * Currently, object:text-reading-position needs to be specified explicitly + * (it is not implied by object:text), since it is generated by the screen + * reader and is thus a special case internally. * * Returns: #TRUE if successful, otherwise #FALSE. **/ @@ -872,6 +882,7 @@ atspi_event_copy (AtspiEvent *src) dst->detail2 = src->detail2; g_value_init (&dst->any_data, G_VALUE_TYPE (&src->any_data)); g_value_copy (&src->any_data, &dst->any_data); + dst->sender = g_object_ref (src->sender); return dst; } @@ -881,6 +892,7 @@ atspi_event_free (AtspiEvent *event) g_object_unref (event->source); g_free (event->type); g_value_unset (&event->any_data); + g_object_unref (event->sender); g_free (event); } @@ -951,6 +963,7 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) { char *detail = NULL; const char *category = dbus_message_get_interface (message); + const char *sender = dbus_message_get_sender (message); const char *member = dbus_message_get_member (message); const char *signature = dbus_message_get_signature (message); gchar *name; @@ -965,7 +978,7 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) if (strcmp (signature, "siiv(so)") != 0 && strcmp (signature, "siiva{sv}") != 0) { - g_warning ("Got invalid signature %s for signal %s from interface %s\n", signature, member, category); + g_warning ("Got invalid signature %s for signal %s from interface %s\n", signature, member, category); return DBUS_HANDLER_RESULT_HANDLED; } @@ -1014,14 +1027,17 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) converted_type = p; } e.type = converted_type; - e.source = _atspi_ref_accessible (dbus_message_get_sender(message), dbus_message_get_path(message)); - if (e.source == NULL) + if (strcmp (category, "ScreenReader") != 0) { - g_warning ("Got no valid source accessible for signal for signal %s from interface %s\n", member, category); - g_free (converted_type); - g_free (name); - g_free (detail); - return DBUS_HANDLER_RESULT_HANDLED; + e.source = _atspi_ref_accessible (sender, dbus_message_get_path (message)); + if (e.source == NULL) + { + g_warning ("Got no valid source accessible for signal %s from interface %s\n", member, category); + g_free (converted_type); + g_free (name); + g_free (detail); + return DBUS_HANDLER_RESULT_HANDLED; + } } dbus_message_iter_recurse (&iter, &iter_variant); @@ -1032,17 +1048,24 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) AtspiRect rect; if (demarshal_rect (&iter_variant, &rect)) { - g_value_init (&e.any_data, ATSPI_TYPE_RECT); - g_value_set_boxed (&e.any_data, &rect); + g_value_init (&e.any_data, ATSPI_TYPE_RECT); + g_value_set_boxed (&e.any_data, &rect); } else { AtspiAccessible *accessible; - accessible = _atspi_dbus_return_accessible_from_iter (&iter_variant); - g_value_init (&e.any_data, ATSPI_TYPE_ACCESSIBLE); - g_value_set_instance (&e.any_data, accessible); - if (accessible) - g_object_unref (accessible); /* value now owns it */ + accessible = _atspi_dbus_return_accessible_from_iter (&iter_variant); + if (!strcmp (category, "ScreenReader")) + { + e.source = accessible; + } + else + { + g_value_init (&e.any_data, ATSPI_TYPE_ACCESSIBLE); + g_value_set_instance (&e.any_data, accessible); + if (accessible) + g_object_unref (accessible); /* value now owns it */ + } } break; } @@ -1064,6 +1087,8 @@ _atspi_dbus_handle_event (DBusConnection *bus, DBusMessage *message, void *data) cache = _atspi_dbus_update_cache_from_dict (e.source, &iter); } + e.sender = _atspi_ref_accessible (sender, ATSPI_DBUS_PATH_ROOT); + if (!strncmp (e.type, "object:children-changed", 23)) { cache_process_children_changed (&e); diff --git a/atspi/atspi-event-listener.h b/atspi/atspi-event-listener.h index ee52fac..b7ad327 100644 --- a/atspi/atspi-event-listener.h +++ b/atspi/atspi-event-listener.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_EVENT_LISTENER_H_ diff --git a/atspi/atspi-gmain.c b/atspi/atspi-gmain.c index 588a60d..8d74442 100644 --- a/atspi/atspi-gmain.c +++ b/atspi/atspi-gmain.c @@ -8,7 +8,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/atspi/atspi-gmain.h b/atspi/atspi-gmain.h index 8e2396c..9efbe5e 100644 --- a/atspi/atspi-gmain.h +++ b/atspi/atspi-gmain.h @@ -5,7 +5,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, diff --git a/atspi/atspi-hyperlink.c b/atspi/atspi-hyperlink.c index 80f8a54..c01f547 100644 --- a/atspi/atspi-hyperlink.c +++ b/atspi/atspi-hyperlink.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-hyperlink.h b/atspi/atspi-hyperlink.h index 86efa7b..7caea90 100644 --- a/atspi/atspi-hyperlink.h +++ b/atspi/atspi-hyperlink.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_HYPERLINK_H_ diff --git a/atspi/atspi-hypertext.c b/atspi/atspi-hypertext.c index ca186ea..7ddaab6 100644 --- a/atspi/atspi-hypertext.c +++ b/atspi/atspi-hypertext.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-hypertext.h b/atspi/atspi-hypertext.h index bebcf51..891fd3a 100644 --- a/atspi/atspi-hypertext.h +++ b/atspi/atspi-hypertext.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_HYPERTEXT_H_ diff --git a/atspi/atspi-image.c b/atspi/atspi-image.c index 4f17326..4fd5ae7 100644 --- a/atspi/atspi-image.c +++ b/atspi/atspi-image.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" @@ -49,6 +49,8 @@ atspi_image_get_image_description (AtspiImage *obj, GError **error) * @obj: a pointer to the #AtspiImage to query. * * Gets the size of the image displayed in a specified #AtspiImage object. + * The returned values are meaningful only if the Image has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a pointer to an #AtspiPoint where x corresponds to * the image's width and y corresponds to the image's height. @@ -78,6 +80,8 @@ atspi_image_get_image_size (AtspiImage *obj, GError **error) * * Gets the minimum x and y coordinates of the image displayed in a * specified #AtspiImage implementor. + * The returned values are meaningful only if the Image has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a pointer to an #AtspiPoint where x and y correspond to the * minimum coordinates of the displayed image. @@ -112,6 +116,8 @@ atspi_image_get_image_position (AtspiImage *obj, * * Gets the bounding box of the image displayed in a * specified #AtspiImage implementor. + * The returned values are meaningful only if the Image has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a pointer to an #AtspiRect corresponding to the image's bounding box. The minimum x and y coordinates, * width, and height are specified. diff --git a/atspi/atspi-image.h b/atspi/atspi-image.h index 3fa40ef..57fe3a1 100644 --- a/atspi/atspi-image.h +++ b/atspi/atspi-image.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_IMAGE_H_ diff --git a/atspi/atspi-matchrule-private.h b/atspi/atspi-matchrule-private.h index e55c2fa..a8b579a 100644 --- a/atspi/atspi-matchrule-private.h +++ b/atspi/atspi-matchrule-private.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_MATCH_RULE_PRIVATE_H_ diff --git a/atspi/atspi-matchrule.c b/atspi/atspi-matchrule.c index cf6a306..6fb4210 100644 --- a/atspi/atspi-matchrule.c +++ b/atspi/atspi-matchrule.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-matchrule.h b/atspi/atspi-matchrule.h index 0a006d0..ddcb0d6 100644 --- a/atspi/atspi-matchrule.h +++ b/atspi/atspi-matchrule.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_MATCH_RULE_H_ diff --git a/atspi/atspi-misc-private.h b/atspi/atspi-misc-private.h index 314746e..f0b5adb 100644 --- a/atspi/atspi-misc-private.h +++ b/atspi/atspi-misc-private.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_MISC_PRIVATE_H_ @@ -166,6 +166,8 @@ gboolean _atspi_get_allow_sync (); gboolean _atspi_set_allow_sync (gboolean val); void _atspi_set_error_no_sync (GError **error); + +gboolean _atspi_prepare_screen_reader_interface (); G_END_DECLS #endif /* _ATSPI_MISC_PRIVATE_H_ */ diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c index 9b97b18..9e8595a 100644 --- a/atspi/atspi-misc.c +++ b/atspi/atspi-misc.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* @@ -159,7 +159,8 @@ cleanup () for (i = desktop->children->len - 1; i >= 0; i--) { AtspiAccessible *child = g_ptr_array_index (desktop->children, i); - g_object_run_dispose (G_OBJECT (child->parent.app)); + if (child->parent.app) + g_object_run_dispose (G_OBJECT (child->parent.app)); g_object_run_dispose (G_OBJECT (child)); } @@ -531,8 +532,9 @@ handle_get_items (DBusPendingCall *pending, void *user_data) { const char *sender = dbus_message_get_sender (reply); const char *error = NULL; - if (!strcmp (dbus_message_get_error_name (reply), - DBUS_ERROR_SERVICE_UNKNOWN)) + const char *error_name = dbus_message_get_error_name (reply); + if (!strcmp (error_name, DBUS_ERROR_SERVICE_UNKNOWN) + || !strcmp (error_name, DBUS_ERROR_NO_REPLY)) { } else @@ -1590,7 +1592,8 @@ atspi_get_a11y_bus (void) if (address_env != NULL && *address_env != 0) address = g_strdup (address_env); #ifdef HAVE_X11 - if (!address) + if (!address && g_getenv ("DISPLAY") != NULL && + g_getenv ("WAYLAND_DISPLAY") == NULL) address = get_accessibility_bus_address_x11 (); #endif if (!address) @@ -1849,3 +1852,50 @@ _atspi_set_error_no_sync (GError **error) g_set_error_literal (error, ATSPI_ERROR, ATSPI_ERROR_SYNC_NOT_ALLOWED, _("Attempted synchronous call where prohibited")); } + +static const char *sr_introspection = "\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +""; + +static DBusHandlerResult +screen_reader_filter (DBusConnection *bus, DBusMessage *message, void *user_data) +{ + if (dbus_message_is_method_call (message, DBUS_INTERFACE_INTROSPECTABLE, + "Introspect")) + { + DBusMessage *reply = dbus_message_new_method_return (message); + dbus_message_append_args (reply, DBUS_TYPE_STRING, &sr_introspection, + DBUS_TYPE_INVALID); + dbus_connection_send (bus, reply, NULL); + dbus_message_unref (reply); + return DBUS_HANDLER_RESULT_HANDLED; + } + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +gboolean +_atspi_prepare_screen_reader_interface () +{ + static gint initialized = 0; + DBusConnection *a11y_bus = _atspi_bus (); + + if (initialized) + return (initialized > 0); + + if (dbus_bus_request_name (a11y_bus, "org.a11y.Atspi.ScreenReader", 0, NULL) < 0) + { + initialized = -1; + return FALSE; + } + + initialized = 1; + dbus_connection_add_filter (a11y_bus, screen_reader_filter, NULL, NULL); + return TRUE; +} diff --git a/atspi/atspi-misc.h b/atspi/atspi-misc.h index f13596f..0461728 100644 --- a/atspi/atspi-misc.h +++ b/atspi/atspi-misc.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_MISC_H_ diff --git a/atspi/atspi-mutter-private.h b/atspi/atspi-mutter-private.h new file mode 100644 index 0000000..49140d0 --- /dev/null +++ b/atspi/atspi-mutter-private.h @@ -0,0 +1,36 @@ +/* + * AT-SPI - Assistive Technology Service Provider Interface + * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) + * + * Copyright 2019 SUSE LLC. + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef _ATSPI_MUTTER_H_ +#define _ATSPI_MUTTER_H_ + +G_BEGIN_DECLS + +gboolean _atspi_mutter_generate_keyboard_event (glong keyval, const gchar *keystring, AtspiKeySynthType synth_type, GError **error); + +gboolean _atspi_mutter_generate_mouse_event (glong x, glong y, const gchar *name, GError **error); + +void _atspi_mutter_set_reference_window (AtspiAccessible *accessible); +G_END_DECLS + +#endif /* _ATSPI_MUTTER_H_ */ diff --git a/atspi/atspi-mutter.c b/atspi/atspi-mutter.c new file mode 100644 index 0000000..4445c18 --- /dev/null +++ b/atspi/atspi-mutter.c @@ -0,0 +1,407 @@ +/* + * AT-SPI - Assistive Technology Service Provider Interface + * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) + * + * Copyright 2019 SUSE LLC. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/* atspi-mutter.c: support for keyboard/mouse handling using the + * mutter/gnome-shell remote desktop interfaces + * + * This functionality is analogous to the X11-based code in + * device-event-controller-x11.c. Placing the code here, rather than in the + * registry daemon, allows the relevant dbus calls to come directly from the + * AT-SPI client, rather than at-spi2-registryd being an intermediary, + * which may be useful if a distribution wishes to lock down access to the + * remote desktop interfaces. + */ + +#include "atspi-private.h" + +typedef struct +{ + DBusConnection *bus; + const char *rd_session_id; + const char *rd_session_path; + const char *sc_session_id; + const char *sc_session_path; + const char *sc_stream_path; + dbus_uint64_t window_id; + gboolean window_id_is_explicit; +} ATSPI_MUTTER_DATA; + +static ATSPI_MUTTER_DATA data; + +#define MUTTER_REMOTE_DESKTOP_BUS_NAME "org.gnome.Mutter.RemoteDesktop" +#define MUTTER_REMOTE_DESKTOP_OBJECT_PATH "/org/gnome/Mutter/RemoteDesktop" +#define MUTTER_REMOTE_DESKTOP_INTERFACE "org.gnome.Mutter.RemoteDesktop" +#define MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE "org.gnome.Mutter.RemoteDesktop.Session" +#define MUTTER_SCREEN_CAST_BUS_NAME "org.gnome.Mutter.ScreenCast" +#define MUTTER_SCREEN_CAST_OBJECT_PATH "/org/gnome/Mutter/ScreenCast" +#define MUTTER_SCREEN_CAST_INTERFACE "org.gnome.Mutter.ScreenCast" +#define MUTTER_SCREEN_CAST_SESSION_INTERFACE "org.gnome.Mutter.ScreenCast.Session" + +/* TODO: consider porting this to gdbus */ + +static void +ensure_bus () +{ + if (data.bus) + return; + data.bus = dbus_bus_get (DBUS_BUS_SESSION, NULL); +} + +static gboolean +ensure_rd_session_path (GError **error) +{ + char *session_path; + DBusError d_error; + + if (data.rd_session_path) + return (data.rd_session_path[0] != '\0'); + ensure_bus (); + + dbus_error_init (&d_error); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, MUTTER_REMOTE_DESKTOP_OBJECT_PATH, MUTTER_REMOTE_DESKTOP_INTERFACE, "CreateSession", &d_error, "=>o", &session_path); + + data.rd_session_path = g_strdup (session_path); + if (!data.rd_session_path[0]) + return FALSE; + + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "Start", &d_error, ""); + return TRUE; +} + +static dbus_uint64_t +get_window_id (const char *name) +{ + DBusMessage *message, *reply; + DBusError d_error; + dbus_uint64_t window_id; + DBusMessageIter iter, iter_array, iter_dict, iter_sub_array, iter_sub_dict; + const char *prop_name; + const char *cur_name; + dbus_bool_t cur_focus; + gboolean have_focus; + + dbus_error_init (&d_error); + message = dbus_message_new_method_call (MUTTER_REMOTE_DESKTOP_BUS_NAME, "/org/gnome/Shell/Introspect", "org.gnome.Shell.Introspect", "GetWindows"); + reply = dbus_connection_send_with_reply_and_block (data.bus, message, -1, &d_error); + dbus_message_unref (message); + + if (!reply) + return FALSE; + if (strcmp (dbus_message_get_signature (reply), "a{ta{sv}}") != 0) + { + dbus_message_unref (reply); + return FALSE; + } + + dbus_message_iter_init (reply, &iter); + dbus_message_iter_recurse (&iter, &iter_array); + while (dbus_message_iter_get_arg_type (&iter_array) != DBUS_TYPE_INVALID) + { + dbus_message_iter_recurse (&iter_array, &iter_dict); + dbus_message_iter_get_basic (&iter_dict, &window_id); + dbus_message_iter_next (&iter_dict); + dbus_message_iter_recurse (&iter_dict, &iter_sub_array); + cur_name = NULL; + have_focus = FALSE; + while (dbus_message_iter_get_arg_type (&iter_sub_array) != DBUS_TYPE_INVALID) + { + dbus_message_iter_recurse (&iter_sub_array, &iter_sub_dict); + dbus_message_iter_get_basic (&iter_sub_dict, &prop_name); + if (!strcmp (prop_name, "wm-class")) + { + DBusMessageIter iter_variant; + dbus_message_iter_next (&iter_sub_dict); + dbus_message_iter_recurse (&iter_sub_dict, &iter_variant); + dbus_message_iter_get_basic (&iter_variant, &cur_name); + } + if (!strcmp (prop_name, "has-focus")) + { + DBusMessageIter iter_variant; + dbus_message_iter_next (&iter_sub_dict); + dbus_message_iter_recurse (&iter_sub_dict, &iter_variant); + dbus_message_iter_get_basic (&iter_variant, &cur_focus); + have_focus = TRUE; + } + if (cur_name && have_focus) + { + if ((name && !strcmp (name, cur_name)) || cur_focus) + { + dbus_message_unref (reply); + return window_id; + } + break; + } + dbus_message_iter_next (&iter_sub_array); + } + dbus_message_iter_next (&iter_array); + } + + dbus_message_unref (reply); + return 0; +} + +static gboolean +ensure_rd_session_id (GError **error) +{ + DBusMessage *message, *reply; + DBusError d_error; + const char *interface = "org.gnome.Mutter.RemoteDesktop.Session"; + const char *prop_name = "SessionId"; + DBusMessageIter iter, iter_variant; + const char *session_id; + + if (data.rd_session_id) + return (data.rd_session_id[0] != '\0'); + + if (!ensure_rd_session_path (error)) + return FALSE; + + message = dbus_message_new_method_call (MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, "org.freedesktop.DBus.Properties", "Get"); + dbus_message_append_args (message, DBUS_TYPE_STRING, &interface, DBUS_TYPE_STRING, &prop_name, DBUS_TYPE_INVALID); + + dbus_error_init (&d_error); + reply = dbus_connection_send_with_reply_and_block (data.bus, message, -1, &d_error); + dbus_message_unref (message); + if (!reply) + return FALSE; + if (strcmp (dbus_message_get_signature (reply), "v") != 0) + { + dbus_message_unref (reply); + return FALSE; + } + dbus_message_iter_init (reply, &iter); + dbus_message_iter_recurse (&iter, &iter_variant); + dbus_message_iter_get_basic (&iter_variant, &session_id); + data.rd_session_id = g_strdup (session_id); + dbus_message_unref (reply); + return TRUE; +} + +static gboolean +ensure_sc_session (GError **error) +{ + DBusMessage *message, *reply; + DBusError d_error; + DBusMessageIter iter, iter_array, iter_dict_entry, iter_variant; + const char *prop_name = "remote-desktop-session-id"; + const char *sc_session_path; + + if (!ensure_rd_session_id (error)) + return FALSE; + + if (data.sc_session_path) + return (data.sc_session_path[0] != '\0'); + + message = dbus_message_new_method_call (MUTTER_SCREEN_CAST_BUS_NAME, MUTTER_SCREEN_CAST_OBJECT_PATH, MUTTER_SCREEN_CAST_INTERFACE, "CreateSession"); + dbus_message_iter_init_append (message, &iter); + dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{sv}", &iter_array); + dbus_message_iter_open_container (&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict_entry); + dbus_message_iter_append_basic (&iter_dict_entry, DBUS_TYPE_STRING, &prop_name); + dbus_message_iter_open_container (&iter_dict_entry, DBUS_TYPE_VARIANT, "s", &iter_variant); + dbus_message_iter_append_basic (&iter_variant, DBUS_TYPE_STRING, &data.rd_session_id); + dbus_message_iter_close_container (&iter_dict_entry, &iter_variant); + dbus_message_iter_close_container (&iter_array, &iter_dict_entry); + dbus_message_iter_close_container (&iter, &iter_array); + dbus_error_init (&d_error); + reply = dbus_connection_send_with_reply_and_block (data.bus, message, -1, &d_error); + dbus_message_unref (message); + if (!reply) + return FALSE; + if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_OBJECT_PATH, &sc_session_path, DBUS_TYPE_INVALID)) + { + dbus_message_unref (reply); + return FALSE; + } + + data.sc_session_path = g_strdup (sc_session_path); + dbus_message_unref (reply); + return TRUE; +} + +static gboolean +init_mutter (gboolean need_window, GError **error) +{ + dbus_uint64_t window_id; + const char *prop_name = "window-id"; + DBusError d_error; + DBusMessageIter iter, iter_array, iter_dict_entry, iter_variant; + DBusMessage *message, *reply; + const char *sc_stream_path; + + if (!ensure_rd_session_path (error)) + return FALSE; + + if (!need_window) + return TRUE; + + window_id = (data.window_id_is_explicit) ? data.window_id + : get_window_id (NULL); + if (!window_id) + return FALSE; + + if (!ensure_sc_session (error)) + return FALSE; + + if (window_id == data.window_id) + return TRUE; + + message = dbus_message_new_method_call (MUTTER_SCREEN_CAST_BUS_NAME, data.sc_session_path, MUTTER_SCREEN_CAST_SESSION_INTERFACE, "RecordWindow"); + dbus_message_iter_init_append (message, &iter); + dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{sv}", &iter_array); + dbus_message_iter_open_container (&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict_entry); + dbus_message_iter_append_basic (&iter_dict_entry, DBUS_TYPE_STRING, &prop_name); + dbus_message_iter_open_container (&iter_dict_entry, DBUS_TYPE_VARIANT, "t", &iter_variant); + dbus_message_iter_append_basic (&iter_variant, DBUS_TYPE_UINT64, &window_id); + dbus_message_iter_close_container (&iter_dict_entry, &iter_variant); + dbus_message_iter_close_container (&iter_array, &iter_dict_entry); + dbus_message_iter_close_container (&iter, &iter_array); + dbus_error_init (&d_error); + reply = dbus_connection_send_with_reply_and_block (data.bus, message, -1, &d_error); + dbus_message_unref (message); + if (!reply) + return FALSE; + if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_OBJECT_PATH, &sc_stream_path, DBUS_TYPE_INVALID)) + { + dbus_message_unref (reply); + return FALSE; + } + + data.sc_stream_path = g_strdup (sc_stream_path); + dbus_message_unref (reply); + data.window_id = window_id; + return TRUE; +} + +gboolean +_atspi_mutter_generate_keyboard_event (glong keyval, + const gchar *keystring, + AtspiKeySynthType synth_type, GError **error) +{ + DBusError d_error; + dbus_uint32_t d_keyval = keyval; + + if (!init_mutter (FALSE, error)) + return FALSE; + + dbus_error_init (&d_error); + switch (synth_type) + { + case ATSPI_KEY_PRESS: + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyKeyboardKeycode", &d_error, "ub", d_keyval, TRUE); + break; + case ATSPI_KEY_RELEASE: + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyKeyboardKeycode", &d_error, "ub", d_keyval, FALSE); + break; + case ATSPI_KEY_PRESSRELEASE: + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyKeyboardKeycode", &d_error, "ub", d_keyval, TRUE); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyKeyboardKeycode", &d_error, "ub", d_keyval, FALSE); + break; + case ATSPI_KEY_SYM: + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyKeyboardKeysyme", &d_error, "ub", d_keyval, TRUE); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyKeyboardKeysyme", &d_error, "ub", d_keyval, FALSE); + break; + default: + /* TODO: set error */ + g_warning ("%s: unsupported type", __func__); + return FALSE; + } + if (dbus_error_is_set (&d_error)) + { + g_warning ("GenerateKeyboardEvent failed: %s", d_error.message); + dbus_error_free (&d_error); + return FALSE; + } + + return TRUE; +} + +gboolean +_atspi_mutter_generate_mouse_event (glong x, glong y, const gchar *name, GError **error) +{ + gint button = 0; + double d_x = x, d_y = y; + DBusError d_error; + + if (!init_mutter (TRUE, error)) + return FALSE; + + dbus_error_init (&d_error); + switch (name[0]) + { + case 'b': + button = name[1] - '1'; + if (button < 0 || button > 4) + return FALSE; + if (x != -1 && y != -1) + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerMotionAbsolute", &d_error, "sdd", data.sc_stream_path, d_x, d_y); + switch (name[2]) + { + case 'p': + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, TRUE); + break; + case 'r': + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, FALSE); + break; + case 'c': + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, TRUE); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, FALSE); + break; + case 'd': + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, TRUE); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, FALSE); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, TRUE); + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerButton", &d_error, "ib", button, FALSE); + break; + default: + return FALSE; + } + break; + case 'a': /* absolute motion */ + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerMotionAbsolute", &d_error, "sdd", data.sc_stream_path, d_x, d_y); + break; + case 'r': /* relative */ + dbind_method_call_reentrant (data.bus, MUTTER_REMOTE_DESKTOP_BUS_NAME, data.rd_session_path, MUTTER_REMOTE_DESKTOP_SESSION_INTERFACE, "NotifyPointerMotionRelative", &d_error, "dd", d_x, d_y); + break; + default: + return FALSE; + } + return TRUE; +} + +void +_atspi_mutter_set_reference_window (AtspiAccessible *accessible) +{ + if (accessible) + { + AtspiRole role = atspi_accessible_get_role (accessible, NULL); + gchar *name; + g_return_if_fail (role != ATSPI_ROLE_APPLICATION); + name = atspi_accessible_get_name (accessible, NULL); + data.window_id = get_window_id (name); + data.window_id_is_explicit = TRUE; + } + + else + { + data.window_id_is_explicit = FALSE; + } +} diff --git a/atspi/atspi-object.c b/atspi/atspi-object.c index 3545845..a838ba0 100644 --- a/atspi/atspi-object.c +++ b/atspi/atspi-object.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-object.h b/atspi/atspi-object.h index 69dd551..5acbde8 100644 --- a/atspi/atspi-object.h +++ b/atspi/atspi-object.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_OBJECT_H_ diff --git a/atspi/atspi-private.h b/atspi/atspi-private.h index 2cf5693..9ddc600 100644 --- a/atspi/atspi-private.h +++ b/atspi/atspi-private.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_PRIVATE_H_ @@ -30,6 +30,7 @@ #include "atspi-event-listener-private.h" #include "atspi-matchrule-private.h" #include "atspi-misc-private.h" +#include "atspi-mutter-private.h" #include "glib/gi18n.h" diff --git a/atspi/atspi-registry.c b/atspi/atspi-registry.c index 76b1926..c50ae20 100644 --- a/atspi/atspi-registry.c +++ b/atspi/atspi-registry.c @@ -7,19 +7,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* atspi_registry.c: Global functions wrapping the registry */ @@ -424,6 +424,12 @@ atspi_deregister_device_event_listener (AtspiDeviceListener *listener, return TRUE; } +static gboolean +using_mutter () +{ + return (g_getenv ("WAYLAND_DISPLAY") != NULL); +} + /** * atspi_generate_keyboard_event: * @keyval: a #gint indicating the keycode or keysym or modifier mask of the @@ -456,6 +462,12 @@ atspi_generate_keyboard_event (glong keyval, dbus_int32_t d_keyval = keyval; DBusError d_error; + if (using_mutter ()) + { + if (_atspi_mutter_generate_keyboard_event (keyval, keystring, synth_type, error)) + return TRUE; + } + dbus_error_init (&d_error); if (!keystring) keystring = ""; @@ -492,6 +504,14 @@ atspi_generate_mouse_event (glong x, glong y, const gchar *name, GError **error) dbus_int32_t d_x = x, d_y = y; DBusError d_error; + g_return_val_if_fail (name != NULL, FALSE); + + if (using_mutter ()) + { + if (_atspi_mutter_generate_mouse_event (x, y, name, error)) + return TRUE; + } + dbus_error_init (&d_error); dbind_method_call_reentrant (_atspi_bus(), atspi_bus_registry, atspi_path_dec, atspi_interface_dec, @@ -506,6 +526,27 @@ atspi_generate_mouse_event (glong x, glong y, const gchar *name, GError **error) return TRUE; } +/** + * atspi_set_reference_window: + * + * @accessible: the #AtspiAccessible corresponding to the window to select. + * should be a top-level window with a role of + * ATSPI_ROLE_APPLICATION. + * + * Sets the reference window that will be used when atspi_generate_mouse_event + * is called. Coordinates will be assumed to be relative to this window. This + * is needed because, due to Wayland's security model, it is not currently + * possible to retrieve global coordinates. + * If NULL is passed, then AT-SPI will use the window that has focus at the + * time that atspi_generate_mouse_event is called. + */ +void +atspi_set_reference_window (AtspiAccessible *accessible) +{ + if (using_mutter ()) + _atspi_mutter_set_reference_window (accessible); +} + AtspiKeyDefinition * atspi_key_definition_copy (AtspiKeyDefinition *src) { diff --git a/atspi/atspi-registry.h b/atspi/atspi-registry.h index 18e32a6..43150c2 100644 --- a/atspi/atspi-registry.h +++ b/atspi/atspi-registry.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_REGISTRY_H_ @@ -71,6 +71,8 @@ atspi_generate_keyboard_event (glong keyval, gboolean atspi_generate_mouse_event (glong x, glong y, const gchar *name, GError **error); +void +atspi_set_reference_window (AtspiAccessible *accessible); G_END_DECLS #endif /* _ATSPI_REGISTRY_H_ */ diff --git a/atspi/atspi-relation.c b/atspi/atspi-relation.c index 82bb668..c441f2b 100644 --- a/atspi/atspi-relation.c +++ b/atspi/atspi-relation.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-relation.h b/atspi/atspi-relation.h index 4eecad3..0c32d6a 100644 --- a/atspi/atspi-relation.h +++ b/atspi/atspi-relation.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_RELATION_H_ diff --git a/atspi/atspi-selection.c b/atspi/atspi-selection.c index 7318989..0e72845 100644 --- a/atspi/atspi-selection.c +++ b/atspi/atspi-selection.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-selection.h b/atspi/atspi-selection.h index 8ac7e44..dda225a 100644 --- a/atspi/atspi-selection.h +++ b/atspi/atspi-selection.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_SELECTION_H_ diff --git a/atspi/atspi-stateset.c b/atspi/atspi-stateset.c index 366c48b..dd99d91 100644 --- a/atspi/atspi-stateset.c +++ b/atspi/atspi-stateset.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-stateset.h b/atspi/atspi-stateset.h index f6fd32f..e9e261e 100644 --- a/atspi/atspi-stateset.h +++ b/atspi/atspi-stateset.h @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_STATE_SET_H_ diff --git a/atspi/atspi-table-cell.c b/atspi/atspi-table-cell.c index 1df1fa9..83fe534 100644 --- a/atspi/atspi-table-cell.c +++ b/atspi/atspi-table-cell.c @@ -7,19 +7,19 @@ * Copyright 2013 SUSE LLC. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include /* for malloc */ @@ -34,7 +34,7 @@ get_object_array_and_unref (DBusMessage *reply) if (!reply) return NULL; - if (strcmp (dbus_message_get_signature (reply), "(so)") != 0) + if (strcmp (dbus_message_get_signature (reply), "a(so)") != 0) { dbus_message_unref (reply); return NULL; @@ -58,6 +58,8 @@ get_object_array_and_unref (DBusMessage *reply) * @obj: a GObject instance that implements AtspiTableCellIface * * Returns the number of columns occupied by this cell accessible. + * The returned values are meaningful only if the table cell has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a gint representing the number of columns occupied by this cell, * or 0 if the cell does not implement this method. @@ -101,6 +103,8 @@ atspi_table_cell_get_column_header_cells (AtspiTableCell *obj, GError **error) * @obj: a GObject instance that implements AtspiTableCellIface * * Returns the number of rows occupied by this cell accessible. + * The returned values are meaningful only if the table cell has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a gint representing the number of rows occupied by this cell, * or 0 if the cell does not implement this method. @@ -206,6 +210,8 @@ atspi_table_cell_get_position (AtspiTableCell *obj, * @column_span: (out): the number of columns occupied by this cell. * * Gets the row and column indexes and extents of this cell accessible. + * The returned values are meaningful only if the table cell has both + * STATE_VISIBLE and STATE_SHOWING. */ void atspi_table_cell_get_row_column_span (AtspiTableCell *obj, diff --git a/atspi/atspi-table-cell.h b/atspi/atspi-table-cell.h index 757ab0d..b16cd4b 100644 --- a/atspi/atspi-table-cell.h +++ b/atspi/atspi-table-cell.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_TABLE_CELL_H_ diff --git a/atspi/atspi-table.c b/atspi/atspi-table.c index b17e2f1..08718f4 100644 --- a/atspi/atspi-table.c +++ b/atspi/atspi-table.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include /* for malloc */ @@ -285,6 +285,8 @@ atspi_table_get_column_description (AtspiTable *obj, * Gets the number of rows spanned by the table cell at the specific row * and column. (some tables can have cells which span multiple rows * and/or columns). + * The returned values are meaningful only if the Table has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a #gint indicating the number of rows spanned by the specified cell. **/ @@ -313,6 +315,8 @@ atspi_table_get_row_extent_at (AtspiTable *obj, * Gets the number of columns spanned by the table cell at the specific * row and column (some tables can have cells which span multiple * rows and/or columns). + * The returned values are meaningful only if the Table has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: a #gint indicating the number of columns spanned by the specified cell. **/ @@ -646,6 +650,8 @@ atspi_table_remove_column_selection (AtspiTable *obj, * extents, and whether the cell is currently selected. If * the child at index is not a cell (for instance, if it is * a summary, caption, etc.), #FALSE is returned. + * The returned values are meaningful only if the Table has both + * STATE_VISIBLE and STATE_SHOWING. * * Example: * If the #AtspiTable child at index '6' extends across columns 5 and 6 of diff --git a/atspi/atspi-table.h b/atspi/atspi-table.h index 1295df1..942f2f6 100644 --- a/atspi/atspi-table.h +++ b/atspi/atspi-table.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_TABLE_H_ diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c index 1e887d3..de99773 100644 --- a/atspi/atspi-text.c +++ b/atspi/atspi-text.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" @@ -618,6 +618,8 @@ atspi_text_get_character_at_offset (AtspiText *obj, * * Gets a bounding box containing the glyph representing * the character at a particular text offset. + * The returned values are meaningful only if the Text has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: An #AtspiRect specifying the position and size of the character. * @@ -690,6 +692,8 @@ atspi_text_get_offset_at_point (AtspiText *obj, * for the returned values. * * Gets the bounding box for text within a range in an #AtspiText object. + * The returned values are meaningful only if the Text has both + * STATE_VISIBLE and STATE_SHOWING. * * Returns: An #AtspiRect giving the position and size of the specified range * of text. @@ -892,6 +896,72 @@ atspi_text_set_selection (AtspiText *obj, return retval; } +/** + * atspi_text_scroll_substring_to: + * @obj: a pointer to the #AtspiText object on which to operate. + * @start_offset: a #gint indicating the start of the desired text range. + * @end_offset: a #gint indicating the first character past the desired range. + * @type: a #AtspiScrollType indicating where the object should be placed on the + * screen. + * + * Scrolls whatever container of the #AtspiText text range so it becomes + * visible on the screen. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_text_scroll_substring_to (AtspiText *obj, + gint start_offset, + gint end_offset, + AtspiScrollType type, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_text, "ScrollSubstringTo", + error, "iiu=>b", + start_offset, end_offset, type, &retval); + + return retval; +} + +/** + * atspi_text_scroll_substring_to_point: + * @obj: a pointer to the #AtspiText object on which to operate. + * @start_offset: a #gint indicating the start of the desired text range. + * @end_offset: a #gint indicating the first character past the desired range. + * @coords: a #AtspiCoordType indicating whether the coordinates are relative to + * the screen, to the window, or to the parent object. + * @x: the x coordinate of the point to reach + * @y: the y coordinate of the point to reach + * + * Scrolls whatever container of the #AtspiText text range so it becomes + * visible on the screen at a given position. + * + * Returns: #TRUE if successful, #FALSE otherwise. + **/ +gboolean +atspi_text_scroll_substring_to_point (AtspiText *obj, + gint start_offset, + gint end_offset, + AtspiCoordType coords, + gint x, + gint y, + GError **error) +{ + dbus_bool_t retval = FALSE; + + g_return_val_if_fail (obj != NULL, FALSE); + + _atspi_dbus_call (obj, atspi_interface_text, "ScrollSubstringToPoint", + error, "iiuii=>b", + start_offset, end_offset, coords, x, y, &retval); + + return retval; +} + static void atspi_text_base_init (AtspiText *klass) { diff --git a/atspi/atspi-text.h b/atspi/atspi-text.h index 8e11eb0..994d12b 100644 --- a/atspi/atspi-text.h +++ b/atspi/atspi-text.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_TEXT_H_ @@ -137,6 +137,9 @@ gboolean atspi_text_remove_selection (AtspiText *obj, gint selection_num, GError gboolean atspi_text_set_selection (AtspiText *obj, gint selection_num, gint start_offset, gint end_offset, GError **error); +gboolean atspi_text_scroll_substring_to (AtspiText *obj, gint start_offset, gint end_offset, AtspiScrollType type, GError **error); + +gboolean atspi_text_scroll_substring_to_point (AtspiText *obj, gint start_offset, gint end_offset, AtspiCoordType coords, gint x, gint y, GError **error); G_END_DECLS #endif /* _ATSPI_TEXT_H_ */ diff --git a/atspi/atspi-types.h b/atspi/atspi-types.h index e458a8e..2631baf 100644 --- a/atspi/atspi-types.h +++ b/atspi/atspi-types.h @@ -7,19 +7,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_TYPES_H_ @@ -89,6 +89,7 @@ struct _AtspiEvent gint detail1; gint detail2; GValue any_data; + AtspiAccessible *sender; }; /** diff --git a/atspi/atspi-value.c b/atspi/atspi-value.c index 642533d..28acade 100644 --- a/atspi/atspi-value.c +++ b/atspi/atspi-value.c @@ -7,19 +7,19 @@ * Copyright 2010, 2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "atspi-private.h" diff --git a/atspi/atspi-value.h b/atspi/atspi-value.h index 6a1e531..a012793 100644 --- a/atspi/atspi-value.h +++ b/atspi/atspi-value.h @@ -8,19 +8,19 @@ * * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_VALUE_H_ diff --git a/atspi/atspi.h b/atspi/atspi.h index dc92de0..89ff20f 100644 --- a/atspi/atspi.h +++ b/atspi/atspi.h @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _ATSPI_H diff --git a/atspi/atspimarshal.list b/atspi/atspimarshal.list new file mode 100644 index 0000000..2d9dd51 --- /dev/null +++ b/atspi/atspimarshal.list @@ -0,0 +1,25 @@ +# see glib-genmarshal(1) for a detailed description of the file format, +# possible parameter types are: +# VOID indicates no return type, or no extra +# parameters. if VOID is used as the parameter +# list, no additional parameters may be present. +# BOOLEAN for boolean types (gboolean) +# CHAR for signed char types (gchar) +# UCHAR for unsigned char types (guchar) +# INT for signed integer types (gint) +# UINT for unsigned integer types (guint) +# LONG for signed long integer types (glong) +# ULONG for unsigned long integer types (gulong) +# ENUM for enumeration types (gint) +# FLAGS for flag enumeration types (guint) +# FLOAT for single-precision float types (gfloat) +# DOUBLE for double-precision float types (gdouble) +# STRING for string types (gchar*) +# PARAM for GParamSpec or derived types (GParamSpec*) +# BOXED for boxed (anonymous but reference counted) types (GBoxed*) +# POINTER for anonymous pointer types (gpointer) +# OBJECT for GObject or derived types (GObject*) +# NONE deprecated alias for VOID +# BOOL deprecated alias for BOOLEAN + +VOID:INT,INT diff --git a/atspi/meson.build b/atspi/meson.build index b7a9357..8a2ca27 100644 --- a/atspi/meson.build +++ b/atspi/meson.build @@ -13,6 +13,7 @@ atspi_sources = [ 'atspi-hypertext.c', 'atspi-image.c', 'atspi-matchrule.c', + 'atspi-mutter.c', 'atspi-misc.c', 'atspi-object.c', 'atspi-registry.c', @@ -57,7 +58,14 @@ atspi_headers = [ atspi_includedir = join_paths(get_option('prefix'), get_option('includedir'), 'at-spi-2.0', 'atspi') -install_headers(atspi_headers, subdir: atspi_includedir) +install_headers(atspi_headers, install_dir: atspi_includedir) + +# Marshallers +atspi_marshals = gnome.genmarshal('atspimarshal', + sources: 'atspimarshal.list', + prefix: 'atspi_marshal', +) +atspi_marshal_h = atspi_marshals[1] atspi_enums = gnome.mkenums('atspi-enum-types', sources: [ 'atspi-constants.h', 'atspi-types.h' ], @@ -67,7 +75,7 @@ atspi_enums = gnome.mkenums('atspi-enum-types', install_header: true) atspi_enum_h = atspi_enums[1] -atspi = library('atspi', atspi_sources + atspi_enums, +atspi = library('atspi', atspi_sources + atspi_enums + atspi_marshals, version: soversion, soversion: soversion.split('.')[0], include_directories: [ root_inc, registryd_inc ], diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index 17f01c0..b4f49b8 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -5,19 +5,19 @@ * Copyright 2011-2018 Red Hat, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include "config.h" @@ -63,6 +63,9 @@ typedef struct { /* -1 == error, 0 == pending, > 0 == running */ int a11y_bus_pid; char *a11y_bus_address; +#ifdef HAVE_X11 + gboolean x11_prop_set; +#endif int pipefd[2]; int listenfd; char *a11y_launch_error_message; @@ -323,6 +326,7 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) { app->a11y_launch_error_message = g_strdup_printf ("Failed to read address: %s", strerror (errno)); kill (app->a11y_bus_pid, SIGTERM); + app->a11y_bus_pid = -1; goto error; } close (app->pipefd[0]); @@ -466,20 +470,22 @@ ensure_a11y_bus (A11yBusLauncher *app) #endif #ifdef HAVE_X11 - { - Display *display = XOpenDisplay (NULL); - if (display) - { - Atom bus_address_atom = XInternAtom (display, "AT_SPI_BUS", False); - XChangeProperty (display, - XDefaultRootWindow (display), - bus_address_atom, - XA_STRING, 8, PropModeReplace, - (guchar *) app->a11y_bus_address, strlen (app->a11y_bus_address)); - XFlush (display); - XCloseDisplay (display); - } - } + if (g_getenv ("DISPLAY") != NULL && g_getenv ("WAYLAND_DISPLAY") == NULL) + { + Display *display = XOpenDisplay (NULL); + if (display) + { + Atom bus_address_atom = XInternAtom (display, "AT_SPI_BUS", False); + XChangeProperty (display, + XDefaultRootWindow (display), + bus_address_atom, + XA_STRING, 8, PropModeReplace, + (guchar *) app->a11y_bus_address, strlen (app->a11y_bus_address)); + XFlush (display); + XCloseDisplay (display); + app->x11_prop_set = TRUE; + } + } #endif return TRUE; @@ -677,16 +683,6 @@ on_bus_acquired (GDBusConnection *connection, } app->session_bus = connection; - if (app->launch_immediately) - { - ensure_a11y_bus (app); - if (app->state == A11Y_BUS_STATE_ERROR) - { - g_main_loop_quit (app->loop); - return; - } - } - error = NULL; registration_id = g_dbus_connection_register_object (connection, "/org/a11y/bus", @@ -728,6 +724,18 @@ on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data) { + A11yBusLauncher *app = user_data; + + if (app->launch_immediately) + { + ensure_a11y_bus (app); + if (app->state == A11Y_BUS_STATE_ERROR) + { + g_main_loop_quit (app->loop); + return; + } + } + g_bus_watch_name (G_BUS_TYPE_SESSION, "org.gnome.SessionManager", G_BUS_NAME_WATCHER_FLAGS_NONE, @@ -771,50 +779,6 @@ init_sigterm_handling (A11yBusLauncher *app) app); } -static gboolean -already_running () -{ -#ifdef HAVE_X11 - Atom AT_SPI_BUS; - Atom actual_type; - Display *bridge_display; - int actual_format; - unsigned char *data = NULL; - unsigned long nitems; - unsigned long leftover; - gboolean result = FALSE; - - bridge_display = XOpenDisplay (NULL); - if (!bridge_display) - return FALSE; - - AT_SPI_BUS = XInternAtom (bridge_display, "AT_SPI_BUS", False); - XGetWindowProperty (bridge_display, - XDefaultRootWindow (bridge_display), - AT_SPI_BUS, 0L, - (long) BUFSIZ, False, - (Atom) 31, &actual_type, &actual_format, - &nitems, &leftover, &data); - - if (data) - { - GDBusConnection *bus; - bus = g_dbus_connection_new_for_address_sync ((const gchar *)data, 0, - NULL, NULL, NULL); - if (bus != NULL) - { - result = TRUE; - g_object_unref (bus); - } - } - - XCloseDisplay (bridge_display); - return result; -#else - return FALSE; -#endif -} - static GSettings * get_schema (const gchar *name) { @@ -860,9 +824,6 @@ main (int argc, gboolean screen_reader_set = FALSE; gint i; - if (already_running ()) - return 0; - _global_app = g_slice_new0 (A11yBusLauncher); _global_app->loop = g_main_loop_new (NULL, FALSE); @@ -931,19 +892,20 @@ main (int argc, * we don't want early login processes to pick up the stale address. */ #ifdef HAVE_X11 - { - Display *display = XOpenDisplay (NULL); - if (display) - { - Atom bus_address_atom = XInternAtom (display, "AT_SPI_BUS", False); - XDeleteProperty (display, - XDefaultRootWindow (display), - bus_address_atom); + if (_global_app->x11_prop_set) + { + Display *display = XOpenDisplay (NULL); + if (display) + { + Atom bus_address_atom = XInternAtom (display, "AT_SPI_BUS", False); + XDeleteProperty (display, + XDefaultRootWindow (display), + bus_address_atom); - XFlush (display); - XCloseDisplay (display); - } - } + XFlush (display); + XCloseDisplay (display); + } + } #endif if (_global_app->a11y_launch_error_message) diff --git a/bus/meson.build b/bus/meson.build index 5c7e03d..155dc53 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -44,6 +44,7 @@ else '/usr/sbin/dbus-daemon', '/libexec/dbus-daemon', '/usr/libexec/dbus-daemon', + '/usr/lib/dbus-daemon', '/usr/pkg/bin/dbus-daemon', required: false) if dbus_daemon.found() diff --git a/dbind/dbind-any.c b/dbind/dbind-any.c index ae499d7..efdba73 100644 --- a/dbind/dbind-any.c +++ b/dbind/dbind-any.c @@ -2,19 +2,19 @@ * Copyright 2008-2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* type driven marshalling */ diff --git a/dbind/dbind-any.h b/dbind/dbind-any.h index dd2a27b..859c895 100644 --- a/dbind/dbind-any.h +++ b/dbind/dbind-any.h @@ -2,19 +2,19 @@ * Copyright 2008-2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _DBIND_ANY_H_ diff --git a/dbind/dbind.c b/dbind/dbind.c index 9d7304e..e154f85 100644 --- a/dbind/dbind.c +++ b/dbind/dbind.c @@ -2,19 +2,19 @@ * Copyright 2008-2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/dbind/dbind.h b/dbind/dbind.h index f7298d0..0c10c7d 100644 --- a/dbind/dbind.h +++ b/dbind/dbind.h @@ -2,19 +2,19 @@ * Copyright 2008-2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef _DBIND_H_ diff --git a/dbind/dbtest.c b/dbind/dbtest.c index 42c1919..4f58540 100644 --- a/dbind/dbtest.c +++ b/dbind/dbtest.c @@ -2,19 +2,19 @@ * Copyright 2008-2011 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/doc/libatspi/libatspi-sections.txt b/doc/libatspi/libatspi-sections.txt index 14304ff..d7bfc10 100644 --- a/doc/libatspi/libatspi-sections.txt +++ b/doc/libatspi/libatspi-sections.txt @@ -30,6 +30,8 @@ atspi_text_set_selection atspi_text_get_string_at_offset atspi_text_get_text_attribute_value atspi_text_get_text_attributes +atspi_text_scroll_substring_to +atspi_text_scroll_substring_to_point ATSPI_TEXT ATSPI_IS_TEXT @@ -249,6 +251,7 @@ atspi_accessible_get_table_iface atspi_accessible_get_text_iface atspi_accessible_get_value_iface atspi_accessible_get_interfaces +atspi_accessible_get_accessible_id ATSPI_ACCESSIBLE ATSPI_IS_ACCESSIBLE @@ -501,6 +504,7 @@ atspi_register_device_event_listener atspi_deregister_device_event_listener atspi_generate_keyboard_event atspi_generate_mouse_event +atspi_set_reference_window
diff --git a/doc/libatspi/tmpl/atspi-accessible.sgml b/doc/libatspi/tmpl/atspi-accessible.sgml index 5b3c8ea..0e161ee 100644 --- a/doc/libatspi/tmpl/atspi-accessible.sgml +++ b/doc/libatspi/tmpl/atspi-accessible.sgml @@ -322,3 +322,13 @@ actually have children. @Returns: + + + + + +@obj: +@error: +@Returns: + + diff --git a/idl/accessible.didl b/idl/accessible.didl deleted file mode 100644 index eee462f..0000000 --- a/idl/accessible.didl +++ /dev/null @@ -1,234 +0,0 @@ - -/* - The base interface which is implemented by all accessible objects. - */ - -interface org.freestandards.atspi.Accessible { - - enum Role { - ROLE_INVALID = 0, - ROLE_ACCELERATOR_LABEL, - ROLE_ALERT, - ROLE_ANIMATION, - ROLE_ARROW, - ROLE_CALENDAR, - ROLE_CANVAS, - ROLE_CHECK_BOX, - ROLE_CHECK_MENU_ITEM, - ROLE_COLOR_CHOOSER, - ROLE_COLUMN_HEADER, - ROLE_COMBO_BOX, - ROLE_DATE_EDITOR, - ROLE_DESKTOP_ICON, - ROLE_DESKTOP_FRAME, - ROLE_DIAL, - ROLE_DIALOG, - ROLE_DIRECTORY_PANE, - ROLE_DRAWING_AREA, - ROLE_FILE_CHOOSER, - ROLE_FILLER, - ROLE_FOCUS_TRAVERSABLE, - ROLE_FONT_CHOOSER, - ROLE_FRAME, - ROLE_GLASS_PANE, - ROLE_HTML_CONTAINER, - ROLE_ICON, - ROLE_IMAGE, - ROLE_INTERNAL_FRAME, - ROLE_LABEL, - ROLE_LAYERED_PANE, - ROLE_LIST, - ROLE_LIST_ITEM, - ROLE_MENU, - ROLE_MENU_BAR, - ROLE_MENU_ITEM, - ROLE_OPTION_PANE, - ROLE_PAGE_TAB, - ROLE_PAGE_TAB_LIST, - ROLE_PANEL, - ROLE_PASSWORD_TEXT, - ROLE_POPUP_MENU, - ROLE_PROGRESS_BAR, - ROLE_PUSH_BUTTON, - ROLE_RADIO_BUTTON, - ROLE_RADIO_MENU_ITEM, - ROLE_ROOT_PANE, - ROLE_ROW_HEADER, - ROLE_SCROLL_BAR, - ROLE_SCROLL_PANE, - ROLE_SEPARATOR, - ROLE_SLIDER, - ROLE_SPIN_BUTTON, - ROLE_SPLIT_PANE, - ROLE_STATUS_BAR, - ROLE_TABLE, - ROLE_TABLE_CELL, - ROLE_TABLE_COLUMN_HEADER, - ROLE_TABLE_ROW_HEADER, - ROLE_TEAROFF_MENU_ITEM, - ROLE_TERMINAL, - ROLE_TEXT, - ROLE_TOGGLE_BUTTON, - ROLE_TOOL_BAR, - ROLE_TOOL_TIP, - ROLE_TREE, - ROLE_TREE_TABLE, - ROLE_UNKNOWN - } - - /* - RelationType specifies a relationship between objects outside of the normal - parent/child hierarchical relationship. It allows better semantic - identification of how objects are associated with one another. - */ - enum RelationType { - RELATION_NULL = 0, - RELATION_LABEL_FOR, - RELATION_LABELLED_BY, - RELATION_CONTROLLER_FOR, - RELATION_CONTROLLED_BY, - RELATION_MEMBER_OF, - RELATION_TOOLTIP_FOR, - RELATION_NODE_CHILD_OF, - RELATION_NODE_PARENT_OF, - RELATION_EXTENDED, - RELATION_FLOWS_TO, - RELATION_FLOWS_FROM, - RELATION_SUBWINDOW_OF, - RELATION_EMBEDS, - RELATION_EMBEDDED_BY, - RELATION_POPUP_FOR, - RELATION_PARENT_WINDOW_OF, - RELATION_DESCRIPTION_FOR, - RELATION_DESCRIBED_BY, - RELATION_LAST_DEFINED - } - - /* - Describes a one-to-many relationship between accessible objects. - */ - struct Relation { - RelationType type; - Reference objects []; - } - - enum uint32 StateType { - STATE_INVALID = 0, - STATE_ACTIVE, - STATE_ARMED, - STATE_BUSY, - STATE_CHECKED, - STATE_COLLAPSED, - STATE_DEFUNCT, - STATE_EDITABLE, - STATE_ENABLED, - STATE_EXPANDABLE, - STATE_EXPANDED, - STATE_FOCUSABLE, - STATE_FOCUSED, - STATE_HAS_TOOLTIP, - STATE_HORIZONTAL, - STATE_ICONIFIED, - STATE_MODAL, - STATE_MULTI_LINE, - STATE_MULTISELECTABLE, - STATE_OPAQUE, - STATE_PRESSED, - STATE_RESIZABLE, - STATE_SELECTABLE, - STATE_SELECTED, - STATE_SENSITIVE, - STATE_SHOWING, - STATE_SINGLE_LINE, - STATE_STALE, - STATE_TRANSIENT, - STATE_VERTICAL, - STATE_VISIBLE, - STATE_MANAGES_DESCENDANTS, - STATE_INDETERMINATE, - STATE_REQUIRED, - STATE_TRUNCATED, - STATE_ANIMATED, - STATE_INVALID_ENTRY, - STATE_SUPPORTS_AUTOCOMPLETION, - STATE_SELECTABLE_TEXT, - STATE_IS_DEFAULT, - STATE_VISITED, - STATE_LAST_DEFINED - } - - /* - A two integer array representing a bit-field of currently held states. - */ - typedef State uint32 []; - - /* A short string representing the object's name. */ - read property string Name; - - /* A string describing the object in more detail. */ - read property string Description; - - /* The accessible object which is this objects containing parent */ - read property Reference Parent; - - /* The number of children contained by this object */ - read property int32 ChildCount; - - /* Get the accessible child of this object at the given index */ - method GetChildAtIndex { - int32 index; - } reply { - Reference child; - } - - /* Get the index of this accessible object within its containing objects child list. */ - method GetIndexInParent reply { - int32 index; - } - - /* Access this objects non-hierarchical relationships to other accessible objects */ - method GetRelationSet reply { - RelationSet relations; - } - - /* Get the Role indicating the type of UI role played by this object. */ - method GetRole reply { - Role role; - } - - /* Get a string indicating the type of UI role played by this object */ - method GetRoleName reply { - string role; - } - - /* - Get a string indicating the type of UI role played by this object, - transalted to the current locale. - */ - method GetLocalizedRoleName { - string role; - } - - /* Access the states currently held by this object. */ - method GetState reply { - State state; - } - - /* - Get a properties applied to this object as a whole, as an - set name-value pairs. As such these attributes may be considered - weakly-typed properties or annotations, as distinct - from the strongly-typed interface instance data. - */ - method GetAttributes reply { - Attributes attributes; - } - - /* - Get the containing Application for this object. - */ - method GetApplication reply { - Reference application; - } -} - diff --git a/idl/action.didl b/idl/action.didl deleted file mode 100644 index 48e89aa..0000000 --- a/idl/action.didl +++ /dev/null @@ -1,60 +0,0 @@ - -/* - An interface through which a user-actionable UI component can be manipulated. - - Typical actions include "click", "press", "release" or "open". -*/ -interface org.freestandards.atspi.Action { - /* - Represents a single action. - */ - struct Action { - /* String containing short description of action. */ - string name; - /* The description of an action may provide information about the result. */ - string description; - /* A string containing the key-binding or "" if none exists */ - string key_binding; - } - - property read int32 NActions; - - /* Get the description for the specified action. */ - method GetDescription { - int32 index; - } reply { - string description - } - - /* Get the name of the specified action */ - method GetName { - int32 index; - } reply { - string name; - } - - method GetLocalizedName { - int32 index; - } reply { - string name; - } - - /* Get the key-binding for the specified action. */ - method GetKeyBinding { - int32 index; - } reply { - string key_binding; - } - - /* Retrieves the actions associated with the object. */ - method GetActions reply { - Action actions []; - } - - /* Causes the object to perform the specified action. */ - method GetActions { - int32 index; - } reply { - boolean success; - } -} diff --git a/idl/application.didl b/idl/application.didl deleted file mode 100644 index 546fcfd..0000000 --- a/idl/application.didl +++ /dev/null @@ -1,24 +0,0 @@ - -/* - An interface identifying an object which is the root of the - hierarchy associated with a running application. -*/ -interface org.freestandards.atspi.Application { - - /* A string indicating the type of user interface toolkit used by the application. */ - read property string ToolkitName; - - /* A string indicating the version of the applications accessibility bridge. */ - read property string Version; - - /* A string indicating the version of the AT-SPI specification - supported by the application */ - read property string AtspiVersion; - - /* Gets the locale in which the application is currently running. */ - method GetLocale { - LocaleType locale_type; - } reply { - string locale; - } -} diff --git a/idl/cache.didl b/idl/cache.didl deleted file mode 100644 index 3cf9b11..0000000 --- a/idl/cache.didl +++ /dev/null @@ -1,27 +0,0 @@ - -interface org.freestandards.atspi.Cache { - - struct CacheItem { - object path; - Reference parent; - int index_in_parent; - int child_count; - string[] interfaces; - string name; - Role role; - string description; - StateSet states; - } - - method GetItems reply { - CacheItem[] items; - } - - signal AddAccessible { - CacheItem item; - } - - signal RemoveAccessible { - Reference item; - } -} diff --git a/idl/collection.didl b/idl/collection.didl deleted file mode 100644 index f3eee6e..0000000 --- a/idl/collection.didl +++ /dev/null @@ -1,69 +0,0 @@ - -/* TODO - Need to define the 'MatchRule' struct. */ - -namespace org.freestandards.atspi { - interface Collection { - enum SortOrder { - SORT_ORDER_INVALID = 0, - SORT_ORDER_CANONICAL, - SORT_ORDER_FLOW, - SORT_ORDER_TAB, - SORT_ORDER_REVERSE_CANONICAL, - SORT_ORDER_REVERSE_FLOW, - SORT_ORDER_REVERSE_TAB, - SORT_ORDER_LAST_DEFINED - } - - enum MatchType { - MATCH_INVALID = 0, - MATCH_ALL, - MATCH_ANY, - MATCH_NONE, - MATCH_EMPTY, - MATCH_LAST_DEFINED - } - - enum TreeTraversalType { - TREE_RESTRICT_CHILDREN, - TREE_RESTRICT_SIBLING, - TREE_INORDER, - TREE_LAST_DEFINED - } - - method GetMatches { - MatchRule rule; - SortOrder sort_by; - int32 count; - boolean traverse; - } reply { - Reference matches []; - } - - method GetMatchesTo { - object current_object; - MatchRule rule; - SortOrder sort_by; - TreeTraversalType type; - boolean recurse; - int32 count; - boolean traverse; - } reply { - Reference matches []; - } - - method GetMatchesFrom { - object current_object; - MatchRule rule; - SortOrder sort_by; - TreeTraversalType type; - int32 count; - boolean traverse; - } reply { - Reference matches []; - } - - method GetActiveDescendent reply { - Reference descendent; - } - } -} diff --git a/idl/component.didl b/idl/component.didl deleted file mode 100644 index 31cfbf0..0000000 --- a/idl/component.didl +++ /dev/null @@ -1,178 +0,0 @@ - -using org.freestandards.atspi.Accessible.Reference = Reference; - -/* - The Component interface is implemented by objects which occupy on-screen space, e.g. objects - which have onscreen visual representations. The methods in Component allow clients to identify - where the objects lie in the onscreen coordinate system, their relative size, stacking order, and - position. It also provides a mechanism whereby keyboard focus may be transferred to specific - user interface elements programmatically. This is a 2D API, coordinates of 3D objects are projected into the - 2-dimensional screen view for purposes of this interface. -*/ -interface org.freestandards.atspi.Component { - - /* - Used by Component, Image and Text interfaces to specify whether coordinates are - relative to the window or screen. - */ - enum CoordType { - COORD_TYPE_SCREEN = 0, - COORD_TYPE_WINDOW = 1 - } - - /* - Used by Component and Text interfaces, a struct defining a bounding rectange. - The coordinate system is determined by the context of the API call. - */ - struct BoundingBox { - int32 x; - int32 y; - int32 width; - int32 height; - } - - /* - Indicates the relative stacking order with respect to the onscreen visual representation. - - The order of layers, from bottom to top is: - LAYER_BACKGROUND - LAYER_WINDOW - LAYER_MDI - LAYER_CANVAS - LAYER_WIDGET - LAYER_POPUP - LAYER_OVERLAY - */ - enum ComponentLayer { - LAYER_INVALID, - LAYER_BACKGROUND, - LAYER_CANVAS, - LAYER_WIDGET, - LAYER_MDI, - LAYER_POPUP, - LAYER_OVERLAY, - LAYER_WINDOW, - LAYER_LAST_DEFINED - } - - /* - Describes where the object should be placed on the window. - */ - enum uint32 ScrollType { - SCROLL_TOP_LEFT = 0, - SCROLL_BOTTOM_RIGHT, - SCROLL_TOP_EDGE, - SCROLL_BOTTOM_EDGE, - SCROLL_LEFT_EDGE, - SCROLL_RIGHT_EDGE, - SCROLL_ANYWHERE - } - - /* - Specifies whether the coordinates are relative to the screen, to the - window, or to the parent object. - */ - enum uint32 CoordType { - COORD_TYPE_SCREEN = 0, - COORD_TYPE_WINDOW, - COORD_TYPE_PARENT - } - - /* - True if the specified point lies within the components bounding box. - */ - method Contains { - int32 x; - int32 y; - CoordType coord_type; - } reply { - boolean within; - } - - /* - Return the accessible child whose bounding box contains the specified point. - */ - method GetAccessibleAtPoint { - int32 x; - int32 y; - CoordType coord_type; - } reply { - Reference child; - } - - /* - Obtain the components bounding box, in pixels, relative to the specified coordinate system. - */ - method GetExtents { - CoordType cood_type; - } reply { - BoundingBox box; - } - - /* - Obtain the position of the current component in the specified coordinate system. - */ - method GetPosition { - CoordType coord_type; - } reply { - int32 x; - int32 y; - } - - /* - Obtain the size in the specified coordinate system. - Fully contains teh object's visual representation without accounting for viewport clipping. - */ - method GetSize reply { - int32 width; - int32 height; - } - - /* - The component layer in which this object resides. - */ - method GetLayer reply { - ComponentLayer layer; - } - - /* - Obtain the relative stacking order (i.e 'Z' order) of an object. - Larger values indicate that an object is on 'top' of the stack. - Only relevenat for objects in LAYER_MDI or LAYER_WINDOW. - */ - method GetMDIZOrder reply { - int16 order; - } - - /* - Request that an object obtain keyboard focus. - */ - method GrabFocus reply { - boolean success; - } - - /* - Obtain the alpha value of the component. - Alpha values are used with Z-Order to determine whether an obeject obscures - anothers visual representation. - */ - method GetAlpha reply { - double alpha; - } - - /* - Scroll this object so it becomes visible on the screen. - */ - method ScrollTo { - ScrollType type; - } - - /* - Scroll this object so it becomes visible on the screen at a given position. - */ - method ScrollToPoint { - CoordType type; - int32 x; - int32 y; - } -} diff --git a/idl/controller.didl b/idl/controller.didl deleted file mode 100644 index 4519a0a..0000000 --- a/idl/controller.didl +++ /dev/null @@ -1,97 +0,0 @@ - -interface org.freestandards.atspi.DeviceEventController { - - enum KeySynthType { - KEY_PRESS=0, - KEY_RELEASE, - KEY_PRESSRELEASE, - KEY_SYM, - KEY_STRING, - KEY_LOCKMODIFIERS, - KEY_UNLOCKMODIFIERS - } - - /* - Consumption of events and syncronous event delivery is a sore-thumb. - - The client should really have no say over what the DeviceEventController - does with regards to event delivery as such the 'syncronous' flag is redundant. - - The 'global' flag is now useless as XEVIE is no longer maintained. As such - the DeviceEventController will not recieve any device events from applications - not participating. - - The only possibly useful flag is 'preemptive'. However all keyboard events are - sent as pre-emptive from gail so its debateable whether even this flag is really - in-use. - */ - struct EventListenerMode { - /* Controller should block while delivering this event. */ - boolean syncronous; - /* Clients are allowed to consume this event. */ - boolean preemptive; - /* - Event notifications should be sent regardless of whether - focused application participates in AT-SPI accessibility. - */ - boolean global; - } - - struct KeyDefinition { - int32 keycode; - int32 keysym; - string keystring; - int32 unused; - } - - method RegisterKeystrokeListener { - object listener; - KeyDefinition[] keys; - uint32 mask; - EventType[] type; - EventListenerMode mode; - } reply { - boolean success; - } - - method DeregisterKeystrokeListener { - object listener; - KeyDefinition[] keys; - uint32 mask; - EventType[] type; - } - - method RegisterDeviceEventListener { - object listener; - EventType[] type; - } reply { - boolean success; - } - - method DeregisterDeviceEventListener { - object listener; - EventType[] type; - } - - method NotifyListenersSync { - DeviceEvent event; - } reply { - boolean consumed; - } - - method NotifyListenersAsync { - DeviceEvent event; - } - - method GenerateKeyboardEvent { - int32 keycode; - string keystring; - KeySynthType type; - } - - method GenerateMouseEvent { - int32 x; - int32 y; - string event_name; - } -} diff --git a/idl/device.didl b/idl/device.didl deleted file mode 100644 index 78bdd12..0000000 --- a/idl/device.didl +++ /dev/null @@ -1,33 +0,0 @@ - -namespace org.freestandards.atspi { - - enum EventType { - KEY_PRESSED_EVENT=0, - KEY_RELEASED_EVENT, - BUTTON_PRESSED_EVENT, - BUTTON_RELEASED_EVENT - } - - enum ModifierType { - MODIFIER_SHIFT=0, - MODIFIER_SHIFTLOCK, - MODIFIER_CONTROL, - MODIFIER_ALT, - MODIFIER_META, - MODIFIER_META2, - MODIFIER_META3, - MODIFIER_NUMLOCK - } - - struct DeviceEvent { - EventType type; - /* An identifier for the event, corresponds to XEvent serial number. */ - int32 stream_id; - /* A numeric code identifying the hardware or button on which the event occured. */ - int16 hw_code; - ModifierType modifiers; - int32 timestamp; - string event_string; - boolean is_text; - } -} diff --git a/idl/document.didl b/idl/document.didl deleted file mode 100644 index ce2a4f0..0000000 --- a/idl/document.didl +++ /dev/null @@ -1,25 +0,0 @@ - -/* - Indicates the start of a document. - - Children are part of the document content. -*/ -interface org.freestandards.atspi.Document { - - /* Gets the locale associated with the documents content. */ - method GetLocale reply { - string locale; - } - - /* Gets the value of a single attribute. */ - method GetAttributeValue { - string key; - } reply { - string value; - } - - /* Gets all attributes for the document as a whole. These are constant for all elements within the document.*/ - method GetAttributes reply { - Attributes attributes; - } -} diff --git a/idl/event.didl b/idl/event.didl deleted file mode 100644 index d4c75cc..0000000 --- a/idl/event.didl +++ /dev/null @@ -1,79 +0,0 @@ - -namespace org.freestandards.atspi.Event { - - struct Event { - string minor; - int32 detail1; - int32 detail2; - variant val; - Reference application; - } - - interface Object { - signal PropertyChange {Event event;} - signal BoundsChanged {Event event;} - signal LinkSelected {Event event;} - signal StateChanged {Event event;} - signal ChildrenChanged {Event event;} - signal VisibleDataChanged {Event event;} - signal SelectionChanged {Event event;} - signal ModelChanged {Event event;} - signal ActiveDescendantChanged {Event event;} - signal RowInserted {Event event;} - signal RowDeleted {Event event;} - signal RowReordered {Event event;} - signal ColumnInserted {Event event;} - signal ColumnDeleted {Event event;} - signal ColumnReordered {Event event;} - signal TextBoundsChanged {Event event;} - signal TextSelectionChanged {Event event;} - signal TextChanged {Event event;} - signal TextAttributesChanged {Event event;} - signal TextCaretMoved {Event event;} - signal AttributesChanged {Event event;} - } - - interface Window { - signal PropertyChange {Event event;} - signal Minimize {Event event;} - signal Maximize {Event event;} - signal Restore {Event event;} - signal Close {Event event;} - signal Create {Event event;} - signal Reparent {Event event;} - signal DesktopCreate {Event event;} - signal DesktopDestroy {Event event;} - signal Destroy {Event event;} - signal Activate {Event event;} - signal Deactivate {Event event;} - signal Raise {Event event;} - signal Lower {Event event;} - signal Move {Event event;} - signal Resize {Event event;} - signal Shade {Event event;} - signal Ushade {Event event;} - signal Restyle {Event event;} - } - - interface Mouse { - signal Abs {Event event;} - signal Rel {Event event;} - signal Button {Event event;} - } - - interface Keyboard { - signal Modifiers {Event event;} - } - - interface Document { - signal LoadComplete {Event event;} - signal Reload {Event event;} - signal LoadStopped {Event event;} - signal ContentChanged {Event event;} - signal AttributesChanged {Event event;} - } - - interface Focus { - signal Focus {Event event;} - } -} diff --git a/idl/hypertext.didl b/idl/hypertext.didl deleted file mode 100644 index 334dafd..0000000 --- a/idl/hypertext.didl +++ /dev/null @@ -1,82 +0,0 @@ - -namespace org.freestandards.atspi { - /* - Instances of Hyperlink are returned by Hypertext object and - are the means by which end users and clients interact with linked - content. - - Hyperlink instances DO NOT neccessarily implement the Accessible interface. - */ - interface HyperLink { - /* The number of separate anchors associated with this Hyperlink. */ - read property int32 NAnchors; - - /* - The starting offset within the contianing Hypertext, - with which this Hyperlink is associated. - */ - read property int32 StartIndex; - - /* - The ending offset within the containing Hypertext with which - this Hyperlink is associated. - */ - read property int32 EndIndex; - - /* - Gets the i'th object associated with a Hyperlink. - Objects returned should implement the Action interface. - */ - method GetObject { - int32 index; - } reply { - Reference anchor; - } - - /* - Obtain a resource locator, URI, which can be used to access the content - which this link points to. - */ - method GetUri { - int32 index; - } reply { - string uri; - } - - /* - Check the hyperlink to see if a connection to its backing content can be - established or if its URI is valid. - */ - method IsValid reply { - boolean valid; - } - } - - /* - An interface used for objects which implement linking between multiple resource locations. - A hypertext instance is associated with one or more hyperlinks which are associated with - particular offests within the text. - */ - interface Hypertext { - - method GetNLinks reply { - int32 n_links; - } - - method GetLink { - int32 index; - } reply { - Reference hyperlink; - } - - /* - Get the hyperlink index, if any, associated with a particular text offset. - */ - method GetLinkIndex { - int32 offset; - } reply { - /* -1 if no hyperlink is associated. */ - int32 index; - } - } -} diff --git a/idl/image.didl b/idl/image.didl deleted file mode 100644 index 9dee626..0000000 --- a/idl/image.didl +++ /dev/null @@ -1,33 +0,0 @@ - -/* - An interface implemented by objects which render image data or - pictoral information on to the screen. -*/ -interface org.freestandards.atspi.Image { - /* A textual description of what is visually depicted on the screen. */ - read property string ImageDescription; - - /* A string corresponding to the local used by the image description. */ - read property string ImageLocale; - - /* Obtain a bounding box which entirely contains the image contents. */ - method GetImageExtents { - CoordType coord_type; - } reply { - BoundingBox; - } - - /* Get the coordinates of the image on the screen */ - method GetImagePosition { - CoordType coord_type; - } reply { - int32 x; - int32 y; - } - - /* Get the size of the current on-screen view of the image. */ - method GetImageSize reply { - int32 width; - int32 height; - } -} diff --git a/idl/listener.didl b/idl/listener.didl deleted file mode 100644 index 7e3f6a1..0000000 --- a/idl/listener.didl +++ /dev/null @@ -1,9 +0,0 @@ - -interface org.freestandards.atspi.DeviceEventListener { - - method NotifyEvent { - DeviceEvent event; - } reply { - boolean success; - } -} diff --git a/idl/selection.didl b/idl/selection.didl deleted file mode 100644 index 66fbef7..0000000 --- a/idl/selection.didl +++ /dev/null @@ -1,54 +0,0 @@ - -/* - An interface which indicates that an object exposes a 'selection' model, - allowing the 'selection' of one or more of its children. -*/ -interface org.freestandards.atspi.Selection { - /* The number of children that are currently selected. */ - read property int32 NSelectedChildren; - - /* Gets the ith SELECTED child. This is different to the index of all children. */ - method GetSelectedChild { - int32 index; - } reply { - Reference child; - } - - /* Select the child, add it to the list of selected children. */ - method SelectChild { - int32 index; - } reply { - boolean success; - } - - /* Deselect a child. The index refers to the index into the list of selected children. */ - method DeselectSelectedChild { - int32 index; - } reply { - boolean success; - } - - /* Determine whether a particular child is currently selected. */ - method IsChildSelected { - int32 index; - } reply { - boolean selected; - } - - /* Apptemt to select all of the containers children. */ - method SelectAll reply { - boolean success; - } - - /* Attempt to deselect all selected children. */ - method ClearSelection reply { - boolean success; - } - - /* Deselect a child. The index refers to the index into the list of all children. */ - method DeselectChild { - int32 index; - } reply { - boolean success; - } -} diff --git a/idl/socket.didl b/idl/socket.didl deleted file mode 100644 index 336ca6c..0000000 --- a/idl/socket.didl +++ /dev/null @@ -1,31 +0,0 @@ - -namespace org.freestandards.atspi { - /* - Accessible objects with the socket interface are capable of embeding other - accessible heirarchies as one of their children. This allows - applications to embed themselves in the heirarchy of the desktop object. - */ - interface Socket { - method Embed { - Reference plug; - } reply { - Reference socket; - } - - method Unembed { - Reference plug; - } - - /* - The available signal indicates that a socket has been - made available, it is for discovering new sockets. - This is used for when the process containing the desktop - object is re-started. - - D-Bus bus name must have been granted by the D-Bus bus. - It is used to identify the new socket. - */ - signal Available { - Reference socket; - } -} diff --git a/idl/table.didl b/idl/table.didl deleted file mode 100644 index ae1b8f0..0000000 --- a/idl/table.didl +++ /dev/null @@ -1,186 +0,0 @@ - -namespace org.freestandards.atspi { - - /* - An interface used by containers whose data is arranged in a tabular form. - Objects within tables are always children of the table object. - */ - interface Table { - read property int32 NRows; - - read property int32 NColumns; - - read property Reference caption; - - read property Reference summary; - - /* Number of rows where all cells are selected. */ - read property int32 NSelectedRows; - - /* Number of columns where all cells are selected. */ - read property int32 NSelectedColumns; - - method GetAccessibleAt { - int32 row; - int32 column; - } reply { - Reference cell; - } - - /* - Cells in a table are also children of the table in the standard heirarchy. - This method gets the child index of the given cell. - */ - method GetIndexAt { - int32 row; - int32 column; - } reply { - int32 index; - } - - /* - Indicates which row the child specified by index is on. - */ - method GetRowAtIndex { - int32 index; - } reply { - int32 row; - } - - /* - Indicates which column the child specified by index is on. - */ - method GetColumnAtIndex { - int32 index; - } reply { - int32 column; - } - - /* - Get a textual description of a row. - */ - method GetRowDescription { - int32 row; - } reply { - string description; - } - - /* - Get a textual description of a particular column. - */ - method GetColumnDescription { - int32 column; - } reply { - string description; - } - - /* - Get the number of rows spanned by the table cell at the specific row and column. - method GetRowExtentAt { - int32 row; - int32 column; - } reply { - int32 rowspan; - } - - /* - Get the number of columns spanned by the table cell at the specific row and column. - */ - method GetColumnExtentAt { - int32 row; - int32 column; - } reply { - int32 column_span; - } - - /* - Get the header object associated with a particular table row. - */ - method GetRowHeader { - int32 row; - } reply { - Reference header; - } - - /* - Get the header object associated with a particular table column. - */ - method GetColumnHeader { - int32 column; - } reply { - Reference header; - } - - /* - Obtain the indicies of all rows which are currently selected. - */ - method GetSelectedRows reply { - int32 indicies []; - } - - /* - Obtain the indicies of all columns which are currently selected. - */ - method GetSelectedColumns reply { - int32 indicies []; - } - - method IsRowSelected { - int32 row; - } reply { - boolean selected; - } - - method IsColumnSelected { - int32 column; - } reply { - boolean selected; - } - - method IsSelected { - int32 row; - int32 column; - } reply { - boolean selected; - } - - method AddRowSelection { - int32 row; - } reply { - boolean success; - } - - method AddColumnSelection { - int32 column; - } reply { - boolean success; - } - - method RemoveRowSelection { - int32 row; - } reply { - boolean success; - } - - method RemoveColumnSelection { - int32 column; - } reply { - boolean success; - } - - /* - Given a child index determine the row and column indicies and extents - and whether the cell is currently selected. - */ - method GetRowColumnExtentsAtIndex { - int32 index; - } reply { - boolean valid; - int32 row; - int32 column; - int32 row_span; - int32 column_span; - boolean selected; - } - } -} diff --git a/idl/text.didl b/idl/text.didl deleted file mode 100644 index 07ce85e..0000000 --- a/idl/text.didl +++ /dev/null @@ -1,311 +0,0 @@ - -namespace org.freestandards.atspi { - /* - The text interface should be implemented by objects which place textual information onscreen - as character strings or glyphs. The text interface allows access to textual content including - display attributes and semantic hints associated with runs of text, and to bounding boc information - for glyphs and substrings. It also alows portions of text to be selected, if the objects StateSet - includes STATE_SELECTABLE_TEXT. - */ - interface Text { - /* - Specified the boundary conditions determining a run of text - as returned from: - GetTextAtOffset - GetTextAfterOffset - GetTextBeforeOffset - */ - enum TextBoundaryType { - TEXT_BOUNDARY_CHAR, - TEXT_BOUNDARY_WORD_START, - TEXT_BOUNDARY_WORD_END, - TEXT_BOUNDARY_SENTENCE_START, - TEXT_BOUNDARY_SENTENCE_END, - TEXT_BOUNDARY_LINE_START, - TEXT_BOUNDARY_LINE_END - } - - enum TextClipType { - TEXT_CLIP_NONE, - TEXT_CLIP_MIN, - TEXT_CLIP_MAX, - TEXT_CLIP_BOTH - } - - /* - A structure used to define a contiguous range of text, including - its (unattributed) textual content. - */ - struct Range { - int32 start_offset; - int32 end_offset; - int32 content; - variant data; - } - - /* The total number of character in the text object including whitespace. */ - read property int32 CharacterCount; - - /* The current offset of the text caret in the Text object. */ - read property int32 CaretOffset; - - /* Move the text caret to a given position. */ - method SetCaretOffset { - int32 offset; - } reply { - boolean success; - } - - /* - Obtain the subset of text content that entirely precedes the given offset, - delimited by character word, line or sentente boundaries. - */ - method GetTextBeforeOffset { - int32 offset; - TextBoundaryType type; - } reply { - string s; - int32 start_offset; - int32 end_offset; - } - - /* - Obtain the subset of text content that includes the given offset, - delimited by character word, line or sentente boundaries. - */ - method GetTextAtOffset { - int32 offset; - TextBoundaryType type; - } reply { - string s; - int32 start_offset; - int32 end_offset; - } - - /* - Obtain the subset of text content that entirely follows the given offset, - delimited by character word, line or sentente boundaries. - */ - method GetTextAfterOffset { - int32 offset; - TextBoundaryType type; - } reply { - string s; - int32 start_offset; - int32 end_offset; - } - - method GetCharacterAtOffset { - int32 offset; - } reply { - /* UCS-4 representation of the character or 0 if offset out-of-range. */ - int32 c; - } - - /* - Get the value of a named attribute at a given offset. - */ - method GetAttributeValue { - int32 offset; - string attribute_key; - } reply { - string attribute_value; - } - - /* Deprecated in favor of GetAttributeRun. */ - method GetAttributes { - int32 offset; - } reply { - Attributes attributes; - int32 start_offset; - int32 end_offset; - } - - /* Deprecated in facor of GetDefaultAttributeSet. */ - method GetDefaultAttributes reply { - Attributes attributes; - } - - /* - Obtain a bounding box of the character glyph at a particular character offset, - in the given coordinate system. - */ - method GetCharacterExtents { - int32 offset; - CoordType coord; - } reply { - int32 x; - int32 y; - int32 width; - int32 height; - } - - /* - Get the offset of the character at a given on-screen coordinate. The coordinate - system used is determined by the give coordinate type. - */ - method GetOffsetAtPoint { - int32 x; - int32 y; - CoordType coord; - } reply { - /* -1 if the point is outside the bounds of any glyph. */ - int32 offset; - } - - /* - Obtain the number of separate, contiguous selections in the current Text object. - */ - method GetNSelections reply { - int32 n_selections; - } - - method GetSelection { - int32 selection_index; - } reply { - int32 start_offset; - int32 end_offset; - } - - method AddSelection { - int32 start_offset; - int32 end_offset; - } reply { - boolean success; - } - - method RemoveSelection { - int32 selection_index; - } reply { - boolean success; - } - - method SetSelection { - int32 selection_index; - int32 start_offset; - int32 end_offset; - } reply { - boolean success; - } - - /* - Obtain the bounding box which entirely contains the given text range. - Negative values may be obtained in the event that part of the text range is - off-screen. - */ - method GetRangeExtents { - int32 start_offset; - int32 end_offset; - CoordType coord; - } reply { - int32 x; - int32 y; - int32 width; - int32 height; - } - - /* - Return the text content within a bounding box. - - Depending on the clip type glyphs which are clipped by the bounding box - may, or may not be inclide in the ranges returned. - */ - method GetBoundedRanges { - int32 x; - int32 y; - int32 width; - int32 height; - CoordType coord; - ClipType x_clip; - ClipType y_clip; - } reply { - RangeType ranges []; - } - - /* - Gets the attributes of a particular text objects defined at a given offset. - The attributes are invariant over the offsets returned. - */ - method GetAttributeRun { - int32 offset; - boolean include_defaults; - } reply { - Attributes attributes; - int32 start_offset; - int32 end_offset; - } - - /* - Gets the default attributes that apply to the entire text. - */ - method GetAttributeSet reply { - Attributes attributes' - } - } - - /* - All objects supporting EditableText should also support the - Text interface. - - Provides methods for modifying textual content of components which support editing. - EditableText also interacts with the system clipboard. - */ - interface EditableText { - /* - Replace the text contents with a new string, discarding the old contents. - */ - method SetTextContents { - string new_contents; - } reply { - boolean success; - } - - /* - Insert new text contents into a given location. - */ - method InsertText { - int32 position; - string text; - int32 length; - } reply { - boolean success; - } - - /* - Copy a range of text in to the system clipboard. - */ - method CopyText { - int32 start_pos; - int32 end_pos; - } - - /* - Excise a range of text, copying it to the system clipboard. - */ - method CutText { - int32 start_pos; - int32 end_pos; - } reply { - boolean success; - } - - /* - Excise a range of text from the object without copying to the system clipboard. - */ - method DeleteText { - int32 start_pos; - int32 end_pos; - } reply { - boolean success; - } - - /* - Copy the contents of the system clip-board in to the text object. - */ - method PasteText { - int32 position; - } reply { - boolean success; - } - } -} diff --git a/idl/types.didl b/idl/types.didl deleted file mode 100644 index b8c4129..0000000 --- a/idl/types.didl +++ /dev/null @@ -1,25 +0,0 @@ -/* - Type definitions needed by multiple interfaces. -*/ - -namespace org.freestandards.atspi { - - /* - A connection independent reference to a D-Bus object. - - The D-Bus object that is referenced will support at-least - the org.freestandards.atspi.Accessible interface. - */ - struct Reference { - /* The D-Bus connection name where the object resides. */ - string name; - /* The D-Bus path of the object. */ - object path; - } - - /* - Attributes are weakly typed properties of an object consisting of string-string - key-value pairs. - */ - typedef Attributes dict ; -} diff --git a/idl/value.didl b/idl/value.didl deleted file mode 100644 index 476cb43..0000000 --- a/idl/value.didl +++ /dev/null @@ -1,15 +0,0 @@ - -/* - An interface supporting a one-dimensional scalar quantity - to be modified, or which reflects a scalar value. - */ -interface org.freestandards.atspi.Value { - - read property double MinimumValue; - - read property double MaximumValue; - - read property double MinimumIncrement; - - read property double currentValue; -} diff --git a/meson.build b/meson.build index 351b207..0a2f75e 100644 --- a/meson.build +++ b/meson.build @@ -1,12 +1,12 @@ project('at-spi2-core', 'c', - version: '2.31.1', + version: '2.34.0', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', 'warning_level=1', 'c_std=c99', ], - meson_version: '>= 0.40.1') + meson_version: '>= 0.50.0') add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_DEFAULT_SOURCE' ], language: 'c') @@ -52,10 +52,16 @@ libdbus_dep = dependency('dbus-1', version: libdbus_req_version) glib_dep = dependency('glib-2.0', version: glib_req_version) gobject_dep = dependency('gobject-2.0', version: gobject_req_version) gio_dep = dependency('gio-2.0', version: gio_req_version) -dl_dep = cc.find_library('dl', required: false) +if cc.has_function('dlopen') + dl_dep = [] +elif cc.has_function('dlopen', args: '-ldl') + dl_dep = cc.find_library('dl') +else + error('Could not find a library with the dlopen function') +endif x11_deps = [] -x11_option = get_option('enable-x11') +x11_option = get_option('x11') if x11_option != 'no' x11_dep = dependency('x11', required: false) @@ -96,7 +102,7 @@ at_spi_conf.set('ALIGNOF_DBIND_STRUCT', cc.alignment('dbind_struct', prefix: 'ty # introspection support have_gir = false -introspection_option = get_option('enable-introspection') +introspection_option = get_option('introspection') if introspection_option != 'no' gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: false) @@ -117,7 +123,7 @@ subdir('bus') subdir('registryd') subdir('test') -if get_option('enable_docs') +if get_option('docs') subdir('doc/libatspi') endif diff --git a/meson_options.txt b/meson_options.txt index f8ec862..c8d5fd1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -19,11 +19,17 @@ option('systemd_user_dir', description: 'Location of the systemd user services', type: 'string', value: 'default') -option('enable_docs', +option('docs', description: 'Generate API reference for atspi (requires GTK-Doc)', type: 'boolean', value: false) - -option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable GObject Introspection (depends on GObject)') - -option('enable-x11', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable X11 support') +option('introspection', + description: 'Enable GObject Introspection (depends on GObject)', + type: 'combo', + choices: ['yes', 'no', 'auto'], + value: 'auto') +option('x11', + description: 'Enable X11 support', + type: 'combo', + choices: ['yes', 'no', 'auto'], + value: 'auto') diff --git a/registryd/de-marshaller.c b/registryd/de-marshaller.c index fef8e48..2f212b0 100644 --- a/registryd/de-marshaller.c +++ b/registryd/de-marshaller.c @@ -5,19 +5,19 @@ * Copyright 2008 Novell, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/registryd/de-marshaller.h b/registryd/de-marshaller.h index 9d55a9d..93eaa42 100644 --- a/registryd/de-marshaller.h +++ b/registryd/de-marshaller.h @@ -7,19 +7,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_DE_MARSHALLER_H_ diff --git a/registryd/de-types.h b/registryd/de-types.h index f08823c..ea05dda 100644 --- a/registryd/de-types.h +++ b/registryd/de-types.h @@ -7,19 +7,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_DE_TYPES_H_ diff --git a/registryd/deviceeventcontroller-x11.c b/registryd/deviceeventcontroller-x11.c index e5b8dfc..df16bd8 100644 --- a/registryd/deviceeventcontroller-x11.c +++ b/registryd/deviceeventcontroller-x11.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* deviceeventcontroller-x11.c: X-specific DeviceEventController support */ @@ -140,6 +140,14 @@ keysym_mod_mask (KeySym keysym, KeyCode keycode) (sym_rtn == keysym)) { retval = Mod3Mask; } + else if (XkbLookupKeySym (display, keycode, Mod4Mask, &mods_rtn, &sym_rtn) && + (sym_rtn == keysym)) { + retval = Mod4Mask; + } + else if (XkbLookupKeySym (display, keycode, Mod5Mask, &mods_rtn, &sym_rtn) && + (sym_rtn == keysym)) { + retval = Mod5Mask; + } else if (XkbLookupKeySym (display, keycode, ShiftMask | Mod2Mask, &mods_rtn, &sym_rtn) && (sym_rtn == keysym)) { @@ -155,6 +163,11 @@ keysym_mod_mask (KeySym keysym, KeyCode keycode) (sym_rtn == keysym)) { retval = (Mod4Mask | ShiftMask); } + else if (XkbLookupKeySym (display, keycode, + ShiftMask | Mod5Mask, &mods_rtn, &sym_rtn) && + (sym_rtn == keysym)) { + retval = (Mod5Mask | ShiftMask); + } else retval = 0xFFFF; return retval; diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index 4e25ad6..acd089b 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /* deviceeventcontroller.c: implement the DeviceEventController interface */ @@ -1856,7 +1856,7 @@ spi_device_event_controller_class_init (SpiDEControllerClass *klass) object_class->finalize = spi_device_event_controller_object_finalize; #ifdef HAVE_X11 - if (g_getenv ("DISPLAY")) + if (g_getenv ("DISPLAY") != NULL && g_getenv ("WAYLAND_DISPLAY") == NULL) spi_dec_setup_x11 (klass); else #endif diff --git a/registryd/deviceeventcontroller.h b/registryd/deviceeventcontroller.h index 0c6eee4..94c01cf 100644 --- a/registryd/deviceeventcontroller.h +++ b/registryd/deviceeventcontroller.h @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_DEVICE_EVENT_CONTROLLER_H_ diff --git a/registryd/display.c b/registryd/display.c index 2ba781c..011f294 100644 --- a/registryd/display.c +++ b/registryd/display.c @@ -5,19 +5,19 @@ * Copyright 2009 Nokia. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/registryd/display.h b/registryd/display.h index 2238a55..6d53e7b 100644 --- a/registryd/display.h +++ b/registryd/display.h @@ -5,19 +5,19 @@ * Copyright 2009 Nokia. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_DISPLAY_H_ diff --git a/registryd/event-source.c b/registryd/event-source.c index 9ad3ec5..e82908a 100644 --- a/registryd/event-source.c +++ b/registryd/event-source.c @@ -5,19 +5,19 @@ * Copyright 2009 Nokia. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/registryd/event-source.h b/registryd/event-source.h index 55ab663..ad080f7 100644 --- a/registryd/event-source.h +++ b/registryd/event-source.h @@ -5,19 +5,19 @@ * Copyright 2009 Nokia. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_EVENT_SOURCE_H_ diff --git a/registryd/keymasks.h b/registryd/keymasks.h index 4e838b8..9f6c2c9 100644 --- a/registryd/keymasks.h +++ b/registryd/keymasks.h @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_KEYMASKS_H_ diff --git a/registryd/meson.build b/registryd/meson.build index eb8236e..c2404d2 100644 --- a/registryd/meson.build +++ b/registryd/meson.build @@ -16,7 +16,7 @@ registryd_deps = [ dl_dep, ] -x11_option = get_option('enable-x11') +x11_option = get_option('x11') if x11_option != 'no' if x11_dep.found() registryd_sources += [ diff --git a/registryd/paths.h b/registryd/paths.h index 918df67..a505222 100644 --- a/registryd/paths.h +++ b/registryd/paths.h @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_PATHS_H_ diff --git a/registryd/reentrant-list.c b/registryd/reentrant-list.c index 7f9a716..2c08c42 100644 --- a/registryd/reentrant-list.c +++ b/registryd/reentrant-list.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/registryd/reentrant-list.h b/registryd/reentrant-list.h index 901561b..e124156 100644 --- a/registryd/reentrant-list.h +++ b/registryd/reentrant-list.h @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef REENTRANT_LIST_H_ diff --git a/registryd/registry-main.c b/registryd/registry-main.c index d8b5dc5..be01d2c 100644 --- a/registryd/registry-main.c +++ b/registryd/registry-main.c @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/registryd/registry.c b/registryd/registry.c index cbf0c1b..8d35f8e 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -7,19 +7,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #include diff --git a/registryd/registry.h b/registryd/registry.h index 16dd0d9..19b1a8f 100644 --- a/registryd/registry.h +++ b/registryd/registry.h @@ -6,19 +6,19 @@ * Copyright 2001, 2002 Ximian, Inc. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public + * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. */ #ifndef SPI_REGISTRY_H_ diff --git a/xml/Accessible.xml b/xml/Accessible.xml index 9240882..7015466 100644 --- a/xml/Accessible.xml +++ b/xml/Accessible.xml @@ -14,6 +14,8 @@ + + diff --git a/xml/Text.xml b/xml/Text.xml index 320ee5e..313131e 100644 --- a/xml/Text.xml +++ b/xml/Text.xml @@ -152,5 +152,19 @@ + + + + + + + + + + + + + + -- 2.7.4 From 9c835f23328edff530c15aa1cffa0acc85f227ce Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 14 Feb 2020 17:24:14 +0900 Subject: [PATCH 15/16] atspi-misc: Prevent memory leak of main_loop pointer atspi_main_loop is generated with g_main_loop_new The loop ends and a memory leak occurs. Call unref on atspi_main_loop to prevent leaks. Change-Id: If8158f0113bf3eb31ff7b2558c835a92219a40d2 --- atspi/atspi-misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c index a7efb66..84c15df 100644 --- a/atspi/atspi-misc.c +++ b/atspi/atspi-misc.c @@ -971,6 +971,7 @@ atspi_event_main (void) { atspi_main_loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (atspi_main_loop); + g_main_loop_unref(atspi_main_loop); atspi_main_loop = NULL; } -- 2.7.4 From 970af5587f5e247cc4991f0c2679aa0e7dbda874 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Fri, 14 Feb 2020 11:28:41 +0100 Subject: [PATCH 16/16] Fix upstream in .gbs.conf Change-Id: Ia07c670b92bffc0e0d3ba0f7630ce8b88f5db8f1 --- .gbs.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gbs.conf b/.gbs.conf index 00a849f..99e7cc8 100644 --- a/.gbs.conf +++ b/.gbs.conf @@ -1,2 +1,3 @@ [general] -upstream_tag = AT_SPI2_CORE_2_16_0 +upstream_branch = upstream +upstream_tag = upstream/${upstreamversion} -- 2.7.4