#include <gtk/gtk.h>


static gboolean delete_event( GtkWidget *widget, GdkEvent  *event, gpointer   data ) {
    return FALSE;
}

static void destroy( GtkWidget *widget, gpointer   data ) {
    gtk_main_quit ();
}

int main( int   argc, char *argv[] ) {
    GtkWidget *window;
    GtkWidget *label;
    GtkWidget *expander;
    GtkWidget *subexpander;
    
    gtk_init (&argc, &argv);
    
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    
    g_signal_connect (window, "delete-event", G_CALLBACK (delete_event), NULL);
    g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
    
    gtk_container_set_border_width (GTK_CONTAINER (window), 10);

    expander = gtk_expander_new ("Details");
    subexpander = gtk_expander_new ("Sub Details");
    label = gtk_label_new ("Details can be shown or hidden.");

    gtk_container_add (GTK_CONTAINER (expander), subexpander);
    gtk_container_add (GTK_CONTAINER (subexpander), label);
    gtk_container_add (GTK_CONTAINER (window), expander);
    
    gtk_widget_show_all (window);
    gtk_main ();
    
    return 0;
}
