gtk-sharp 0.0.0.0 neutral Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. Application class Provides the initialization and event loop iteration related methods for the Gtk# widget library. Since Gtk# is an event driven toolkit, Applications register callbacks against various events to handle user input. These callbacks are invoked from the main event loop when events are detected. using Gtk; using System; using GLib; public class HelloWorld { public static int Main (string[] args) { Application.Init (); Gtk.Window win = new Gtk.Window ("Gtk# Hello World"); win.DeleteEvent += new DeleteEventHandler (Window_Delete); win.ShowAll (); Application.Run (); return 0; } static void Window_Delete (object obj, DeleteEventArgs args) { SignalArgs sa = (SignalArgs) args; Application.Quit (); sa.RetVal = true; } } System.Object Method System.Void Quits the current main loop Makes the innermost invocation of the main loop return when it regains control. Method System.Void Runs a single iteration of the main loop. 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 do not want to block look at or check if any events are pending with first. Method System.Boolean Whether there are events on the queue if events are available to be processed, otherwise Checks if any events are pending. This can be used to update the GUI and invoke timeouts etc. while doing some time intensive computation. void LongComputation () { while (!done){ ComputationChunk (); // Flush pending events to keep the GUI reponsive while (Application.EventsPending ()) Application.RunIteration (); } } Method System.Void Runs the main loop Runs the main loop until is called. You can nest calls to . In that case will make the innermost invocation of the main loop return. Method System.Void Initializes Gtk# for operation. The name of your program The arguments to pass to the toolkit Call this function before using any other Gtk# functions in your GUI applications. It will initialize everything needed to operate the toolkit. This function will terminate your program if it was unable to initialize the GUI for some reason. If you want your program to fall back to a textual interface you want to call instead. The args values will be modified after Gtk has removed the command line options that it handles itself. Method System.Boolean Initializes Gtk# for operation, probes window system. true if the toolkit was initialized, false if the windowing system can not be initilized. The name of your program The arguments to pass to the toolkit You use this call to initialize Gtk# for your GUI applications. This method will allow your application to be both GUI/text. A true return value means that the toolkit was initialized, a false value means that the toolkit could not be initialized. If you do not want to do dual GUI/text applications, you can use instead. Method System.Void Initializes GTK+ for operation. Call this function before using any other Gtk# functions in your GUI applications. It will initialize everything needed to operate the toolkit. This function will terminate your program if it was unable to initialize the GUI for some reason. If you want your program to fall back to a textual interface you want to call instead. If you want to pass arguments from the command line use the method instead. Method System.Boolean Runs a single iteration of the main loop. A boolean value, whether the iteration should block or not Runs a single iteration of the main loop. If is , then if no events are waiting to be processed Gtk# will block until the next event is noticed; If is , then it if no events are waiting to be processed Gtk#, routine will return immediately. Property Gdk.Event Returns the event currently taking place. a