aboutsummaryrefslogtreecommitdiff
path: root/vala/hello-world/HelloWorld.vala
blob: 5a206cf3ba8b360d0a4f717bf520d32d2c37a0b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class HelloWorld : Gtk.Application {
	public HelloWorld() {
		Object(application_id: "com.example.App");
	}

	public override void activate() {
		var win = new Gtk.ApplicationWindow(this);
		var btn = new Gtk.Button.with_label("Hello World");
		btn.clicked.connect(win.close);
		win.child = btn;
		win.present();
	}

	public static int main(string[] args) {
		return new HelloWorld().run(args);
	}
}