#include <gtk/gtk.h>

gboolean
expose_func (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
	g_print("expose\n");
	return TRUE;
}

int main(int argc, char **argv)
{
	GtkWidget *window;
	GtkWidget *notebook;
	GtkWidget *image;
	GtkWidget *drawingarea;
	GtkWidget *label;
	GtkWidget *box;

	gtk_init(&argc, &argv);

	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size(GTK_WINDOW(window), 250, 250);

	notebook = gtk_notebook_new();
	gtk_container_add(GTK_CONTAINER(window), notebook);

	box = gtk_hbox_new(FALSE, 0);
	image = gtk_image_new_from_file("loading.gif");
	gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0);
	
	label = gtk_label_new("Hello quartz!");
	gtk_box_pack_end(GTK_BOX(box), label, TRUE, TRUE, 0);
	gtk_widget_show_all(box);

	drawingarea = gtk_drawing_area_new();
	gtk_widget_show(drawingarea);

	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), drawingarea, box);

	gtk_widget_show_all(window);

	g_signal_connect(G_OBJECT(drawingarea), "expose-event", G_CALLBACK(expose_func), NULL);

	gtk_main();
}

