GTK+ is an event-driven toolkit; that means that nothing happens unless an event is emitted and a callback is registered to receive it. The events in GTK+ are implemented through signals, and registering a callback for a signal is called connecting. Signals include most events involved in the GUI behavior and communication, including button click events or the window life cycle.
Signals and namespaces
Signals
Did you notice that, in our hello world example, the Quit button would exit the application, but that closing the window did not? That's because we didn't connect any callback to the window destroy signal. We can fix this by adding the following lines to handle this case:
window.Connect("destroy",...