/*
gcc -c `gtk-config --cflags` gtk.c
gcc -o gtk `gtk-config --libs`  gtk.o
 */
#include <gtk/gtk.h>

int main(int argc, char**argv)
{
	GtkWidget *main_window;
	GtkWidget *main_vbox;
	GtkWidget *a_label;
	GtkWidget *quit_button;
	gchar *temp;

	/* Init GTK */
	gtk_init(&argc, &argv);
	
	/* Set up the initial window */
	main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size(GTK_WINDOW(main_window), 400, 200);

	/* Set up the vbox to put things in */
	main_vbox = gtk_vbox_new(FALSE, 10);
	gtk_container_add(GTK_CONTAINER(main_window), main_vbox);

	/* A bunch of text */
	a_label = gtk_label_new("Here is a bunch of text oh what a bunch of text it is I sure do like text boy howdy text is great I could eat text for breakfast.");
	gtk_label_set_justify(GTK_LABEL(a_label), GTK_JUSTIFY_FILL);
	gtk_misc_set_alignment(GTK_MISC(a_label), 0, 0.5);
	gtk_label_set_line_wrap(GTK_LABEL(a_label), TRUE);
	gtk_box_pack_start(GTK_BOX(main_vbox), a_label, TRUE, TRUE, 0);

	/* Quit button */
	quit_button = gtk_button_new_with_label("Quit");
	gtk_signal_connect_object(GTK_OBJECT(quit_button), "clicked", GTK_SIGNAL_FUNC(gtk_exit), GTK_OBJECT(main_window));
	GTK_WIDGET_SET_FLAGS(quit_button, GTK_CAN_DEFAULT);
	gtk_box_pack_start(GTK_BOX(main_vbox), quit_button, TRUE, TRUE, 0);

	/* Show everything and run */
	gtk_widget_show_all(main_window);
	gtk_main();

	return 1;

}
