[gtkada] GtkAda and tasking
Emmanuel Briot
briot at gnat.com
Fri Apr 21 14:24:07 CEST 2000
> Note that we don't actually need the protected type Event_Queue_Type;
> any type that can call Common_Event.Notify when an event occurs will
> do. So now the question is, can the Gtk event queue be made to call
> Common_Event.Notify? If there is a hook that is called for every
> event, that would work.
There is such a hook (not exactly a hook in fact, but quite similar).
See the function Gdk.Event.Event_Handler_Set (I am wondering if it was already
in the last public version or is only in the developpment version, anyway the
C function is gdk_event_handler_set).
With this, you can replace the default event_handler by your own function,
which should do the following:
- Modify the queue as you said in your message
- Process the event by calling Gtk.Main.Do_Event (E)
You might want to look at gtk-macro.adb (the code there is not finished, but
will give you an idea).
Emmanuel
More information about the gtkada
mailing list