search


Description:

[ CCode ( cname = "g_queue_find_custom" , simple_generics = true ) ]
public unowned List<G> search<T> (T data, SearchFunc<G,T> func)

Finds an element in a Queue, 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 Queue element's data as the first argument and the given user data as the second argument.

Parameters:

this

a Queue

data

user data passed to func

func

a SearchFunc to call for each element. It should return 0 when the desired element is found

Returns:

the found link, or null if it wasn't found