Monday, 29 June 2015

Java ATK Wrapper: making use of ATK function pointers


Firstly, it was awesome to see GNOME give the java-atk-wrapper project a mention in a recent GSoC article! :D As for the project itself: Each of the ATK interfaces (apart from AtkWindow) has an associated structure of function pointers (which can be used to implement ATK interface methods as a wrapper functions, so over the past few weeks I have been creating the wrapper functions with the jaw_ prefix for java-atk-wrapper which I have identified. Some functions which got recently included to the wrapper's API are:
Where AtkObject is a base class and AtkAction, AtkTable, and AtkTableCell are interfaces. Java ATK interface methods are written in java classes in /org/GNOME/Accessibility. The jaw_ prefix functions which use the JNI specification to call java ATK java-atk-wrapper.jar class methods are organised in jni/src. "Class" signal handlers are written in AtkWrapper.c using the JNI specification so that they can be called by org.GNOME.Accessibility.AtkWrapper once the wrapper has been initialised with an accessible java application.

Testing and debugging java-atk-wrapper is particularly long winded and hazardous, so I have been exploring ways to improve on working practices and develop a more efficient system for testing patches too. I have also been updating the JavaAtkWrapper wiki page. Aside from all that, I have been doing a little tweaking to improve the java-atk-wrapper build, fixing a few bugs and I added a GSoC page (which still needs a bit of development!)

I suspect it might be worth adding some automated tests to check the wrapper functions with if there is some time for this. Last year, I used a gem called rspec to test wrapper functionality with FFTW, but at the moment with the wrapper, I mainly rely on Accerciser (or perhaps create a small pyatspi2 listener) for testing with SwingSet2 and Orca (I have added a few listener scripts to Alejandro's AT-SPI examples repository).

Please direct user support questions concerning the java-atk-wrapper  to gnome-accessibility-list and technical questions to gnome-accessibility-devel. All bugs are filed against Java ATK Wrapper in Bugzilla.