GtkAda: a complete Ada graphical toolkit

Our latest release

GtkAda 2.18.0 can now be downloaded directly from the GNAT GPL download area, in the tools/gtkada section.

Access to the latest snapshot using SVN

The GtkAda repository is accessible read-only by anonymous SVN. Note that you should only use the GtkAda SVN tree if you know what you are doing and if using a development version (with possible instabilities) does not frighten you. To check it out:

 svn checkout http://svn.eu.adacore.com/anonsvn/Dev/trunk/GtkAda
 

You can also browse the repository directly.

If you would like to contribute, send your patches (contextual or unified diffs) and we will work with you on integrating them. If you have already contributed and would like write access to the tree, please contact us.

Introduction to Gtk+ and GtkAda

What is Gtk+?

Gtk+ is a wonderful graphic toolkit written in C for X-Window and Win32 that was originally developed as the basis for the gimp.

What is GtkAda?

GtkAda is an Ada graphical toolkit based on Gtk+, providing the complete set of Gtk+ widgets using the Object-Oriented features of this language. GtkAda supports the latest 2.18 stable releases.

Although this is not an obligation, we would really appreciate to hear from any new application using this toolkit. We will publish a list on this page. Hopefully, this will bring new people to this wonderful language that Ada is.

Status of this toolkit

Implementation rationale

This toolkit tries to map almost all the functions found in gtk and gdk. This is a thick binding, which means that while the functions are mapped on an almost one-to-one basis (a given Ada function is actually mapped to a single C function in most cases), we also tried to add a strong typing mechanism, which is one of the strongest feature of Ada. We are also now providing new features such as dynamic Glade support. The callbacks are mapped as generic packages which try to provide type safety. Along with this toolkit, you will find a lot of examples on how to use it. You will also find a few screenshots below.

Online Documentation

Contributing

We would also definitively appreciate any contribution or bug report from you. We will try to include them whenever possible, but since this project is done on our free time, we can’t promise to do anything within ten minutes following your mail. It will take us at least 15 minutes.

Screenshots

You will find lots of screenshots at the gtk web site. Here are a few extracted from our re-implementation of the testgtk program and the editor example.

Compatibility

We have been able to test GtkAda 2.18.x it on the following machines. Please let us know if you can use it/port it to other machines. As far as we know, it should work on every target supported by both Gnat and Gtk.

  • GNU/Linux x86, ia64, x86-64
  • Solaris sparc, x86
  • Mac OS X x86-64
  • FreeBSD x86
  • Windows XP/Vista

Related Web Sites

The following are some useful related web sites:

Applications using GtkAda

More and more applications are being developed using GtkAda. This includes both commercial and non-commercial projects. Let us know if you have heard of any available application that you think should be included here. Here is a list of some of these applications.

  • GPS, the GNAT Programming Studio is a powerful integrated development environment.
  • Gate is the GtkAda translator that generates human readable code from the Glade GUI builder XML files.
  • Dgate is a GtkAda testing tool that uses the dynamic XML loading capabilities of GtkAda.
  • Gdialog is a simple utility that provides an easy way to display dialog boxes from shell scripts.
  • Ada Source Library Browser is a browser for Ada source Libraries based on unit names instead of file names. Illustrates use of aflex, gnat library packages, GtkAda in a platform independant fashion.
  • PowerGNU is a simple presentation viewer that comes as an example of GtkAda and gdk-pixbuf in the GtkAda sources.
  • Adabill is a very promising project in development, that needs new developers. It is fully developed in Ada and GtkAda, and uses PostgreSQL as a database.
  • Scala is a powerful software tool for experimentation with musical tunings.
  • DTraq, an Ada 95 data logging and interactive review and playback tool.
  • Mine Detector is an intellectually challenging game. Unlike other mine-finding games, Mine Detector never requires guessing.
  • Glosa is a vocabulary builder to aid you in learning new languages faster and more accurately.
  • Win_IO is a set of packages for simple graphical input and output.
  • AdaOthello is the classic reversi game written in Ada.
  • Zephyr Basecamp is a GPL application that would allow small and midsize businesses the same level of inventory, order entry, sales tracking and accounting functionality as would be expected from commercial applications.
  • Cheddar provides services to automatically check temporal constraints of real-time tasks.
  • Linxtris, a Tetris clone written in Ada.

Authors

This toolkit has been written by:

  • Emmanuel Briot (briot at adacore.com)
  • Joel Brobecker (broecker at adacore.com)
  • Arnaud Charlet (charlet at adacore.com)
  • Nicolas Setton (setton at adacore.com)

and is maintained and supported by AdaCore.

Please report any problem (and patch) directly to the gtkada list if you are not supported. If you are a supported user, please send reports to report@adacore.com. If you are interested in becoming a supported GtkAda user, you should send an email to sales@adacore.com.

Note that the gtkada list is now a regular mailing list. If you want to subscribe, simply click here and follow the instructions, or send a “subscribe” request to gtkada-request.

You can also visit the GtkAda archives.

Contributors

Some persons have been really helpful in testing GtkAda and providing patches, or at least detailled bug reports whenever they have a problem. We are most definitely thankful to them. Keep up the good work guys !

  • Alex Bykat who helped us compile GtkAda 0.2 on Solaris 2.5.
  • Jeff Creem who did the first port of GtkAda to Win32. Note that the Win32 port of GtkAda is now handled by the GtkAda team.
  • Philippe Durif who wrote the first version of the GtkAda documentation.
  • Samuel Tardieu who wrote the man pages of GtkAda for the debian project.
  • Francisco Javier Loma Daza who sent us some useful patches for gtk-style and gtk-table.
  • Paul Pukite who sent us the Gdk.RGB package.
  • Thomas Brupbacher who implemented Glade’s support for Clist, List, Paned, Vscrollbar and Viewport, a basic support for XML attributes and various other bug fixes.
  • Bobby D. Bryant who fixed the handling of comments in Glib.XML.
  • Manuel Op de Coul who has contributed some documentation.
  • Aidan Skinner who has contributed some patches to the Gnome binding.
  • Preben Randhol who has contributed several patches, in particular for porting gate to glade-2.
  • Vadim Godunko for his implementation of custom Tree models.

If we forgot you let us know and we will add you to this list.