#include #include G_MODULE_EXPORT void on_button1_clicked(GtkWidget *widget) { /* a handler referenced by the glade file. Must not be static * so that it appears in the global symbol table. */ printf("Click\n"); } G_MODULE_EXPORT void on_window1_destroy(GtkWidget *widget) { gtk_main_quit(); } int main(int argc, char **argv) { GladeXML *xml; GtkWidget *widget; gtk_init(&argc, &argv); xml = glade_xml_new("test2.glade", NULL, NULL); /* get a widget (useful if you want to change something) */ widget = glade_xml_get_widget(xml, "widgetname"); /* connect signal handlers */ glade_xml_signal_autoconnect(xml); gtk_main(); return 0; }