Add initial prototype.
This commit is contained in:
21
4-high/gel/applet/demo/hello_gel/hello_sdl_gel.gpr
Normal file
21
4-high/gel/applet/demo/hello_gel/hello_sdl_gel.gpr
Normal file
@@ -0,0 +1,21 @@
|
||||
with
|
||||
"gel",
|
||||
"lace_shared";
|
||||
|
||||
project Hello_SDL_GEL
|
||||
is
|
||||
for Object_Dir use "build";
|
||||
for Exec_Dir use ".";
|
||||
for Main use ("launch_hello_gel.adb");
|
||||
for Languages use ("Ada");
|
||||
|
||||
package Ide renames Lace_shared.Ide;
|
||||
package Builder renames Lace_shared.Builder;
|
||||
package Compiler renames Lace_shared.Compiler;
|
||||
package Binder renames Lace_shared.Binder;
|
||||
|
||||
package Linker is
|
||||
for Default_Switches ("ada") use ("-lGL");
|
||||
end Linker;
|
||||
|
||||
end Hello_SDL_GEL;
|
||||
35
4-high/gel/applet/demo/hello_gel/launch_hello_gel.adb
Normal file
35
4-high/gel/applet/demo/hello_gel/launch_hello_gel.adb
Normal file
@@ -0,0 +1,35 @@
|
||||
with
|
||||
gel.Applet.gui_world,
|
||||
gel.Forge,
|
||||
gel.Window.setup,
|
||||
|
||||
ada.Text_IO,
|
||||
ada.Exceptions;
|
||||
|
||||
pragma unreferenced (gel.Window.setup);
|
||||
|
||||
|
||||
procedure launch_hello_GEL
|
||||
--
|
||||
-- Opens a GEL window.
|
||||
--
|
||||
is
|
||||
use gel.Applet.gui_world,
|
||||
ada.Text_IO;
|
||||
|
||||
the_Applet : gel.Applet.gui_World.view := gel.Forge.new_gui_Applet ("Hello GEL");
|
||||
|
||||
begin
|
||||
while the_Applet.is_open
|
||||
loop
|
||||
the_Applet.gui_World.evolve; -- Evolve the world.
|
||||
the_Applet.freshen; -- Handle any new events and update the screen.
|
||||
end loop;
|
||||
|
||||
free (the_Applet);
|
||||
|
||||
exception
|
||||
when E : others =>
|
||||
put_Line ("Exception in Environment task");
|
||||
put_Line (ada.Exceptions.Exception_Information (E));
|
||||
end launch_hello_GEL;
|
||||
Reference in New Issue
Block a user