#include <gtk/gtk.h>

int
main ()
{
	GtkWidget *window, *sw, *iconview;
	GtkListStore *store;

	gtk_init (NULL, NULL);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	sw = gtk_scrolled_window_new (NULL, NULL);
	iconview = gtk_icon_view_new ();
	store = gtk_list_store_new (1, G_TYPE_STRING);
	gtk_list_store_insert_with_values (store, NULL, -1,
					   0, "Whatever", -1);
	gtk_list_store_insert_with_values (store, NULL, -1,
					   0, "Whatever else", -1);

	gtk_icon_view_set_model (GTK_ICON_VIEW (iconview), GTK_TREE_MODEL (store));
	gtk_icon_view_set_text_column (GTK_ICON_VIEW (iconview), 0);
	gtk_container_add (GTK_CONTAINER (window), sw);
	gtk_container_add (GTK_CONTAINER (sw), iconview);

	g_object_set (sw,
		      "halign", GTK_ALIGN_FILL,
		      "valign", GTK_ALIGN_FILL, NULL);
	g_object_set (iconview,
		      "halign", GTK_ALIGN_CENTER,
		      "valign", GTK_ALIGN_CENTER, NULL);

	gtk_widget_show_all (window);

	gtk_main();
	return 0;
}
