GLib.MainLoop.new

function new(context: GLib.MainContext, is_running: Boolean): GLib.MainLoop {
    // Gjs wrapper for g_main_loop_new()
}
  

Creates a new GLib.MainLoop structure.

context

a GLib.MainContext (if null, the default context will be used).

is_running

set to true to indicate that the loop is running. This is not very important since calling GLib.MainLoop.prototype.run will set this to true anyway.

Returns

a new GLib.MainLoop.