Exemple #1
0
func main() {
	w := gtk.NewWindow(gtk.WINDOW_TOPLEVEL)
	w.Connect("delete-event", cbDelete, nil)
	w.Connect("destroy", cbDestroy, nil)
	w.SetBorderWidth(10)
	w.Show()

	a := A{"Hello World!\n"}

	b := gtk.NewButtonWithLabel("Hello World")
	b.Connect("clicked", (*A).Hello, &a)
	b.ConnectNoi("clicked", (*gtk.Widget).Destroy, w.AsWidget())
	w.Add(b.AsWidget())
	b.Show()

	gtk.Main()
}
Exemple #2
0
func (p *Player) Run() {
	gtk.Main()
}