java-gnome 4.0.10 (5 Mar 2009)
Sculptures made of letters
This release is a landmark, because it features coverage of the Pango text rendering library and so, along with our coverage of Cairo, brings us to a complete solution for drawing graphics with text — be they custom Widgets, PDF documents, or beautiful vector illustrations.
In addition to merging Pango work from numerous contributors, we have made massive improvements to our Cairo coverage, support for writing PDFs, and better access to the system Clipboard.
Drawing API improvements
We’ve done a huge amount of refinement to our APIs for the ever fabulous Cairo Graphics drawing library, including full coverage of matrix translations, rotations, and scaling and more integrated ways of setting the source pattern to be used in stroke, paint, and fill operations. Thanks to Kenneth Prugh for having seen this through and having done the lion’s share of the testing.
We’ve also had a number of improvements in the lower levels of GTK relating to image rendering. The gdk-pixbuf library contains a capable image parser and we can now feed it directly from a Pixbuf constructor. Thanks to new contributor Martin Garton for his hard work getting that tested and accepted.
Drawing graphics often also requires drawing text. This release features coverage of Pango, GNOME’s powerful text rendering library. Pango is not just about drawing mere glyphs; it also includes a sophisticated paragraph layout engine which gives us a capable solution for drawing text onto Cairo Surfaces.
Thanks are due to Serkan Kaba and Kenneth Prugh have both been really helpful testing; it was Vreixo Formoso who did the original leg work in April that identified Layout as the key class that we needed to concentrate on and cleaned up much of the underlying infrastructure.
As we were working on this we had occasion to continue the polish in and around the TextView / TextBuffer APIs, including a number of convenience methods for inserting text while simultaneously applying multiple TextTags, and supporting changing default fonts.
We’ve also modelled “notify signals” for when a property changes; see the
TextBuffer.NotifyCursorPosition signal for this in action.
Finally, thanks to contributions from Zak Fenton and Kamil Szymala we have
support for applications running in composited window managers to have
transparent backgrounds — which is an exceptionally cool effect, even if it
doesn’t have much to do with creating HIG compliant usable applications
Handling cut & paste
The GTK clipboard APIs are fairly complex, in no small part because the underlying implementations in X are really rather complex. Our coverage here in java-gnome is still fairly basic relative to that, but it’s been enough for people working on applications like text editors to write text to the system clipboard, get notification when the clipboard changes, and read text back out again.
Printed document support
The work on Pango noted above represented the essential machinery necessary to
make effective use of Cairo’s PDF backend, and this has started us down the
road of covering the GNOME printing APIs. You can now generate
Thanks to Nathan Strum for permission to use one of his sketches in the example (you might find reading the blog where we found this interesting — it’s a fascinating exposé of a graphic artist in action).
Thanks to new contributor Stefan Schweizer we now have better coverage of signals relating to Notebook style Containers, and to new contributors Miloud Bel and Bruno Dusausoy for numerous small improvements in and around ProgressBar.
Miscellaneous documentation improvements and minor feature improvements always feature in our releases, with minor changes having accrued in many classes.
Just as important as new coverage is getting rid of cruft that we don’t need.
Libraries like GTK and GDK are, like any other mature project, full of
deprecated, obsolete, and unnecessary code — not to mention things that we
just plain don’t need in a Java binding of these underlying native libraries.
We’re already pretty good about not generating translation Java or JNI C code
for such things; this release continues our refinements in this area with a
considerable refinement of the
.so which is ultimately what we
Finally, it’s worth noting that java-gnome’s test suite is now 40 unit test classes with 186 individual test fixtures. Combined with over 30 screenshot generating programs and 17 example programs, we actually have surprisingly good test coverage of our library. It’s high time they — and more to the point the people who work hard to create such tests — got as much credit as the visible public APIs do.
Anyone can run the tests (and anyone wanting to submit a patch had better run the tests!); they’ve been accumulating since java-gnome 4.0.0; it’s just:
$ make test
$ make doc
If you’re working in Eclipse launch class
UnitTests as a JUnit test suite.
We have some fixes from new contributor Przemysław Grzegorczyk ensuring we include the correct headers in a few corner cases. This came to us via work on a GNOME Love bug, which is a first for us. Thanks!
Meanwhile, the ever industrious Serkan Kaba has added some changes to ensure that our magically locating the native shared library component of java-gnome works properly even under strange and unusual conditions.
Configuration and prerequisite detection on Open Solaris is improved thanks to reports from new contributor Kamil Szymala.
Instructions for how to optimally lay out your branches when working with
java-gnome have been moved to the
HACKING file. People
intending to hack on the bindings from Eclipse are really urged to set
things up this way as it will make their lives much easier. Also, using the
latest release of Bazaar (ie
bzr >= 1.12) is definitely recommended — it’s
getting really fast. We’ve upgraded our public branches, so you will need
1.9 at a minimum.
Note to those creating packages for distributions: java-gnome now depends on
the current stable GTK (ie
gtk+ >= 2.14).
Coverage of Poppler, GNOME’s PDF rendering library is well along, but didn’t quite make it in time for this release. It could very likely feature in the next version of java-gnome, as might coverage of GConf, GNOME’s simple store for application configuration options. People are also known to be working on coverage of GtkSourceView, libwnck, and librsvg. We’ll see what gets contributed!
The most exciting part about java-gnome at the moment, though, is the number of people working hard on applications using it. It takes a long time to write a mature, well rounded, robust end-user program, but there are some pretty cool projects ticking away out there, and it has been terrific to see the authors of these projects joining our community.
You can download java-gnome from
ftp.gnome.org or easily checkout a branch from ‘
mainline‘ using Bazaar:
$ bzr checkout bzr://research.operationaldynamics.com/bzr/java-gnome/mainline java-gnome
though if you’re going to do that you’d best follow the