From 29cfcd5e7a6e80e0b37202123df54eadfb75e66a Mon Sep 17 00:00:00 2001 From: Jesko Dujmovic Date: Fri, 10 Apr 2020 17:50:14 +0200 Subject: [PATCH] vala test + some build environment --- .gitignore | 1 + README.md | 2 +- build.sh | 3 +++ src/scribble.vala | 27 +++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 build.sh create mode 100644 src/scribble.vala diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8b241f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/* \ No newline at end of file diff --git a/README.md b/README.md index 71a0924..9ed5fe3 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ A free touch screen note taking application. Support for Linux. If this project We try to provide a similarly great user experience as stylus write does, but improving the user interface and keeping the project FOSS. -Though the required features are notetaking and touch gestures, annotating PDFs and other features are planned. \ No newline at end of file +Though the required features are notetaking and touch gestures, annotating PDFs and other features are planned. diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..2ae23d3 --- /dev/null +++ b/build.sh @@ -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 \ No newline at end of file diff --git a/src/scribble.vala b/src/scribble.vala new file mode 100644 index 0000000..4d61f53 --- /dev/null +++ b/src/scribble.vala @@ -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"); +} \ No newline at end of file