GLib.SourceFunc
Description: Reference for GLib.SourceFunc

### Function

# GLibSourceFunc

since: 2.0

#### Declaration

    gboolean
    (* GSourceFunc) (
      gpointer user_data
    )

#### Description

Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(), g_idle_add(), and g_idle_add_full().

When calling g_source_set_callback(), you may need to cast a function of a different type to this type. Use G_SOURCE_FUNC() to avoid warnings about incompatible function types.

Available since: 2.0

#### Parameters

`user_data`

  Type: `gpointer`

  Data passed to the function, set when the source was created with one of the above functions.

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

#### Return value

Type: `gboolean`

`FALSE` if the source should be removed. `G_SOURCE_CONTINUE` and `G_SOURCE_REMOVE` are more memorable names for the return value.