demo/kitchen-sink/docs/vala.vala
raw| 1 | using Gtk; |
| 2 | |
| 3 | int main (string[] args) { |
| 4 | Gtk.init (ref args); |
| 5 | var foo = new MyFoo<string[](), MyBar<string, int>>(); |
| 6 | |
| 7 | var window = new Window(); |
| 8 | window.title = "Hello, World!"; |
| 9 | window.border_width = 10; |
| 10 | window.window_position = WindowPosition.CENTER; |
| 11 | window.set_default_size(350, 70); |
| 12 | window.destroy.connect(Gtk.main_quit); |
| 13 | |
| 14 | var label = new Label("Hello, World!"); |
| 15 | |
| 16 | window.add(label); |
| 17 | window.show_all(); |
| 18 | |
| 19 | Gtk.main(); |
| 20 | return 0; |
| 21 | } |