[gtkada] Gtk and threading and couple of questions

Hal V. Engel hvengel at astound.net
Sat Oct 7 20:27:04 CEST 2006


On Saturday 07 October 2006 00:51, Petr Holub wrote:
> Dear listers,
>
> I have a couple of questions:
>
> 1) Is there some way to check if Gdk.Threads.{Enter,Leave} lock
>    is held (by current or given thread)?
>
> 2) Is somebody working on having GtkAda thread-safe? I know about
>    Dmitry's Gtk.Main.Router, but it would be great to have the
>    binding itself ensuring thread-safeness, given the parallel
>    nature of Ada...
>
> 3) Is anybody working on QT bindings for Ada (I know it's not
>    the ideal list to pose this question)? There is a thread-safe
>    version of QT and QT4 further boosts the threading support.
>
> Thanks a lot,
> Petr

You will find QT3 binding here http://www.websamba.com/guibuilder/ but there 
is no uic or moc to Ada functionality at this point so you can't use designer 
(yet).

There is also another individual working on QT4 bindings.  Here is a forum 
thread about this:

http://archives.devshed.com/forums/programming-132/qt4ada-qt-for-ada-1915874.html

In addition is might be possible to use swig to implement Ada QT since swing 
is in the process of having both a generic Ada and a gnat specific Ada module 
implemented.  Once this is working it might even be possible to use swig to 
implement Ada to uic and moc functionality into the build process.  This 
would allow the use of designer which makes UI design and maintenance much 
simpler.  There is a forum thread about this here:

 http://sourceforge.net/mailarchive/message.php?msg_id=33047210 

I use QT for c++ projects and I like it a lot.  QT is at its core object 
oriented and using designer it is possible to decouple the UI design from the 
code that implements application specific functionality which greatly 
facilitates maintenance and reliability.   I think if there was an Ada 
binding and good uic and moc functionality that it would make an excellent 
widget library for Ada programmers.

And Petr is correct QT is thread safe and has been for some time now.  Also 
the swig and QT4 efforts both started mid 2006 and I am sure that both of the 
individuals working on these would be more than willing to accept help from 
others interested in these efforts.  My feeling is the the swig effort has 
more generality and once in place could be used to implement a full set of 
Ada QT functionality with minimal effort.  In addition it could be used to 
implement Ada bindings to a wide range of existing libraries which would be a 
very useful thing for everyone working with Ada.

Hal



More information about the gtkada mailing list