aboutsummaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala')
-rw-r--r--vala/hello-world/.gitignore1
-rw-r--r--vala/hello-world/HelloWorld.vala17
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