#include <gtk/gtk.h>

int
main (int   argc,
      char *argv[])
{
    GtkWidget *window;
    GtkClipboard *clippy;
    GSList* list = NULL, *iterator = NULL;

    gtk_init (&argc, &argv);

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

    g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);

    gtk_widget_show (window);

    clippy = gtk_widget_get_clipboard (window, gdk_atom_intern_static_string ("CLIPBOARD"));

    list = gtk_clipboard_wait_for_targets_names (clippy);

    for (iterator = list; iterator; iterator = iterator->next) {
        printf("Current item is '%s'\n", iterator->data);
    }
    g_slist_free(list);

    g_print ("Hello World\n");

    gtk_main ();

    return 0;
}

