#include <gtk/gtk.h>

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

void exit_window( GtkWidget *widget, gpointer data ){
    gtk_widget_destroy(GTK_WIDGET(data));
}

int main( int   argc, char *argv[] ){
    GtkWidget *window;
    GtkWidget *button;

    gtk_init (&argc, &argv);

    window = gtk_window_new (GTK_WINDOW_POPUP);
    g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
    button = gtk_button_new_with_label ("Exit Window");
    g_signal_connect (button, "clicked", G_CALLBACK (exit_window), window);
    gtk_container_add (GTK_CONTAINER (window), button);
    gtk_widget_show (button);
    gtk_widget_show  (window);
    gtk_window_move(GTK_WINDOW(window), 100, 100);

    gtk_main ();

    return 0;
}
