### Method

# GLib MainContext prepare

#### Declaration [src]

    gboolean
    g_main_context_prepare (
      GMainContext* context,
      gint* priority
    )

#### Description [src]

Prepares to poll sources within a main loop.

The resulting information for polling is determined by calling `g_main_context_query()`.

You must have successfully acquired the context with `g_main_context_acquire()` before you may call this function.

#### Parameters

`context`

  Type: `GMainContext`

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

  The argument can be `NULL`.

`priority`

  Type: `gint*`

  Location to store priority of highest priority source already ready.

  The argument will be set by the function.
  The argument can be `NULL`.

#### Return value

Type: `gboolean`

True if some source is ready to be dispatched prior to polling, false otherwise.