mage_0.6.1_e5032cff/src/mage-apps-simple_loop.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
with Ada.Real_Time;
with Mage.Draw;

generic
   Window : Draw.Window_ID;
   Period : Ada.Real_Time.Time_Span;
   with procedure Run_Once (Canvas : Draw.Canvas_ID) is <>;
   with procedure Init (Canvas : Draw.Canvas_ID) is null;
   --  Custom initialization related to canvas, before starting
   --  the loop
package Mage.Apps.Simple_Loop is
   --  Initialize the canvas, then loop on the given loop procedure,
   --  and with the given period

   Canvas : Draw.Canvas_ID;
   Next : Ada.Real_Time.Time;

   procedure Run;

end Mage.Apps.Simple_Loop;