Method
GLibTreesearch_node
since: 2.68
Declaration [src]
GTreeNode*
g_tree_search_node (
GTree* tree,
GCompareFunc search_func,
gconstpointer user_data
)
Description [src]
Searches a GTree
using search_func
.
The search_func
is called with a pointer to the key of a key/value
pair in the tree, and the passed in user_data
. If search_func
returns
0 for a key/value pair, then the corresponding node is returned as
the result of g_tree_search(). If search_func
returns -1, searching
will proceed among the key/value pairs that have a smaller key; if
search_func
returns 1, searching will proceed among the key/value
pairs that have a larger key.
Available since: 2.68
Parameters
search_func
-
Type:
GCompareFunc
A function used to search the
GTree
. user_data
-
Type:
gconstpointer
The data passed as the second argument to
search_func
.The argument can be NULL
.The data is owned by the caller of the method.
Return value
Type: GTreeNode
The node corresponding to the
found key, or NULL
if the key was not found.
The returned data is owned by the instance. |
The return value can be NULL . |