Skip to content

Instantly share code, notes, and snippets.

@richardlehane
Created August 5, 2010 02:53
Show Gist options
  • Save richardlehane/509154 to your computer and use it in GitHub Desktop.
Save richardlehane/509154 to your computer and use it in GitHub Desktop.
#include <gtk/gtk.h>
void on_destroy (GtkObject *object, gpointer user_data)
{
gtk_main_quit ();
}
int main( int argc,
char *argv[] )
{
GtkBuilder* builder;
GtkWidget* window;
gtk_init (&argc, &argv);
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, "interface.xml", NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "main_window"));
g_object_unref (G_OBJECT (builder));
gtk_widget_show (window);
gtk_main ();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment