### Method

# GLib MainContext invoke_full

since: 2.28

#### Declaration [src]

    void
    g_main_context_invoke_full (
      GMainContext* context,
      gint priority,
      GSourceFunc function,
      gpointer data,
      GDestroyNotify notify
    )

#### Description [src]

Invokes a function in such a way that `context` is owned during the invocation of `function`.

This function is the same as `g_main_context_invoke()` except that it lets you specify the priority in case `function` ends up being scheduled as an idle and also lets you give a `GDestroyNotify` for `data`.

The `notify` function should not assume that it is called from any particular thread or with any particular context acquired.

Available since: 2.28

#### Parameters

`context`

  Type: `GMainContext`

  A main context, or `NULL` for the global-default main context.

  The argument can be `NULL`.

`priority`

  Type: `gint`

  The priority at which to run `function`.

`function`

  Type: `GSourceFunc`

  Function to call.

`data`

  Type: `gpointer`

  Data to pass to `function`.

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

`notify`

  Type: `GDestroyNotify`

  A function to call when `data` is no longer in use.

  The argument can be `NULL`.