Gtk.Main Class
Main loop event processing class.

See Also: Main Members


public class Main


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.

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.

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.


Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: