vala test + some build environment

This commit is contained in:
Jesko Dujmovic 2020-04-10 17:50:14 +02:00
parent bd86bab978
commit 29cfcd5e7a
4 changed files with 32 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
target/*

3
build.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/sh
COMMIT=$(git rev-parse HEAD | head --bytes 8)
valac --pkg gtk+-3.0 --output target/${COMMIT}_scribble src/scribble.vala

27
src/scribble.vala Normal file
View File

@ -0,0 +1,27 @@
using Gtk;
int main (string[] args) {
Gtk.init (ref args);
var window = new Window ();
window.title = "First GTK+ Program";
window.border_width = 10;
window.window_position = WindowPosition.CENTER;
window.set_default_size (350, 70);
window.destroy.connect (Gtk.main_quit);
var button = new Button.with_label ("Click me!");
var stylus = new GestureStylus (window);
stylus.proximity.connect(callback_a);
window.add (button);
window.show_all ();
Gtk.main ();
return 0;
}
void callback_a () {
stdout.printf ("Callback A\n");
}