[gtkada] GtkAda and tasking

Robin, Stephe, or Nora leakstan at erols.com
Fri Apr 21 16:22:06 CEST 2000


Event_Handler_Set is not in GtkAda 1.3.5.

However, I don't think this does what is needed. It allows you to change how an
event is handled, but only _after_ it has been dequeued. We need a way to 
find out when an event is _enqueued_. This is done by the OS, as part of keyboard,
mouse, ethernet, etc handling.

-- Stephe

-----Original Message-----
From:	Emmanuel Briot [SMTP:briot at gnat.com]
Sent:	Friday, April 21, 2000 7:24 AM
To:	gtkada at gtkada.eu.org
Subject:	RE: [gtkada] GtkAda and tasking

 > 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


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







More information about the gtkada mailing list