Method
GLibNodetraverse
Declaration
void
g_node_traverse (
GNode* root,
GTraverseType order,
GTraverseFlags flags,
gint max_depth,
GNodeTraverseFunc func,
gpointer data
)
Description
Traverses a tree starting at the given root GNode
.
It calls the given function for each node visited.
The traversal can be halted at any point by returning TRUE
from func
.
func
must not do anything that would modify the structure of the tree.
This method is not directly available to language bindings. |
Parameters
order |
GTraverseType |
The order in which nodes are visited - |
|
flags |
GTraverseFlags |
Which types of children are to be visited, one of
|
|
max_depth |
gint |
The maximum depth of the traversal. Nodes below this depth will not be visited. If max_depth is -1 all nodes in the tree are visited. If depth is 1, only the root is visited. If depth is 2, the root and its children are visited. And so on. |
|
func |
GNodeTraverseFunc |
The function to call for each visited |
|
data |
gpointer |
User data to pass to the function. |
|
The argument can be NULL . | |
The data is owned by the caller of the function. |