* @ATSPI_ROLE_FRAME object may still be the active window.
* @ATSPI_RELATION_PARENT_WINDOW_OF: This is the reciprocal relation to
* @ATSPI_RELATION_POPUP_FOR.
- * @ATSPI_RELATION_DESCRIPTION_FOR: Indicates that an object provides
- * descriptive information about another object; more verbose than
- * @ATSPI_RELATION_LABEL_FOR.
- * @ATSPI_RELATION_DESCRIBED_BY: Indicates that another object provides
- * descriptive information about this object; more verbose than
- * @ATSPI_RELATION_LABELLED_BY.
+ * @ATSPI_RELATION_DESCRIBED_BY: Reciprocal of %ATSPI_RELATION_DESCRIPTION_FOR.
+ * Indicates that one or more target objects provide descriptive information
+ * about this object. This relation type is most appropriate for information
+ * that is not essential as its presentation may be user-configurable and/or
+ * limited to an on-demand mechanism such as an assistive technology command.
+ * For brief, essential information such as can be found in a widget's on-screen
+ * label, use %ATSPI_RELATION_LABELLED_BY. For an on-screen error message, use
+ * %ATSPI_RELATION_ERROR_MESSAGE. For lengthy extended descriptive information
+ * contained in an on-screen object, consider using %ATSPI_RELATION_DETAILS as
+ * assistive technologies may provide a means for the user to navigate to
+ * objects containing detailed descriptions so that their content can be more
+ * closely reviewed.
+ * @ATSPI_RELATION_DESCRIPTION_FOR: Reciprocal of %ATSPI_RELATION_DESCRIBED_BY.
+ * Indicates that this object provides descriptive information about the target
+ * object(s). See also %ATSPI_RELATION_DETAILS_FOR and %ATSPI_RELATION_ERROR_FOR.
+ * @ATSPI_RELATION_DETAILS: Reciprocal of %ATSPI_RELATION_DETAILS_FOR. Indicates
+ * that this object has a detailed or extended description, the contents of
+ * which can be found in the target object(s). This relation type is most
+ * appropriate for information that is sufficiently lengthy as to make
+ * navigation to the container of that information desirable. For less verbose
+ * information suitable for announcement only, see %ATSPI_RELATION_DESCRIBED_BY.
+ * If the detailed information describes an error condition,
+ * %ATSPI_RELATION_ERROR_FOR should be used instead. @Since: 2.26.
+ * @ATSPI_RELATION_DETAILS_FOR: Reciprocal of %ATSPI_RELATION_DETAILS. Indicates
+ * that this object provides a detailed or extended description about the target
+ * object(s). See also %ATSPI_RELATION_DESCRIPTION_FOR and
+ * %ATSPI_RELATION_ERROR_FOR. @Since: 2.26.
+ * @ATSPI_RELATION_ERROR_MESSAGE: Reciprocal of %ATSPI_RELATION_ERROR_FOR.
+ * Indicates that this object has one or more errors, the nature of which is
+ * described in the contents of the target object(s). Objects that have this
+ * relation type should also contain %ATSPI_STATE_INVALID_ENTRY in their
+ * #AtspiStateSet. @Since: 2.26.
+ * @ATSPI_RELATION_ERROR_FOR: Reciprocal of %ATSPI_RELATION_ERROR_MESSAGE.
+ * Indicates that this object contains an error message describing an invalid
+ * condition in the target object(s). @Since: 2.26.
* @ATSPI_RELATION_LAST_DEFINED: Do not use as a parameter value, used to
- * determine the size of the enumeration.
+ * determine the size of the enumeration.
*
- * #AtspiRelationType specifies a relationship between objects
+ * #AtspiRelationType specifies a relationship between objects
* (possibly one-to-many
* or many-to-one) outside of the normal parent/child hierarchical
* relationship. It allows better semantic identification of how objects
*
* One higher than the highest valid value of #AtspiRole.
*/
- #define ATSPI_ROLE_COUNT (121+1)
+ #define ATSPI_ROLE_COUNT (125+1)
+/**
+ * AtspiMoveOutedType: The type of signal that occurs when an object outted the screen.
+ * @ATSPI_MOVE_OUTED_TOP_LEFT: Object has outted top or left of the screen.
+ * @ATSPI_MOVE_OUTED_BOTTOM_RIGHT: Object has outted bottom or right of the screen.
+ **/
+
+typedef enum {
+ ATSPI_MOVE_OUTED_NULL,
+ ATSPI_MOVE_OUTED_TOP_LEFT,
+ ATSPI_MOVE_OUTED_BOTTOM_RIGHT,
+ ATSPI_MOVE_OUTED_LAST_DEFINDED
+} AtspiMoveOutedType;
+
+/**
+ * ATSPI_MOVE_OUTED_COUNT:
+ *
+ * One higher than the highest valid value of #AtspiScreenOuttedType.
+ **/
+#define ATSPI_MOVE_OUTED_COUNT (3+1)
+
typedef enum
{
ATSPI_CACHE_NONE = 0,
if (!value)
{
g_warning ("AT-SPI: Attempt to set unknown state '%s'", name);
+ return;
}
-
- if (enabled)
- set->states |= ((gint64)1 << value->value);
else
- set->states &= ~((gint64)1 << value->value);
+ if (enabled)
+ set->states |= ((gint64)1 << value->value);
+ else
+ set->states &= ~((gint64)1 << value->value);
g_type_class_unref (type_class);
}
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)
+at_spi_bus_launcher_CFLAGS = $(GIO_CFLAGS) $(APPSVC_CFLAGS) $(VCONF_CFLAGS) $(AUL_CFLAGS) -fPIE
- at_spi_bus_launcher_LDADD = $(GIO_LIBS) $(X_LIBS) $(APPSVC_LIBS) $(VCONF_LIBS) $(AUL_LIBS)
++at_spi_bus_launcher_LDADD = $(GIO_LIBS) $(X11_LIBS) $(APPSVC_LIBS) $(VCONF_LIBS) $(AUL_LIBS)
+at_spi_bus_launcher_LDFLAGS = -pie
+ substitutions = "s,@libexecdir[@],$(libexecdir),"
+
default_sessiondir = $(sysconfdir)/xdg/autostart
default_session_DATA = at-spi-dbus-bus.desktop
-
- substitutions = "s,@libexecdir[@],$(libexecdir),"
at-spi-dbus-bus.desktop: at-spi-dbus-bus.desktop.in
- sed -e$ $(substitutions) $< > $@.tmp && mv $@.tmp $@
- EXTRA_DIST = 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)
+ dbusservicedir = $(DBUS_SERVICES_DIR)
dbusservice_DATA = org.a11y.Bus.service
-
org.a11y.Bus.service: org.a11y.Bus.service.in
- sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+ $(AM_V_GEN) $(SED) -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
- accessibility.conf: accessibility.conf.in
- sed -e "s|[@]DATADIR[@]|$(datadir)|" $(srcdir)/$@.in > $@
+ 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 += org.a11y.Bus.service.in \
- accessibility.conf.in
+ 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 > $@
- DISTCLEANFILES = org.a11y.Bus.service \
- accessibility.conf
+ EXTRA_DIST += accessibility.conf.in
+ CLEANFILES += accessibility.conf
-include $(top_srcdir)/git.mk
GSettings *a11y_schema;
GSettings *interface_schema;
+ A11yBusClient screen_reader;
+ A11yBusClient universal_switch;
+
+ GDBusProxy *client_proxy;
+
A11yBusState state;
+
/* -1 == error, 0 == pending, > 0 == running */
int a11y_bus_pid;
char *a11y_bus_address;
if (app->a11y_bus_pid != 0)
return FALSE;
- argv[1] = g_strdup_printf ("--config-file=%s/at-spi2/accessibility.conf", SYSCONFDIR);
+ 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;
++ argv[1] = (char*)config_path;
if (pipe (app->pipefd) < 0)
g_error ("Failed to create pipe: %s", strerror (errno));
}
#endif
- if (argv[1]) g_free(argv[1]);
-
return TRUE;
-
+
error:
- if (argv[1]) g_free(argv[1]);
close (app->pipefd[0]);
close (app->pipefd[1]);
app->state = A11Y_BUS_STATE_ERROR;
handle_screen_reader_enabled_change (_global_app, new_val, FALSE);
}
- static gboolean register_client(A11yBusClient *client)
+static int
+_process_dead_tracker (int pid, void *data)
+{
+ A11yBusLauncher *app = data;
+
+ if (app->screen_reader.pid > 0 && pid == app->screen_reader.pid)
+ {
+ LOGE("screen reader is dead, pid: %d, restarting", pid);
+ app->screen_reader.pid = 0;
+ g_timeout_add_seconds (2, _launch_process_repeat_until_success, &app->screen_reader);
+ }
+
+ if (app->universal_switch.pid > 0 && pid == app->universal_switch.pid)
+ {
+ LOGE("universal switch is dead, pid: %d, restarting", pid);
+ app->universal_switch.pid = 0;
+ g_timeout_add_seconds (2, _launch_process_repeat_until_success, &app->universal_switch);
+ }
+ return 0;
+}
+
+static void
+_register_process_dead_tracker ()
+{
+ if(_global_app->screen_reader.pid > 0 || _global_app->universal_switch.pid > 0) {
+ LOGD("registering process dead tracker");
+ aul_listen_app_dead_signal(_process_dead_tracker, _global_app);
+ } else {
+ LOGD("unregistering process dead tracker");
+ aul_listen_app_dead_signal(NULL, NULL);
+ }
+}
+
+
+static gboolean
+_launch_client(A11yBusClient *client, gboolean by_vconf_change)
+{
+ LOGD("Launching %s", client->name);
+
+ bundle *kb = NULL;
+ gboolean ret = FALSE;
+
+ kb = bundle_create();
+
+ if (kb == NULL)
+ {
+ LOGD("Can't create bundle");
+ return FALSE;
+ }
+
+ if (by_vconf_change)
+ {
+ if (bundle_add_str(kb, "by_vconf_change", "yes") != BUNDLE_ERROR_NONE)
+ {
+ LOGD("Can't add information to bundle");
+ }
+ }
+
+ int operation_error = appsvc_set_operation(kb, client->app_control_operation);
+ LOGD("appsvc_set_operation: %i", operation_error);
+
+ client->pid = appsvc_run_service(kb, 0, NULL, NULL);
+
+ if (client->pid > 0)
+ {
+ LOGD("Process launched with pid: %i", client->pid);
+ _register_process_dead_tracker();
+ ret = TRUE;
+ }
+ else
+ {
+ LOGD("Can't start %s - error code: %i", client->name, client->pid);
+ }
+
+ bundle_free(kb);
+ return ret;
+}
+
+static gboolean
+_launch_process_repeat_until_success(gpointer user_data) {
+ A11yBusClient *client = user_data;
+
+ if (client->launch_repeats > 100 || client->pid > 0)
+ {
+ //do not try anymore
+ return FALSE;
+ }
+
+ gboolean ret = _launch_client(client, FALSE);
+
+ if (ret)
+ {
+ //we managed to
+ client->launch_repeats = 0;
+ return FALSE;
+ }
+ client->launch_repeats++;
+ //try again
+ return TRUE;
+}
+
+static gboolean
+_terminate_process(int pid)
+{
+ int ret;
+ int ret_aul;
+ if (pid <= 0)
+ return FALSE;
+
+ int status = aul_app_get_status_bypid(pid);
+
+ if (status < 0)
+ {
+ LOGD("App with pid %d already terminated", pid);
+ return TRUE;
+ }
+
+ LOGD("terminate process with pid %d", pid);
+ ret_aul = aul_terminate_pid(pid);
+ if (ret_aul >= 0)
+ {
+ LOGD("Terminating with aul_terminate_pid: return is %d", ret_aul);
+ return TRUE;
+ }
+ else
+ LOGD("aul_terminate_pid failed: return is %d", ret_aul);
+
+ LOGD("Unable to terminate process using aul api. Sending SIGTERM signal");
+ ret = kill(pid, SIGTERM);
+ if (!ret)
+ {
+ return TRUE;
+ }
+
+ LOGD("Unable to terminate process: %d with api or signal.", pid);
+ return FALSE;
+}
+
+static gboolean
+_terminate_client(A11yBusClient *client)
+{
+ LOGD("Terminating %s", client->name);
+ int pid = client->pid;
+ client->pid = 0;
+ _register_process_dead_tracker();
+ gboolean ret = _terminate_process(pid);
+ return ret;
+}
+
+void vconf_client_cb(keynode_t *node, void *user_data)
+{
+ A11yBusClient *client = user_data;
+ int client_needed = vconf_keynode_get_bool(node);
+ LOGD("vconf_keynode_get_bool(node): %i", client_needed);
+ if (client_needed < 0)
+ return;
+
+ //check if process really exists (e.g didn't crash)
+ if (client->pid > 0)
+ {
+ int err = kill(client->pid,0);
+ //process doesn't exist
+ if (err == ESRCH)
+ client->pid = 0;
+ }
+
+ LOGD("client_needed: %i, client->pid: %i", client_needed, client->pid);
+ if (!client_needed && (client->pid > 0))
+ _terminate_client(client);
+ else if (client_needed && (client->pid <= 0))
+ _launch_client(client, TRUE);
+}
+
+
++static gboolean register_executable(A11yBusClient *client)
+{
+ gboolean client_needed = FALSE;
+
+ if(!client->vconf_key) {
+ LOGE("Vconf_key missing for client: %s \n", client->vconf_key);
+ return FALSE;
+ }
+
+ int ret = vconf_get_bool(client->vconf_key, &client_needed);
+ if (ret != 0)
+ {
+ LOGD("Could not read %s key value.\n", client->vconf_key);
+ return FALSE;
+ }
+ ret = vconf_notify_key_changed(client->vconf_key, vconf_client_cb, client);
+ if(ret != 0)
+ {
+ LOGD("Could not add information level callback\n");
+ return FALSE;
+ }
+
+ if (client_needed)
+ g_timeout_add_seconds(2,_launch_process_repeat_until_success, client);
+ return TRUE;
+}
+
int
main (int argc,
char **argv)
_global_app,
NULL);
- register_client (&_global_app->screen_reader);
- register_client (&_global_app->universal_switch);
++ register_executable (&_global_app->screen_reader);
++ register_executable (&_global_app->universal_switch);
+
g_main_loop_run (_global_app->loop);
if (_global_app->a11y_bus_pid > 0)
--- /dev/null
- Version: 2.16.1
+%bcond_with x
+
+Name: at-spi2-core
- Source: http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.16/%{name}-%{version}.tar.xz
++Version: 2.26.1
+Release: 0
+Summary: Assistive Technology Service Provider Interface - D-Bus based implementation
+License: LGPL-2.0+
+Group: System/Libraries
+Url: http://www.gnome.org/
- %config %{_sysconfdir}/at-spi2/accessibility.conf
++Source: http://ftp.gnome.org/pub/GNOME/sources/at-spi2-core/2.26/%{name}-%{version}.tar.xz
+Source1001: %{name}.manifest
+Requires: dbus
+BuildRequires: python-devel
+BuildRequires: python-xml
+BuildRequires: intltool
+BuildRequires: dbus-devel
+BuildRequires: glib2-devel
+BuildRequires: gettext
+BuildRequires: gtk-doc
+%if %{with x}
+BuildRequires: libX11-devel
+BuildRequires: libXtst-devel
+BuildRequires: libXi-devel
+%endif
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(appsvc)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(aul)
++BuildRequires: gobject-introspection
+
+%description
+AT-SPI is a general interface for applications to make use of the
+accessibility toolkit. This version is based on dbus.
+
+This package contains the AT-SPI registry daemon. It provides a
+mechanism for all assistive technologies to discover and interact
+with applications running on the desktop.
+
+%package -n libatspi0
+Summary: An Accessibility ToolKit -- Library
+Group: System/Libraries
+
+%description -n libatspi0
+AT-SPI is a general interface for applications to make use of the
+accessibility toolkit. This version is based on dbus.
+
+%package -n typelib-1_0-Atspi-2_0
+Summary: An Accessibility ToolKit -- Introspection bindings
+Group: System/Libraries
+
+%description -n typelib-1_0-Atspi-2_0
+AT-SPI is a general interface for applications to make use of the
+accessibility toolkit. This version is based on dbus.
+
+This package provides the GObject Introspection bindings for the
+libatspi library.
+
+%package devel
+Summary: Include Files and Libraries mandatory for Development
+Group: Development/Libraries
+Requires: %{name} = %{version}
+Requires: libatspi0 = %{version}
+Requires: typelib-1_0-Atspi-2_0 = %{version}
+
+%description devel
+This package contains all necessary include files and libraries needed
+to develop applications that require these.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+
+%build
+%autogen --libexecdir=%{_libexecdir}/at-spi2 \
+ --with-dbus-daemondir=%{_bindir} \
+%if !%{with x}
+ --disable-x11 \
+%endif
+ --disable-static
+%__make %{?_smp_flags}
+
+%install
+rm -rf %{buildroot}
+find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f
+
+%make_install
+%find_lang %{name}
+
+%clean
+rm -fr %{buildroot}
+
+%post -n libatspi0 -p /sbin/ldconfig
+
+%postun -n libatspi0 -p /sbin/ldconfig
+
+%files -f %{name}.lang
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_bindir}/at_spi2_tool
+
+%doc AUTHORS README
+%license COPYING
+%{_libexecdir}/at-spi2/at-spi-bus-launcher
+%{_libexecdir}/at-spi2/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)
+%{_libdir}/libatspi.so.0*
+
+%files -n typelib-1_0-Atspi-2_0
+%manifest %{name}.manifest
+%defattr(-, root, root)
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_includedir}/at-spi-2.0
+%{_libdir}/libatspi.so
+%{_libdir}/pkgconfig/atspi-2.pc
+ EXTRA_DIST = \
+ meson.build
+
libexec_PROGRAMS = at-spi2-registryd
+at_spi2_registryd_LDFLAGS = -pie
at_spi2_registryd_CFLAGS = \
+ -fPIE \
$(GLIB_CFLAGS) \
$(GIO_CFLAGS) \
- $(DBUS_CFLAGS) \
+ $(DBUS_CFLAGS) \
$(GOBJ_CFLAGS) \
$(ATK_CFLAGS) \
+ $(X11_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/atspi \
[D-BUS Service]
Name=org.a11y.atspi.Registry
- Exec=@LIBEXECDIR@/at-spi2-registryd
-Exec=@libexecdir@/at-spi2-registryd --use-gnome-session
++Exec=@libexecdir@/at-spi2-registryd
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 =
+memory_LDFLAGS =
+
-include $(top_srcdir)/git.mk
+
+ EXTRA_DIST = meson.build