Window creation/X11: Difference between revisions

add Ada
({{omit from|PARI/GP}})
(add Ada)
Line 1:
{{task|GUI}}{{requires|Graphics}}
Create a simple X11 application, using an X11 protocol library such as Xlib or XCB, that draws a box and "Hello World" in a window. Implementations of this task should ''avoid using a toolkit'' as much as possible.
 
=={{header|Ada}}==
{{works with|GNAT}}
{{libheader|GtkAda}}
 
window.adb:
<lang Ada>with Gtk.Main;
with Gtk.Window;
 
procedure Window is
The_Window : Gtk.Window.Gtk_Window;
begin
Gtk.Main.Init;
Gtk.Window.Gtk_New (Window => The_Window);
Gtk.Window.Show (Widget => The_Window);
Gtk.Main.Main;
end Window;</lang>
 
{{libheader|Lumen}}
 
window.adb:
<lang Ada>with Lumen.Window;
 
procedure Window is
The_Window : Lumen.Window.Handle;
begin
Lumen.Window.Create (Win => The_Window);
Delay 5; -- usually you enter main loop here
end Window;</lang>
 
=={{header|ALGOL 68}}==
Line 18 ⟶ 47:
close (window)</lang>
{{omit from|AutoHotkey}}
 
 
 
=={{header|C}}==
256

edits