GLib.Queue.find_custom

### Method

# GLib Queuefind_custom

since: 2.4

#### Declaration [src]

    GList*
    g_queue_find_custom (
      GQueue* queue,
      gconstpointer data,
      GCompareFunc func
    )

#### Description [src]

Finds an element in a `GQueue`, using a supplied function to find the desired element. It iterates over the queue, calling the given function which should return 0 when the desired element is found. The function takes two gconstpointer arguments, the `GQueue` element’s data as the first argument and the given user data as the second argument.

Available since: 2.4

This method is not directly available to language bindings.

#### Parameters

`data`

  Type: `gconstpointer`

  User data passed to `func`.

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

`func`

  Type: `GCompareFunc`

  A `GCompareFunc` to call for each element. It should return 0 when the desired element is found.

#### Return value

Type: A list of `gpointer`

The found link, or `NULL` if it wasn’t found.

The returned data is owned by the instance.