#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

int main(int argc, char *argv[])
{
GtkWidget *window, *iconview;
GtkListStore *model;
GdkPixbuf *thumbnail;
gint COLUMNS=1, column=0;
gint iv_col_width=150;
int i;
GtkTreeIter iter;

gtk_init(&argc,&argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_size_request(window, 600,600);

model = gtk_list_store_new(COLUMNS, GDK_TYPE_PIXBUF);
iconview = gtk_icon_view_new();
gtk_icon_view_set_model(GTK_ICON_VIEW(iconview), GTK_TREE_MODEL(model));
gtk_icon_view_set_pixbuf_column(GTK_ICON_VIEW(iconview),column);

for (i=0; i<16; i++){
   thumbnail = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, iv_col_width, iv_col_width);   
   gtk_list_store_append(model,  &iter);
   gtk_list_store_set(model, &iter, 0, thumbnail, -1);
}

gtk_icon_view_set_item_width(GTK_ICON_VIEW(iconview), iv_col_width);
gtk_container_add(GTK_CONTAINER(window), iconview);
gtk_widget_show_all(window);

gtk_main();
}


