#include <gtk/gtk.h>

static void activate(GtkApplication *app, gpointer data)
{
    GtkWidget *window, *chooser;

    window = gtk_application_window_new(app);
    gtk_window_set_default_size(GTK_WINDOW (window), 400, 400);
    chooser = gtk_recent_chooser_widget_new();
    gtk_container_add(GTK_CONTAINER(window), chooser);
    gtk_widget_set_hexpand(chooser, TRUE);
    gtk_widget_set_vexpand(chooser, TRUE);

    gtk_widget_show_all(window);
}

int main(int argc, char * argv[])
{
    GtkApplication *app;
   int retval;

   app = gtk_application_new("test.recent-chooser", G_APPLICATION_HANDLES_OPEN);
   g_signal_connect(app, "activate", G_CALLBACK (activate), NULL);
   retval = g_application_run(G_APPLICATION (app), argc, argv);

   g_object_unref(app);
   return retval;
}
