GTK Signals (Cont.) The programmer needs to connect a callback to a signal. Here is how this is done for the top-level window: /* When the window is given the "delete_event" signal (this is * given by the window manager, usually by the "close" option, * or on the titlebar), we ask it to call the delete_event() * function as defined above. The data passed to the callback * function is NULL and is ignored in the callback function. */ gtk_signal_connect(GTK_OBJECT (main_window), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL);