diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-02-26 13:38:16 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-02-26 13:38:16 +0100 |
| commit | aecbbeb18be7529ab7facb09a6b275954643bbe8 (patch) | |
| tree | 5e6334aeb2d5bffe17ba39ed2ca663cab82507c6 /vala | |
| parent | ebbaac3816c2bf60fce8c77cfb5b750ae912fc05 (diff) | |
Diffstat (limited to 'vala')
| -rw-r--r-- | vala/hello-world/.gitignore | 1 | ||||
| -rw-r--r-- | vala/hello-world/HelloWorld.vala | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/vala/hello-world/.gitignore b/vala/hello-world/.gitignore new file mode 100644 index 0000000..8970971 --- /dev/null +++ b/vala/hello-world/.gitignore @@ -0,0 +1 @@ +HelloWorld
\ No newline at end of file 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 |