<!-- ##### STRUCT GNode ##### -->
<para>
-The #GNode struct represents one node in a
+The <structname>GNode</structname> struct represents one node in a
<link linkend="glib-N-ary-Trees">N-ary Tree</link>.
The <structfield>data</structfield> field contains the actual data of the node.
The <structfield>next</structfield> and <structfield>prev</structfield>
-fields point to the node's siblings (a sibling is another #GNode with the
+fields point to the node's siblings (a sibling is another <structname>GNode</structname> with the
same parent).
-The <structfield>parent</structfield> field points to the parent of the #GNode,
-or is NULL if the #GNode is the root of the tree.
+The <structfield>parent</structfield> field points to the parent of the <structname>GNode</structname>,
+or is %NULL if the <structname>GNode</structname> is the root of the tree.
The <structfield>children</structfield> field points to the first child of the
-#GNode. The other children are accessed by using the
+<structname>GNode</structname>. The other children are accessed by using the
<structfield>next</structfield> pointer of each child.
</para>
@Returns: a new #GNode.
+<!-- ##### FUNCTION g_node_copy ##### -->
+<para>
+Recursively copies a #GNode (but does not deep-copy the data inside the nodes,
+see g_node_copy_deep() if you need that).
+</para>
+
+@node: a #GNode.
+@Returns: a new #GNode containing the same data pointers.
+
+
+<!-- ##### USER_FUNCTION GCopyFunc ##### -->
+<para>
+A function of this signature is used to copy the node data when doing a deep-copy
+of a tree.
+</para>
+
+@src: A pointer to the data which should be copied.
+@data: Additional data.
+@Returns: A pointer to the copy.
+@Since: 2.4
+
+
+<!-- ##### FUNCTION g_node_copy_deep ##### -->
+<para>
+
+</para>
+
+@node:
+@copy_func:
+@data:
+@Returns:
+
+
<!-- ##### FUNCTION g_node_insert ##### -->
<para>
Inserts a #GNode beneath the parent at the given position.
</para>
@parent: the #GNode to place @node under.
-@sibling: the sibling #GNode to place @node before. If sibling is NULL,
+@sibling: the sibling #GNode to place @node before. If sibling is %NULL,
the node is inserted as the last child of @parent.
@node: the #GNode to insert.
@Returns: the inserted #GNode.
+<!-- ##### FUNCTION g_node_insert_after ##### -->
+<para>
+Inserts a #GNode beneath the parent after the given sibling.
+</para>
+
+@parent: the #GNode to place @node under.
+@sibling: the sibling #GNode to place @node after. If sibling is %NULL,
+the node is inserted as the first child of @parent.
+@node: the #GNode to insert.
+@Returns: the inserted #GNode.
+
+
<!-- ##### MACRO g_node_append ##### -->
<para>
Inserts a #GNode as the last child of the given parent.
<para>
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.
+The traversal can be halted at any point by returning %TRUE from @func.
</para>
@root: the root #GNode of the tree to traverse.
<para>
Specifies which nodes are visited during several of the tree functions,
including g_node_traverse() and g_node_find().
-<itemizedlist>
-<listitem><para>
-%G_TRAVERSE_LEAFS specifies that only leaf nodes should be visited.
-</para></listitem>
-<listitem><para>
-%G_TRAVERSE_NON_LEAFS specifies that only non-leaf nodes should be visited.
-</para></listitem>
-<listitem><para>
-%G_TRAVERSE_ALL specifies that all nodes should be visited.
-</para></listitem>
-</itemizedlist>
-</para>
-
-@G_TRAVERSE_LEAFS:
-@G_TRAVERSE_NON_LEAFS:
-@G_TRAVERSE_ALL:
+</para>
+
+@G_TRAVERSE_LEAFS: only leaf nodes should be visited.
+@G_TRAVERSE_NON_LEAFS: only non-leaf nodes should be visited.
+@G_TRAVERSE_ALL: all nodes should be visited.
@G_TRAVERSE_MASK:
<!-- ##### USER_FUNCTION GNodeTraverseFunc ##### -->
Specifies the type of function passed to g_node_traverse().
The function is called with each of the nodes visited, together with the
user data passed to g_node_traverse().
-If the function returns TRUE, then the traversal is stopped.
+If the function returns %TRUE, then the traversal is stopped.
</para>
@node: a #GNode.
@data: user data passed to g_node_traverse().
-@Returns: TRUE to stop the traversal.
+@Returns: %TRUE to stop the traversal.
<!-- ##### FUNCTION g_node_children_foreach ##### -->
@flags: which types of children are to be searched, one of %G_TRAVERSE_ALL,
%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
@data: the data to find.
-@Returns: the found #GNode, or NULL if the data is not found.
+@Returns: the found #GNode, or %NULL if the data is not found.
<!-- ##### FUNCTION g_node_find_child ##### -->
@flags: which types of children are to be searched, one of %G_TRAVERSE_ALL,
%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
@data: the data to find.
-@Returns: the found child #GNode, or NULL if the data is not found.
+@Returns: the found child #GNode, or %NULL if the data is not found.
<!-- ##### FUNCTION g_node_child_index ##### -->
</para>
@node: a #GNode.
-@Returns: the last child of @node, or NULL if @node is NULL or has no children.
+@Returns: the last child of @node, or %NULL if @node is %NULL or has no children.
<!-- ##### FUNCTION g_node_last_child ##### -->
Gets the last child of a #GNode.
</para>
-@node: a #GNode (must not be NULL).
-@Returns: the last child of @node, or NULL if @node has no children.
+@node: a #GNode (must not be %NULL).
+@Returns: the last child of @node, or %NULL if @node has no children.
<!-- ##### FUNCTION g_node_nth_child ##### -->
<para>
Gets a child of a #GNode, using the given index.
-The first child is at index 0. If the index is too big, NULL is returned.
+The first child is at index 0. If the index is too big, %NULL is returned.
</para>
@node: a #GNode.
</para>
@node: a #GNode.
-@Returns: the next sibling of @node, or NULL if @node is NULL.
+@Returns: the next sibling of @node, or %NULL if @node is %NULL.
<!-- ##### MACRO g_node_prev_sibling ##### -->
</para>
@node: a #GNode.
-@Returns: the previous sibling of @node, or NULL if @node is NULL.
+@Returns: the previous sibling of @node, or %NULL if @node is %NULL.
<!-- ##### FUNCTION g_node_last_sibling ##### -->
<!-- ##### MACRO G_NODE_IS_LEAF ##### -->
<para>
-Returns TRUE if a #GNode is a leaf node.
+Returns %TRUE if a #GNode is a leaf node.
</para>
@node: a #GNode.
-@Returns: TRUE if the #GNode is a leaf node (i.e. it has no children).
+@Returns: %TRUE if the #GNode is a leaf node (i.e. it has no children).
<!-- ##### MACRO G_NODE_IS_ROOT ##### -->
<para>
-Returns TRUE if a #GNode is the root of a tree.
+Returns %TRUE if a #GNode is the root of a tree.
</para>
@node: a #GNode.
-@Returns: TRUE if the #GNode is the root of a tree (i.e. it has no parent
+@Returns: %TRUE if the #GNode is the root of a tree (i.e. it has no parent
or siblings).
Gets the depth of a #GNode.
</para>
<para>
-If @node is NULL the depth is 0.
+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.
</para>
<!-- ##### FUNCTION g_node_is_ancestor ##### -->
<para>
-Returns TRUE if @node is an ancestor of @descendant.
-This is true if node is the parent of descendant, or if node is the
-grandparent of descendant etc.
+Returns %TRUE if @node is an ancestor of @descendant.
+This is true if node is the parent of @descendant, or if node is the
+grandparent of @descendant etc.
</para>
@node: a #GNode.
@descendant: a #GNode.
-@Returns: TRUE if @node is an ancestor of @descendant.
+@Returns: %TRUE if @node is an ancestor of @descendant.
<!-- ##### FUNCTION g_node_max_height ##### -->
This is the maximum distance from the #GNode to all leaf nodes.
</para>
<para>
-If @root is NULL, 0 is returned. If @root has no children, 1 is returned.
+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.
</para>
@root: the root of the tree/subtree to destroy.
-<!-- ##### FUNCTION g_node_pop_allocator ##### -->
+<!-- ##### FUNCTION g_node_push_allocator ##### -->
<para>
-Restores the previous #GAllocator, used when allocating #GNode elements.
+Sets the allocator to use to allocate #GNode elements.
+Use g_node_pop_allocator() to restore the previous allocator.
</para>
+@allocator: the #GAllocator to use when allocating #GNode elements.
-<!-- ##### FUNCTION g_node_push_allocator ##### -->
+<!-- ##### FUNCTION g_node_pop_allocator ##### -->
<para>
-Sets the allocator to use to allocate #GNode elements.
-Use g_node_pop_allocator() to restore the previous allocator.
+Restores the previous #GAllocator, used when allocating #GNode elements.
</para>
-@allocator: the #GAllocator to use when allocating #GNode elements.