GLib.MainLoop.new
Description: Reference for GLib.MainLoop.new

### Function

# GLib MainLoopnew

#### Declaration [src]

    GMainLoop*
    g_main_loop_new (
      GMainContext* context,
      gboolean is_running
    )

#### Description [src]

Creates a new `GMainLoop` structure.

#### Parameters

`context`

  Type: `GMainContext`

  A main context (if `NULL`, the global-default main context will be used).

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`is_running`

  Type: `gboolean`

  Set to true to indicate that the loop is running. This is not very important since calling `g_main_loop_run()` will set this to true anyway.

#### Return value

Type: `GMainLoop`

A new main loop.

The caller of the function takes ownership of the data, and is responsible for freeing it.