### Method

# GLib MainContext find_source_by_user_data

#### Declaration

    GSource*
    g_main_context_find_source_by_user_data (
      GMainContext* context,
      gpointer user_data
    )

#### Description

Finds a source with the given user data for the callback. If multiple sources exist with the same user data, the first one found will be returned.

#### Parameters

`user_data`

  Type: `gpointer`

  The user_data for the callback.

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

#### Return value

Type: `GSource`

The source, if one was found, otherwise `NULL`.

The data is owned by the instance.