MainLoop


Object Hierarchy:

Object hierarchy for MainLoop

Description:

[ Compact ]
public class MainLoop

The `GMainLoop` struct is an opaque data type representing the main event loop of a GLib or GTK+ application.

Example: MainLoop:

public static int main (string[] args) {
MainLoop loop = new MainLoop ();
TimeoutSource time = new TimeoutSource (2000);

time.set_callback (() => {
print ("Time!\n");
loop.quit ();
return false;
});

time.attach (loop.get_context ());

loop.run ();
return 0;
}

valac --pkg glib-2.0 GLib.MainLoop.vala


Namespace: GLib
Package: glib-2.0

Content:

Creation methods:

Methods: