[gtkada] GtkAda and tasking

Robin, Stephe, or Nora leakstan at erols.com
Fri Apr 21 17:40:58 CEST 2000


The problem with calling Main_Exit is that the main loop is not resumed; I suspect
you will need to recreate all windows from scratch after that (if you exit the top-level
main loop).

It is a goal of Gtk to be platform independent. And Gtk should be able to do this
kind of thing. I suggested using Windex first, because it is easier to see what 
needs to be done, and easier to play with; it is Ada code all the way down to 
the OS calls, and uses Ada polymorphism for event handlers, rather than the more
complex (and powerful) Gtk mechanism. The intent was to figure out what user 
task rendezvous mechanism is appropriate; it always helps to have a working 
example.

I've been thinking about implementing something like this in Windex anyway;
if I get it working, I'll see if I can suggest a similar mechanism for Gtk.

Perhaps a better approach is to work on making Gdk_Event_Put thread-safe; 
it may be possible to obtain the appropriate lock?

-- Stephe

-----Original Message-----
From:	Jean-Pierre Rosen [SMTP:rosen.adalog at wanadoo.fr]
Sent:	Friday, April 21, 2000 9:28 AM
To:	gtkada at gtkada.eu.org
Subject:	Re: [gtkada] GtkAda and tasking

> Another solution (as JP Rosen suggested) is to somehow cause the main
> loop to break out so its thread can do a rendezvous, then continue.
I'm still searching along those lines. I tried to post a "hide" event, after
calling Main_Exit, and it worked (Main_Loop was exited), but the tasking
system seems to be completely jammed after that (a rendezvous is never
accepted???). Still trying to understand what happens...

> As a suggestion, if you can use a Win32 only approach for now, get
> Windex (http://www.erols.com/leakstan/Stephe/Ada/windex.html), modify
> the main loop as above (override Windex.Message_Loops.Run), and see if
> it really works for you. Then we can propose that as a model for how
> Gtk needs to work.
But I want the same program to run on Linux (that's the goal of Gtk, isn't
it ;-)...
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog at wanadoo.fr)
Visit Adalog's web site at http://pro.wanadoo.fr/adalog



_______________________________________________
gtkada mailing list
gtkada at gtkada.eu.org
http://gtkada.eu.org/cgi-bin/mailman/listinfo/gtkada






More information about the gtkada mailing list