comp.lang.ada
 help / color / mirror / Atom feed
* gtkada and timeouts
@ 2011-04-01  8:09 tonyg
  2011-04-01  8:27 ` Dmitry A. Kazakov
  2011-04-01  8:50 ` Julian Leyh
  0 siblings, 2 replies; 7+ messages in thread
From: tonyg @ 2011-04-01  8:09 UTC (permalink / raw)



I've written a function called update_screen which always returns a
value of true and sets various values in the 'main_screen' access
record. This is part of the code from glade/gate which I have modified
to include a timeout

with Gtk; use Gtk;
with Gtk; use Gtk;
with Gtk.Main; use Gtk.Main;
with Gtk.Widget; use Gtk.Widget;
with Main_Screen_Pkg; use Main_Screen_Pkg;
with Main_Control; use Main_Control;
procedure Main_Screen is
   Main_Screen : Main_Screen_Access;
        Timeout_Id : Timeout_Handler_id ;
   package Data_Timeout is new Gtk.Main.Timeout (Main_Screen_Access);

begin
   Gtk.Main.Set_Locale;
   Gtk.Main.Init;
   Gtk_New (Main_Screen);
   Show_All (Main_Screen);
   Gtk.Main.Main;
   -- my addition -- the timer
   Timeout_Id := Data_Timeout.Add (100, Update_Screen'Access,
Main_Screen);

end Main_Screen;

Sadly the timeout is never called, Can anyone cast some light on this?



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-02  8:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-01  8:09 gtkada and timeouts tonyg
2011-04-01  8:27 ` Dmitry A. Kazakov
2011-04-01  9:15   ` tonyg
2011-04-01  9:53     ` tonyg
2011-04-01  8:50 ` Julian Leyh
2011-04-02  1:37   ` Randy Brukardt
2011-04-02  8:21     ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox