diff options
Diffstat (limited to 'vala/hello-world/HelloWorld.vala')
| -rw-r--r-- | vala/hello-world/HelloWorld.vala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vala/hello-world/HelloWorld.vala b/vala/hello-world/HelloWorld.vala new file mode 100644 index 0000000..5a206cf --- /dev/null +++ b/vala/hello-world/HelloWorld.vala @@ -0,0 +1,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); + } +}
\ No newline at end of file |