README added; main_loop example added.
This commit is contained in:
parent
acfa130e92
commit
08abd67519
|
@ -0,0 +1 @@
|
||||||
|
First look at https://live.gnome.org/Vala/Examples
|
|
@ -0,0 +1,16 @@
|
||||||
|
void main() {
|
||||||
|
|
||||||
|
var loop = new MainLoop();
|
||||||
|
var time = new TimeoutSource(2000);
|
||||||
|
|
||||||
|
time.set_callback(() => {
|
||||||
|
stdout.printf("Time!\n");
|
||||||
|
loop.quit();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
time.attach(loop.get_context());
|
||||||
|
|
||||||
|
loop.run();
|
||||||
|
}
|
||||||
|
|
|
@ -6,3 +6,5 @@ valac --thread philosophers.vala
|
||||||
valac --thread async-queue-test.vala
|
valac --thread async-queue-test.vala
|
||||||
|
|
||||||
valac --pkg gio-2.0 dbus-demo-service.vala
|
valac --pkg gio-2.0 dbus-demo-service.vala
|
||||||
|
|
||||||
|
valac main_loop.vala
|
||||||
|
|
Loading…
Reference in New Issue