Method

GLibTreetraverse

deprecated: 2.2 

Declaration

void
g_tree_traverse (
  GTree* tree,
  GTraverseFunc traverse_func,
  GTraverseType traverse_type,
  gpointer user_data
)

Description

Calls the given function for each node in the GTree.

Deprecated since: 2.2

The order of a balanced tree is somewhat arbitrary. If you just want to visit all nodes in sorted order, use g_tree_foreach() instead. If you really need to visit nodes in a different order, consider using an [n-ary tree][glib-N-ary-Trees].

Parameters

traverse_func

Type: GTraverseFunc

The function to call for each node visited. If this function returns TRUE, the traversal is stopped.

traverse_type

Type: GTraverseType

The order in which nodes are visited, one of G_IN_ORDER, G_PRE_ORDER and G_POST_ORDER.

user_data

Type: gpointer

User data to pass to the function.

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