Node.traverse

Traverses a tree starting at the given root glib.Node 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.

Parameters

order GTraverseType

the order in which nodes are visited - G_IN_ORDER, G_PRE_ORDER, G_POST_ORDER, or G_LEVEL_ORDER.

flags GTraverseFlags

which types of children are to be visited, one of G_TRAVERSE_ALL, G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES

maxDepth int

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 glib.Node

data void*

user data to pass to the function