# .require. mono # .compile-only. # .args. -c -pkg:gtk-sharp-2.0 """ All Gtk refs are qualified. """ class Program def main is shared Gtk.Application.init window = MainWindow() window.show Gtk.Application.run class MainWindow inherits Gtk.Window cue init base.init(Gtk.WindowType.Toplevel) .title = 'Main Window' listen .deleteEvent, ref .onDeleteEvent flags = Gtk.DialogFlags(DestroyWithParent, Modal) CobraCore.noOp(flags) def onDeleteEvent(sender as Object, args as Gtk.DeleteEventArgs) # The reference to "Object" must pick up the System one, not the Gtk one. Gtk.Application.quit args.retVal = true