/* mainwindow.vala * * Copyright (C) 2008 Sam Liddicott * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see . * * Author: * Sam Liddicott */ using GLib; using Gtk; public class GladeValaDemoWindow : GladeValaDemo { construct { /* can't derive this text automatically yet */ this.connect_signals("glade_vala_demo_window_"); } [CCode (instance_pos = -1)] public void on_button1_clicked(Gtk.Widget widget) { stdout.printf("You clicked it\n"); this.widgets.label.label="You clicked it"; } [CCode (instance_pos = -1)] public void on_GladeValaDemo_destroy (Gtk.Widget widget) { stdout.printf ("Destroying!\n"); Gtk.main_quit (); } public static int main (string[] args) { Gtk.init (ref args); var sample = new GladeValaDemoWindow (); Gtk.main (); return 0; } }