On 26/02/15 13:51, Dhairyashil Bhosale
wrote:
First, it is not at-spi-1.0 vs at-spi-2.0. For example at-spi2-2.0 behaviour at the beginning was basically the same that at-spi1.0. Enable accessibility is something somewhat more broader. Unfortunately there is not a single answer for your question. How to enable (if needed) accessibility depends on the distro that you are using. During all this years, there were different ways to enable the accessibility support. One is the environment variable you mention, and there was also the gsetting "toolkit-accessibility". You can check this one like this: gsettings get org.gnome.desktop.interface "toolkit-accessibility" With a several recent-enough-distro, it would be enough to just set that gsetting to true. But in any case, you should be able to enable accessibility using the universal access settings dialog. If you want a distro-independent answer, this is how it works on GNOME upstream: * Since 2012 accessibility is enabled on default. So for gtk3, gnome-shell and others, accessibility (so at-spi2) is always enabled. You don't need to do anything. * Old applications, mostly using gtk2, are still affected by toolkit-accessibility gsetting. Rationale and some extra details on this email [1].
You are in the wrong side of the application. libatspi is the client server side library, used to write AT applications like Orca. Or in other words, libatspi is just used to get the info. Your approach would be valid if you want to write a screen reader using Java, that as far as I see, is not what you intend. You would need to explore the server side (more below).
Again, libatspi is the client side library. It is already implemented, in order to get info from the accessibility APIs. So their purpose is writing ATs, not to expose the applications
Take a look to java-atk-wrapper: https://git.gnome.org/browse/java-atk-wrapper This library wraps Java applications (using JNI and all that stuff), exposing it as another ATK implementation (like those available on gtk, clutter, etc). Then it uses the server side library at-spi2-atk to expose the information using at-spi2 APIs. So instead of starting from scratch in order to make java applications accessible, probably it would be better if you collaborate with an already started module. Best regards [1] https://mail.gnome.org/archives/desktop-devel-list/2012-June/msg00035.html -- Alejandro Piñeiro (apinheiro igalia com) |