I just like to tell you that i made my second release of Ada-Bindings to Motif
and X window publicly available for noncommercial use on the stuttgart
university ftp server:
Developed with GNAT on linux, I tested it as well with GNAT on IRIX 5.2 and
I include here the README for this binding:
Ada->Motif/X Binding Version 0.2
Hello all folks somewhere on our little planet. Here is the second release
of just another Ada Binding to routines from the Motif and X Windows
libraries. The goal was to make especially Motif routines, but also X Toolkit
and Xlib routines available for the Ada-Programmer. The emphasis lies on Motif,
X Toolkit and X routines are only added for further functionality.
Therefore Motif routines are nearly completely supported, X Toolkit by a lesser
extent and Xlib routines where necessary (that is, only a few of them).
It was not the goal to completely present the whole X/Intrinsics/Motif range of
functions, at least not at the moment.
I chose the version number 0.x to indicate that I reckon with loads of errors
in the code and I expect a long and stony way until version 1.0.
There is much of discussion on how to build a binding to routines originally
written in C. Some people prefer a "thin" binding, trying to convert C
as direct as possible to Ada. The advantage of such a kind of binding is, that
the programmer who already knows the C names easily uses the Ada pendants, and
that the binding produces only a little overhead. Disadvantages are that the
control functions of Ada don't work and that Ada programming style can't be
Others use a "thick" binding to connect C library functions to Ada. They try
to use as much as possible of the specific Ada advantages, giving the Ada
programmer a total Ada view of the routines, but producing a large overhead,
therefore increasing file size and reducing speed.
I tried to create a "medium" binding: On one hand the Names of the routines
left nearly untouched, on the other hand it was tried to only use Ada types
in the specification part of the packages (i.e. no Ada.Interface.* type)
It was hand-written, needed a huge amount of spare time (about 2 years, because
my main task is not computing, but analysing fluid flows in turbines), but
seems to me now complete and stable enough to be widely used and experimented
with (at least I hope so).
The binding was tested to run on (the examples run there):
o Linux on i86 (Linux 2.*, where it was mainly developed)
o Solaris 2.4 / Sun OS 5.4
o IRIX 5.2
using the GNAT-Compiler (at the moment I use GNAT 3.07, GNAT 3.01 doesn't
earlier releases of GNAT weren't tested with the binding in the present state).
I hope I didn't use any GNAT-specific functions, so that the binding should be
usable with every Ada95 compiler. The Makefiles are for GNAT!
Motif Versions 1.2* and 2.0 and X11 releases 5 and 6 should work. Please
read INSTALL for choosing Motif and X releases.
Please send me not only bug reports, but also comments on my approach to
As X-Windows is normally NOT THREAD-SAFE it has to be ensured that Ada uses
only one single task for X-Windows. This blocking can be realized e.g. by using
a protected type;
Therefore I included in this release a package named X_lib.Tasking from the
Intermetrics Ada-Binding (named there X.Tasking) which provides for such a
See the copyright-notice and notes for usage in this package.
The use of the package is shown especially in the example programs "xmclock"
Burgfelder Str. 6
e-mail: [log in to unmask]
Read the copyright notice!
Hans-Frieder Vogt e-mail: [log in to unmask]
Institut f"ur Luftfahrtantriebe tel : +49 (711) 685-3522
der Universit"at Stuttgart