Mtk.idle_add_once
Description: Reference for Mtk.idle_add_once

### Function

# Mtkidle_add_once

#### Declaration [src]

    guint
    mtk_idle_add_once (
      GSourceOnceFunc function,
      gpointer data
    )

#### Description [src]

Adds a function to be called whenever there are no higher priority events pending to the default main loop.

The function will only be called once and then the source will be automatically removed from the main context.

This method is similar to `g_idle_add_once()` except it will attach the source to the thread-default main context.

#### Parameters

`function`

  Type: `GSourceOnceFunc`

  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 function.

#### Return value

Type: `guint`

The ID (greater than 0) of the event source.