bingada_1.0.0_a25771e2/src/bingada.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
with Gtk.Main;
with Q_Bingada;

with Ada.Directories;
with Ada.Environment_Variables;

procedure Bingada is

begin

   -- Set current directory to the APPDIR value path. In this way we
   -- allow running from an AppImage and still find the resource files.
   --
   if Ada.Environment_Variables.Exists ("APPDIR") then
      Ada.Directories.Set_Directory
        (Ada.Environment_Variables.Value ("APPDIR"));
   end if;

   Gtk.Main.Init;

   Q_Bingada.P_Create_Widgets;

   -- All GTK applications must have a Gtk.Main.Main. Control ends here
   -- and waits for an event to occur (like a key press or a mouse event),
   -- until Gtk.Main.Main_Quit is called.
   Gtk.Main.Main;

end Bingada;