8 let window = Window.create `TOPLEVEL
10 let button = Button.create label:"Hello World"
13 GtkSignal.connect sig:Widget.Signals.Event.delete window
14 callback:(fun _ -> prerr_endline "Delete event occured"; true);
15 GtkSignal.connect sig:Object.Signals.destroy window callback:Main.quit;
16 Container.set_border_width window 10;
17 GtkSignal.connect sig:Button.Signals.clicked button
18 callback:(fun () -> prerr_endline "Hello World"; Object.destroy window);
19 Container.add window button;
20 Widget.show_all window;
23 let _ = Printexc.print main ()