Mtk.idle_add
Description: Reference for Mtk.idle_add

### Function

# Mtkidle_add

#### Declaration [src]

    guint
    mtk_idle_add (
      GSourceFunc function,
      gpointer data
    )

#### Description [src]

Adds a function to be called whenever there are no higher priority events pending.

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

The implementation of this function is provided by `mtk_idle_add_full()` in language bindings.

#### Parameters

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

#### Return value

Type: `guint`

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