points to the first child of the #GNode. The other
children are accessed by using the next
pointer of each
child.
contains the actual data of the node.
points to the node's next sibling (a sibling is another #GNode with the same parent).
points to the parent of the #GNode, or is %NULL if the #GNode is the root of the tree.
points to the node's previous sibling.
Gets the position of the first child of a #GNode which contains the given data.
the data to find
Gets the depth of a #GNode.
If node
is %NULL the depth is 0. The root node has a depth of 1.
For the children of the root node the depth is 2. And so on.
Removes root
and its children from the tree, freeing any memory
allocated.
Gets the maximum height of all branches beneath a #GNode. This is the maximum distance from the #GNode to all leaf nodes.
If root
is %NULL, 0 is returned. If root
has no children,
1 is returned. If root
has children, 2 is returned. And so on.
Gets the number of children of a #GNode.
Gets the number of nodes in a tree.
which types of children are to be counted, one of %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES
Reverses the order of the children of a #GNode. (It doesn't change the order of the grandchildren.)
Unlinks a #GNode from a tree, resulting in two separate trees.
The #GNode struct represents one node in a [n-ary tree][glib-N-ary-Trees].