From aecbbeb18be7529ab7facb09a6b275954643bbe8 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 26 Feb 2026 13:38:16 +0100 Subject: Add a Vala ‘hello world’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vala/hello-world/.gitignore | 1 + vala/hello-world/HelloWorld.vala | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 vala/hello-world/.gitignore create mode 100644 vala/hello-world/HelloWorld.vala (limited to 'vala/hello-world') 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 -- cgit v1.2.3