<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <linklocation="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
Like all GUI toolkits, GTK+ uses an event-driven programming model. When the user is doing nothing, GTK+ sits in the main loop and waits for input. If the user performs some action - say, a mouse click - then the main loop "wakes up" and delivers an event to GTK+. GTK+ forwards the event to one or more widgets.
<para>
When widgets receive an event, they frequently emit one or more signals. Signals notify your program that "something interesting happened" by invoking functions you've connected to the signal with g_signal_connect(). Functions connected to a signal are often termed callbacks.
</para><para>
When your callbacks are invoked, you would typically take some action - for example, when an Open button is clicked you might display a GtkFileSelectionDialog. After a callback finishes, GTK+ will return to the main loop and await more user input.
<summary>Runs an iteration of the main loop: blocks until an event is received.</summary>
<returns>
<seelangword="true"/> if the <seecref="M:Gtk.Main.Quit"/> method was called to terminate the innermost main loop.</returns>
<remarks>Runs a single iteration of the main loop. If no events are waiting to be processed Gtk# will block until the next event is noticed. If you don't want to block look at <seecref="M:Gtk.Main.IterationDo()"/> or check if any events are pending with <seecref="M:Gtk.Global.EventsPending()"/> first. </remarks>
<paramname="evnt"> An event to process (normally) passed by GDK.</param>
<remarks>Processes a single GDK event. This is public only to allow filtering of events between GDK and GTK+. You will not usually need to call this function directly.</remarks>