added glade icons
[libprolooks.git] / prolooks / VuMeterDemo.vala
blob6820cad507e1ab00002bcd55e76f90b74a6ea6ae
1 /*
2 Copyright 2009 by Hans Baier
3 License: LGPLv2+
4 */
6 using Gtk;
8 namespace Prolooks {
10 private VuMeter widget;
12 bool animate() {
13 double val = GLib.Random.next_double();
14 widget.value = val;
15 return true;
18 static int main (string[] args) {
19 Gtk.init (ref args);
20 var window = new Window (WindowType.TOPLEVEL);
21 widget = new VuMeter ();
23 GLib.Timeout.add(100, animate);
24 window.add (widget);
25 window.destroy += Gtk.main_quit;
26 window.show_all ();
27 Gtk.main ();
28 return 0;
32 } // namespace Prolooks