<refentry id="gtk-GtkTreeModel">
<refmeta>
<refentrytitle>GtkTreeModel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkTreeModel</refname><refpurpose>The tree interface used by <link linkend="GtkTreeView">GtkTreeView</link></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkTreeModel">GtkTreeModel</link>;
struct      <link linkend="GtkTreeIter">GtkTreeIter</link>;
struct      <link linkend="GtkTreePath">GtkTreePath</link>;
struct      <link linkend="GtkTreeRowReference">GtkTreeRowReference</link>;
struct      <link linkend="GtkTreeModelIface">GtkTreeModelIface</link>;
<link linkend="gboolean">gboolean</link>    (<link linkend="GtkTreeModelForeachFunc">*GtkTreeModelForeachFunc</link>)      (<link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gpointer">gpointer</link> data);
enum        <link linkend="GtkTreeModelFlags">GtkTreeModelFlags</link>;
<link linkend="GtkTreePath">GtkTreePath</link>* <link linkend="gtk-tree-path-new">gtk_tree_path_new</link>              (void);
<link linkend="GtkTreePath">GtkTreePath</link>* <link linkend="gtk-tree-path-new-from-string">gtk_tree_path_new_from_string</link>  (const <link linkend="gchar">gchar</link> *path);
<link linkend="gchar">gchar</link>*      <link linkend="gtk-tree-path-to-string">gtk_tree_path_to_string</link>         (<link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="GtkTreePath">GtkTreePath</link>* <link linkend="gtk-tree-path-new-first">gtk_tree_path_new_first</link>        (void);
#define     <link linkend="gtk-tree-path-new-root">gtk_tree_path_new_root</link>          ()
void        <link linkend="gtk-tree-path-append-index">gtk_tree_path_append_index</link>      (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="gint">gint</link> index);
void        <link linkend="gtk-tree-path-prepend-index">gtk_tree_path_prepend_index</link>     (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="gint">gint</link> index);
<link linkend="gint">gint</link>        <link linkend="gtk-tree-path-get-depth">gtk_tree_path_get_depth</link>         (<link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="gint">gint</link>*       <link linkend="gtk-tree-path-get-indices">gtk_tree_path_get_indices</link>       (<link linkend="GtkTreePath">GtkTreePath</link> *path);
void        <link linkend="gtk-tree-path-free">gtk_tree_path_free</link>              (<link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="GtkTreePath">GtkTreePath</link>* <link linkend="gtk-tree-path-copy">gtk_tree_path_copy</link>             (const <link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="gint">gint</link>        <link linkend="gtk-tree-path-compare">gtk_tree_path_compare</link>           (const <link linkend="GtkTreePath">GtkTreePath</link> *a,
                                             const <link linkend="GtkTreePath">GtkTreePath</link> *b);
void        <link linkend="gtk-tree-path-next">gtk_tree_path_next</link>              (<link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-path-prev">gtk_tree_path_prev</link>              (<link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-path-up">gtk_tree_path_up</link>                (<link linkend="GtkTreePath">GtkTreePath</link> *path);
void        <link linkend="gtk-tree-path-down">gtk_tree_path_down</link>              (<link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-path-is-ancestor">gtk_tree_path_is_ancestor</link>       (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *descendant);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-path-is-descendant">gtk_tree_path_is_descendant</link>     (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *ancestor);
<link linkend="GtkTreeRowReference">GtkTreeRowReference</link>* <link linkend="gtk-tree-row-reference-new">gtk_tree_row_reference_new</link>
                                            (<link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="GtkTreeRowReference">GtkTreeRowReference</link>* <link linkend="gtk-tree-row-reference-new-proxy">gtk_tree_row_reference_new_proxy</link>
                                            (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="GtkTreePath">GtkTreePath</link>* <link linkend="gtk-tree-row-reference-get-path">gtk_tree_row_reference_get_path</link>
                                            (<link linkend="GtkTreeRowReference">GtkTreeRowReference</link> *reference);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-row-reference-valid">gtk_tree_row_reference_valid</link>    (<link linkend="GtkTreeRowReference">GtkTreeRowReference</link> *reference);
void        <link linkend="gtk-tree-row-reference-free">gtk_tree_row_reference_free</link>     (<link linkend="GtkTreeRowReference">GtkTreeRowReference</link> *reference);
void        <link linkend="gtk-tree-row-reference-inserted">gtk_tree_row_reference_inserted</link> (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);
void        <link linkend="gtk-tree-row-reference-deleted">gtk_tree_row_reference_deleted</link>  (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);
void        <link linkend="gtk-tree-row-reference-reordered">gtk_tree_row_reference_reordered</link>
                                            (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gint">gint</link> *new_order);
<link linkend="GtkTreeIter">GtkTreeIter</link>* <link linkend="gtk-tree-iter-copy">gtk_tree_iter_copy</link>             (<link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-iter-free">gtk_tree_iter_free</link>              (<link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
<link linkend="GtkTreeModelFlags">GtkTreeModelFlags</link> <link linkend="gtk-tree-model-get-flags">gtk_tree_model_get_flags</link>  (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model);
<link linkend="gint">gint</link>        <link linkend="gtk-tree-model-get-n-columns">gtk_tree_model_get_n_columns</link>    (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model);
<link linkend="GType">GType</link>       <link linkend="gtk-tree-model-get-column-type">gtk_tree_model_get_column_type</link>  (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="gint">gint</link> index);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-get-iter">gtk_tree_model_get_iter</link>         (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-get-iter-from-string">gtk_tree_model_get_iter_from_string</link>
                                            (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             const <link linkend="gchar">gchar</link> *path_string);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-get-iter-first">gtk_tree_model_get_iter_first</link>   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
#define     <link linkend="gtk-tree-model-get-iter-root">gtk_tree_model_get_iter_root</link>    (tree_model, iter)
<link linkend="GtkTreePath">GtkTreePath</link>* <link linkend="gtk-tree-model-get-path">gtk_tree_model_get_path</link>        (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-model-get-value">gtk_tree_model_get_value</link>        (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gint">gint</link> column,
                                             <link linkend="GValue">GValue</link> *value);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-iter-next">gtk_tree_model_iter_next</link>        (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-iter-children">gtk_tree_model_iter_children</link>    (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *parent);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-iter-has-child">gtk_tree_model_iter_has_child</link>   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
<link linkend="gint">gint</link>        <link linkend="gtk-tree-model-iter-n-children">gtk_tree_model_iter_n_children</link>  (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-iter-nth-child">gtk_tree_model_iter_nth_child</link>   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *parent,
                                             <link linkend="gint">gint</link> n);
<link linkend="gboolean">gboolean</link>    <link linkend="gtk-tree-model-iter-parent">gtk_tree_model_iter_parent</link>      (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *child);
void        <link linkend="gtk-tree-model-ref-node">gtk_tree_model_ref_node</link>         (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-model-unref-node">gtk_tree_model_unref_node</link>       (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-model-get">gtk_tree_model_get</link>              (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             ...);
void        <link linkend="gtk-tree-model-get-valist">gtk_tree_model_get_valist</link>       (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             va_list var_args);
void        <link linkend="gtk-tree-model-foreach">gtk_tree_model_foreach</link>          (<link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreeModelForeachFunc">GtkTreeModelForeachFunc</link> func,
                                             <link linkend="gpointer">gpointer</link> user_data);
void        <link linkend="gtk-tree-model-row-changed">gtk_tree_model_row_changed</link>      (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-model-row-inserted">gtk_tree_model_row_inserted</link>     (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-model-row-has-child-toggled">gtk_tree_model_row_has_child_toggled</link>
                                            (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);
void        <link linkend="gtk-tree-model-row-deleted">gtk_tree_model_row_deleted</link>      (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);
void        <link linkend="gtk-tree-model-rows-reordered">gtk_tree_model_rows_reordered</link>   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gint">gint</link> *new_order);


</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkTreeModel">GtkTreeModel</link> interface defines a generic tree interface for use by
the <link linkend="GtkTreeView">GtkTreeView</link> widget.  It is an abstract interface, and is designed
to be usable with any appropriate data structure.  The programmer just
has to implement this interface on their own data type for it to be
viewable by a <link linkend="GtkTreeView">GtkTreeView</link> widget.
</para>

<para>
The model is represented as a hierarchical tree of strongly-typed,
columned data.  In other words, the model can be seen as a tree where
every node has different values depending on which column is being
queried.  The type of data found in a column is determined by using the
GType system (ie. <link linkend="G-TYPE-INT-CAPS">G_TYPE_INT</link>, <link linkend="GTK-TYPE-BUTTON-CAPS">GTK_TYPE_BUTTON</link>, <link linkend="G-TYPE-POINTER-CAPS">G_TYPE_POINTER</link>, etc.).
The types are homogeneous per column across all nodes.  It is important
to note that this interface only provides a way of examining a model and
observing changes.  The implementation of each individual model decides
how and if changes are made.
</para>

<para>
In order to make life simpler for programmers who do not need to write
their own specialized model, two generic models are provided &mdash; the
<link linkend="GtkTreeStore">GtkTreeStore</link> and the <link linkend="GtkListStore">GtkListStore</link>.  To use these, the developer simply
pushes data into these models as necessary.  These models provide the
data structure as well as all appropriate tree interfaces.  As a result,
implementing drag and drop, sorting, and storing data is trivial.  For
the vast majority of trees and lists, these two models are sufficient.
</para>

<para>
Models are accessed on a node/column level of granularity.  One can
query for the value of a model at a certain node and a certain column
on that node.  There are two structures used to reference a particular
node in a model.  They are the <link linkend="GtkTreePath">GtkTreePath</link> and the <link linkend="GtkTreeIter">GtkTreeIter</link>
<footnote>
<para>
Here, <abbrev>iter</abbrev> is short for <quote>iterator</quote>
</para>
</footnote>
Most of the interface consists of operations on a <link linkend="GtkTreeIter">GtkTreeIter</link>.
</para>

<para>
A path is essentially a potential node.  It is a location on a model
that may or may not actually correspond to a node on a specific model.
The <link linkend="GtkTreePath">GtkTreePath</link> struct can be converted into either an array of
unsigned integers or a string.  The string form is a list of numbers
separated by a colon.  Each number refers to the offset at that level.
Thus, the path <quote>0</quote> refers to the root node and the path
<quote>2:4</quote> refers to the fifth child of the third node.
</para>

<para>
By contrast, a <link linkend="GtkTreeIter">GtkTreeIter</link> is a reference to a specific node on a
specific model.  It is a generic struct with an integer and three
generic pointers.  These are filled in by the model in a model-specific
way.  One can convert a path to an iterator by calling
<link linkend="gtk-tree-model-get-iter">gtk_tree_model_get_iter</link>().  These iterators are the primary way of
accessing a model and are similar to the iterators used by
<link linkend="GtkTextBuffer">GtkTextBuffer</link>.  They are generally statically allocated on the heap and
only used for a short time.  The model interface defines a set of
operations using them for navigating the model.
</para>

<para>
It is expected that models fill in the iterator with private data.  For
example, the <link linkend="GtkListStore">GtkListStore</link> model, which is internally a simple linked
list, stores a list node in one of the pointers.  The <link linkend="GtkTreeModelSort">GtkTreeModelSort</link>
stores an array and an offset in two of the pointers.  Additionally,
there is an integer field.  This field is generally filled with a unique
stamp per model.  This stamp is for catching errors resulting from using
invalid iterators with a model.
</para>

<para>
The lifecycle of an iterator can be a little confusing at first.
Iterators are expected to always be valid for as long as the model is
unchanged (and doesn't emit a signal).  The model is considered to own
all outstanding iterators and nothing needs to be done to free them from
the user's point of view.  Additionally, some models guarantee that an
iterator is valid for as long as the node it refers to is valid (most
notably the <link linkend="GtkTreeStore">GtkTreeStore</link> and <link linkend="GtkListStore">GtkListStore</link>).  Although generally
uninteresting, as one always has to allow for the case where iterators
do not persist beyond a signal, some very important performance
enhancements were made in the sort model.  As a result, the
<link linkend="GTK-TREE-MODEL-ITERS-PERSIST-CAPS">GTK_TREE_MODEL_ITERS_PERSIST</link> flag was added to indicate this behavior.
</para>

<para>
To help show some common operation of a model, some examples are
provided.  The first example shows three ways of getting the iter at the
location <quote>3:2:5</quote>.  While the first method shown is easier,
the second is much more common, as you often get paths from callbacks.
</para>
<para>
<example>
<title>Acquiring a <structname>GtkTreeIter</structname></title>
<programlisting>
/* Three ways of getting the iter pointing to the location
 */
{
  GtkTreePath *path;
  GtkTreeIter iter;
  GtkTreeIter parent_iter;

  /* get the iterator from a string */
  gtk_tree_model_get_iter_from_string (model, &amp;iter, "3:2:5");

  /* get the iterator from a path */
  path = gtk_tree_path_new_from_string ("3:2:5");
  gtk_tree_model_get_iter (model, &amp;iter, path);
  gtk_tree_path_free (path);


  /* walk the tree to find the iterator */
  gtk_tree_model_get_nth_child (model, &amp;iter, NULL, 3);
  parent_iter = iter;
  gtk_tree_model_get_nth_child (model, &amp;iter, &amp;parent_iter, 2);
  parent_iter = iter;
  gtk_tree_model_get_nth_child (model, &amp;iter, NULL, 5);
}
</programlisting>
</example>
</para>

<para>
This second example shows a quick way of iterating through a list and
getting a string and an integer from each row.  The
<function>populate_model</function> function used below is not shown, as
it is specific to the <link linkend="GtkListStore">GtkListStore</link>.  For information on how to write
such a function, see the <link linkend="GtkListStore">GtkListStore</link> documentation.
<example>
<title>Reading data from a <structname>GtkTreeModel</structname></title>
<programlisting>
enum
{
  STRING_COLUMN,
  INT_COLUMN,
  N_COLUMNS
};

{
  GtkTreeModel *list_store;
  GtkTreeIter iter;
  gboolean valid;
  gint row_count = 0;

  /* make a new list_store */
  list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT);

  /* Fill the list store with data */
  populate_model (list_store);

  /* Get the first iter in the list */
  valid = gtk_tree_model_get_iter_first (model, &amp;iter);

  while (valid)
    {
      /* Walk through the list, reading each row */
      gchar *str_data;
      gint   int_data;

      /* Make sure you terminate calls to gtk_tree_model_get(<!-- -->)
       * with a '-1' value
       */
      gtk_tree_model_get (list_store, &amp;iter, 
                          STRING_COLUMN, &amp;str_data,
                          INT_COLUMN, &amp;int_data,
                          -1);

      /* Do something with the data */
      g_print ("Row &percent;d: (&percent;s,&percent;d)\n", row_count, str_data, int_data);
      g_free (str_data);

      row_count ++;
      valid = gtk_tree_model_iter_next (model, &amp;iter))
    }
}
</programlisting>
</example>
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkTreeModel">struct GtkTreeModel</title>
<programlisting>struct GtkTreeModel;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GtkTreeIter">struct GtkTreeIter</title>
<programlisting>struct GtkTreeIter
{
  gint stamp;
  gpointer user_data;
  gpointer user_data2;
  gpointer user_data3;
};
</programlisting>
<para>
The <structname>GtkTreeIter</structname> is the primary structure for
accessing a structure.  Models are expected to put a unique integer in
the <structfield>stamp</structfield> member, and put model-specific
data in the three <structfield>user_data</structfield> members.
</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="gint">gint</link> <structfield>stamp</structfield></entry>
<entry>A unique stamp to catch invalid iterators
</entry>
</row>
<row>
<entry><link linkend="gpointer">gpointer</link> <structfield>user_data</structfield></entry>
<entry>Model specific data
</entry>
</row>
<row>
<entry><link linkend="gpointer">gpointer</link> <structfield>user_data2</structfield></entry>
<entry>Model specific data
</entry>
</row>
<row>
<entry><link linkend="gpointer">gpointer</link> <structfield>user_data3</structfield></entry>
<entry>Model specific data

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GtkTreePath">struct GtkTreePath</title>
<programlisting>struct GtkTreePath;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GtkTreeRowReference">struct GtkTreeRowReference</title>
<programlisting>struct GtkTreeRowReference;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GtkTreeModelIface">struct GtkTreeModelIface</title>
<programlisting>struct GtkTreeModelIface
{
  GTypeInterface g_iface;

  /* Signals */
  void         (* row_changed)           (GtkTreeModel *tree_model,
					  GtkTreePath  *path,
					  GtkTreeIter  *iter);
  void         (* row_inserted)          (GtkTreeModel *tree_model,
					  GtkTreePath  *path,
					  GtkTreeIter  *iter);
  void         (* row_has_child_toggled) (GtkTreeModel *tree_model,
					  GtkTreePath  *path,
					  GtkTreeIter  *iter);
  void         (* row_deleted)           (GtkTreeModel *tree_model,
					  GtkTreePath  *path);
  void         (* rows_reordered)        (GtkTreeModel *tree_model,
					  GtkTreePath  *path,
					  GtkTreeIter  *iter,
					  gint         *new_order);

  /* Virtual Table */
  GtkTreeModelFlags (* get_flags)  (GtkTreeModel *tree_model);   

  gint         (* get_n_columns)   (GtkTreeModel *tree_model);
  GType        (* get_column_type) (GtkTreeModel *tree_model,
				    gint          index);
  gboolean     (* get_iter)        (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter,
				    GtkTreePath  *path);
  GtkTreePath *(* get_path)        (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter);
  void         (* get_value)       (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter,
				    gint          column,
				    GValue       *value);
  gboolean     (* iter_next)       (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter);
  gboolean     (* iter_children)   (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter,
				    GtkTreeIter  *parent);
  gboolean     (* iter_has_child)  (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter);
  gint         (* iter_n_children) (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter);
  gboolean     (* iter_nth_child)  (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter,
				    GtkTreeIter  *parent,
				    gint          n);
  gboolean     (* iter_parent)     (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter,
				    GtkTreeIter  *child);
  void         (* ref_node)        (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter);
  void         (* unref_node)      (GtkTreeModel *tree_model,
				    GtkTreeIter  *iter);
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GtkTreeModelForeachFunc">GtkTreeModelForeachFunc ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    (*GtkTreeModelForeachFunc)      (<link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>model</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>data</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GtkTreeModelFlags">enum GtkTreeModelFlags</title>
<programlisting>typedef enum
{
  GTK_TREE_MODEL_ITERS_PERSIST = 1 &lt;&lt; 0,
  GTK_TREE_MODEL_LIST_ONLY = 1 &lt;&lt; 1
} GtkTreeModelFlags;
</programlisting>
<para>
These flags indicate various properties of a <link linkend="GtkTreeModel">GtkTreeModel</link>.  They are
returned by <link linkend="gtk-tree-model-get-flags">gtk_tree_model_get_flags</link>(), and must be static for the
lifetime of the object.  A more complete description of
<link linkend="GTK-TREE-MODEL-ITERS-PERSIST-CAPS">GTK_TREE_MODEL_ITERS_PERSIST</link> can be found in the overview of this
section.
</para><informaltable pgwide="1" frame="none" role="enum">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><literal>GTK_TREE_MODEL_ITERS_PERSIST</literal></entry>
<entry>Iterators survive all signals emitted by the tree.
</entry>
</row>
<row>
<entry><literal>GTK_TREE_MODEL_LIST_ONLY</literal></entry>
<entry>The model is a list only, and never has children

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-new">gtk_tree_path_new ()</title>
<programlisting><link linkend="GtkTreePath">GtkTreePath</link>* gtk_tree_path_new              (void);</programlisting>
<para>
Creates a new <link linkend="GtkTreePath">GtkTreePath</link>.  This structure refers to a row.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly created <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-new-from-string">gtk_tree_path_new_from_string ()</title>
<programlisting><link linkend="GtkTreePath">GtkTreePath</link>* gtk_tree_path_new_from_string  (const <link linkend="gchar">gchar</link> *path);</programlisting>
<para>
Creates a new <link linkend="GtkTreePath">GtkTreePath</link> initialized to <parameter>path</parameter>.  <parameter>path</parameter> is expected to be a
colon separated list of numbers.  For example, the string "10:4:0" would
create a path of depth 3 pointing to the 11th child of the root node, the 5th
child of that 11th child, and the 1st child of that 5th child.  If an invalid
path string is passed in, <literal>NULL</literal> is returned.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> The string representation of a path.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly-created <link linkend="GtkTreePath">GtkTreePath</link>, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-to-string">gtk_tree_path_to_string ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gtk_tree_path_to_string         (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Generates a string representation of the path.  This string is a ':'
separated list of numbers.  For example, "4:10:0:3" would be an acceptable return value for this string.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly-allocated string.  Must be freed with <link linkend="g-free">g_free</link>().
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-new-first">gtk_tree_path_new_first ()</title>
<programlisting><link linkend="GtkTreePath">GtkTreePath</link>* gtk_tree_path_new_first        (void);</programlisting>
<para>
Creates a new <link linkend="GtkTreePath">GtkTreePath</link>.  The string representation of this path is "0"</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A new <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-new-root">gtk_tree_path_new_root()</title>
<programlisting>#define gtk_tree_path_new_root() gtk_tree_path_new_first()
</programlisting>
<para>
A alternate name for <link linkend="gtk-tree-path-new-root">gtk_tree_path_new_root</link>() provided for
compatibility reasons; this macro will be deprecated in future
versions of GTK+.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>A new <link linkend="GtkTreePath">GtkTreePath</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-append-index">gtk_tree_path_append_index ()</title>
<programlisting>void        gtk_tree_path_append_index      (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="gint">gint</link> index);</programlisting>
<para>
Appends a new index to a path.  As a result, the depth of the path is
increased.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><parameter>index</parameter>&nbsp;:</entry>
<entry> The index.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-prepend-index">gtk_tree_path_prepend_index ()</title>
<programlisting>void        gtk_tree_path_prepend_index     (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="gint">gint</link> index);</programlisting>
<para>
Prepends a new index to a path.  As a result, the depth of the path is
increased.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><parameter>index</parameter>&nbsp;:</entry>
<entry> The index.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-get-depth">gtk_tree_path_get_depth ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_tree_path_get_depth         (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Returns the current depth of <parameter>path</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The depth of <parameter>path</parameter>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-get-indices">gtk_tree_path_get_indices ()</title>
<programlisting><link linkend="gint">gint</link>*       gtk_tree_path_get_indices       (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Returns the current indices of <parameter>path</parameter>.  This is an array of integers, each
representing a node in a tree.  This value should not be freed.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The current indices, or <literal>NULL</literal>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-free">gtk_tree_path_free ()</title>
<programlisting>void        gtk_tree_path_free              (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Frees <parameter>path</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-copy">gtk_tree_path_copy ()</title>
<programlisting><link linkend="GtkTreePath">GtkTreePath</link>* gtk_tree_path_copy             (const <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Creates a new <link linkend="GtkTreePath">GtkTreePath</link> as a copy of <parameter>path</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A new <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-compare">gtk_tree_path_compare ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_tree_path_compare           (const <link linkend="GtkTreePath">GtkTreePath</link> *a,
                                             const <link linkend="GtkTreePath">GtkTreePath</link> *b);</programlisting>
<para>
Compares two paths.  If <parameter>a</parameter> appears before <parameter>b</parameter> in a tree, then -1 is returned.
If <parameter>b</parameter> appears before <parameter>a</parameter>, then 1 is returned.  If the two nodes are equal,
then 0 is returned.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>a</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><parameter>b</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link> to compare with.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The relative positions of <parameter>a</parameter> and <parameter>b</parameter>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-next">gtk_tree_path_next ()</title>
<programlisting>void        gtk_tree_path_next              (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Moves the <parameter>path</parameter> to point to the next node at the current depth.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-prev">gtk_tree_path_prev ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_path_prev              (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Moves the <parameter>path</parameter> to point to the previous node at the current depth, if it exists.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>path</parameter> has a previous node, and the move was made.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-up">gtk_tree_path_up ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_path_up                (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Moves the <parameter>path</parameter> to point to it's parent node, if it has a parent.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>path</parameter> has a parent, and the move was made.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-down">gtk_tree_path_down ()</title>
<programlisting>void        gtk_tree_path_down              (<link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Moves <parameter>path</parameter> to point to the first child of the current path.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-is-ancestor">gtk_tree_path_is_ancestor ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_path_is_ancestor       (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *descendant);</programlisting>
<para>
Returns <literal>TRUE</literal> if <parameter>descendant</parameter> is a descendant of <parameter>path</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkTreePath">GtkTreePath</link>
</entry></row>
<row><entry align="right"><parameter>descendant</parameter>&nbsp;:</entry>
<entry> another <link linkend="GtkTreePath">GtkTreePath</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>descendant</parameter> is contained inside <parameter>path</parameter>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-path-is-descendant">gtk_tree_path_is_descendant ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_path_is_descendant     (<link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *ancestor);</programlisting>
<para>
Returns <literal>TRUE</literal> if <parameter>path</parameter> is a descendant of <parameter>ancestor</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkTreePath">GtkTreePath</link>
</entry></row>
<row><entry align="right"><parameter>ancestor</parameter>&nbsp;:</entry>
<entry> another <link linkend="GtkTreePath">GtkTreePath</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>ancestor</parameter> contains <parameter>path</parameter> somewhere below it
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-new">gtk_tree_row_reference_new ()</title>
<programlisting><link linkend="GtkTreeRowReference">GtkTreeRowReference</link>* gtk_tree_row_reference_new
                                            (<link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Creates a row reference based on <parameter>path</parameter>.  This reference will keep pointing to
the node pointed to by <parameter>path</parameter>, so long as it exists.  It listens to all
signals emitted by <parameter>model</parameter>, and updates it's path appropriately.  If <parameter>path</parameter>
isn't a valid path in <parameter>model</parameter>, then <literal>NULL</literal> is returned.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A valid <link linkend="GtkTreePath">GtkTreePath</link> to monitor
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly allocated <link linkend="GtkTreeRowReference">GtkTreeRowReference</link>, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-new-proxy">gtk_tree_row_reference_new_proxy ()</title>
<programlisting><link linkend="GtkTreeRowReference">GtkTreeRowReference</link>* gtk_tree_row_reference_new_proxy
                                            (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
You do not need to use this function.  Creates a row reference based on
<parameter>path</parameter>.  This reference will keep pointing to the node pointed to by <parameter>path</parameter>, so
long as it exists.  If <parameter>path</parameter> isn't a valid path in <parameter>model</parameter>, then <literal>NULL</literal> is
returned.  However, unlike references created with
<link linkend="gtk-tree-row-reference-new">gtk_tree_row_reference_new</link>(), it does not listen to the model for changes.
The creator of the row reference must do this explicitly using
<link linkend="gtk-tree-row-reference-inserted">gtk_tree_row_reference_inserted</link>(), <link linkend="gtk-tree-row-reference-deleted">gtk_tree_row_reference_deleted</link>(),
<link linkend="gtk-tree-row-reference-reordered">gtk_tree_row_reference_reordered</link>().  This must be called once per signal per
proxy.
</para>
<para>
This type of row reference is primarily meant by structures that need to
carefully monitor exactly when a row_reference updates itself, and is not
generally needed by most applications.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>proxy</parameter>&nbsp;:</entry>
<entry> A proxy <link linkend="GObject">GObject</link>
</entry></row>
<row><entry align="right"><parameter>model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A valid <link linkend="GtkTreePath">GtkTreePath</link> to monitor
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A newly allocated <link linkend="GtkTreeRowReference">GtkTreeRowReference</link>, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-get-path">gtk_tree_row_reference_get_path ()</title>
<programlisting><link linkend="GtkTreePath">GtkTreePath</link>* gtk_tree_row_reference_get_path
                                            (<link linkend="GtkTreeRowReference">GtkTreeRowReference</link> *reference);</programlisting>
<para>
Returns a path that the row reference currently points to, or <literal>NULL</literal> if the
path pointed to is no longer valid.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>reference</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeRowReference">GtkTreeRowReference</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> A current path, or <literal>NULL</literal>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-valid">gtk_tree_row_reference_valid ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_row_reference_valid    (<link linkend="GtkTreeRowReference">GtkTreeRowReference</link> *reference);</programlisting>
<para>
Returns TRUE if the <literal>reference</literal> is non-NULL and refers to a current valid
path.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>reference</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeRowReference">GtkTreeRowReference</link>, or NULL
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE if <literal>reference</literal> points to a valid path.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-free">gtk_tree_row_reference_free ()</title>
<programlisting>void        gtk_tree_row_reference_free     (<link linkend="GtkTreeRowReference">GtkTreeRowReference</link> *reference);</programlisting>
<para>
Free's <literal>reference</literal>.  <literal>reference</literal> may be NULL.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>reference</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeRowReference">GtkTreeRowReference</link>, or NULL
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-inserted">gtk_tree_row_reference_inserted ()</title>
<programlisting>void        gtk_tree_row_reference_inserted (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Lets a set of row reference created by <link linkend="gtk-tree-row-reference-new-proxy">gtk_tree_row_reference_new_proxy</link>()
know that the model emitted the "row_inserted" signal.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>proxy</parameter>&nbsp;:</entry>
<entry> A <link linkend="GObject">GObject</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> The row position that was inserted
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-deleted">gtk_tree_row_reference_deleted ()</title>
<programlisting>void        gtk_tree_row_reference_deleted  (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Lets a set of row reference created by <link linkend="gtk-tree-row-reference-new-proxy">gtk_tree_row_reference_new_proxy</link>()
know that the model emitted the "row_deleted" signal.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>proxy</parameter>&nbsp;:</entry>
<entry> A <link linkend="GObject">GObject</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> The path position that was deleted
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-row-reference-reordered">gtk_tree_row_reference_reordered ()</title>
<programlisting>void        gtk_tree_row_reference_reordered
                                            (<link linkend="GObject">GObject</link> *proxy,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gint">gint</link> *new_order);</programlisting>
<para>
Lets a set of row reference created by <link linkend="gtk-tree-row-reference-new-proxy">gtk_tree_row_reference_new_proxy</link>()
know that the model emitted the "rows_reordered" signal.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>proxy</parameter>&nbsp;:</entry>
<entry> A <link linkend="GObject">GObject</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> The parent path of the reordered signal
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The iter pointing to the parent of the reordered
</entry></row>
<row><entry align="right"><parameter>new_order</parameter>&nbsp;:</entry>
<entry> The new order of rows
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-iter-copy">gtk_tree_iter_copy ()</title>
<programlisting><link linkend="GtkTreeIter">GtkTreeIter</link>* gtk_tree_iter_copy             (<link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Creates a dynamically allocated tree iterator as a copy of <parameter>iter</parameter>.  This
function is not intended for use in applications, because you can just copy
the structs by value (<literal>GtkTreeIter new_iter = iter;</literal>).  You
must free this iter with <link linkend="gtk-tree-iter-free">gtk_tree_iter_free</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a newly-allocated copy of <parameter>iter</parameter>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-iter-free">gtk_tree_iter_free ()</title>
<programlisting>void        gtk_tree_iter_free              (<link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Frees an iterator that has been allocated on the heap.  This function is
mainly used for language bindings.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> A dynamically allocated tree iterator.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-flags">gtk_tree_model_get_flags ()</title>
<programlisting><link linkend="GtkTreeModelFlags">GtkTreeModelFlags</link> gtk_tree_model_get_flags  (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model);</programlisting>
<para>
Returns a set of flags supported by this interface.  The flags are a bitwise
combination of <link linkend="GtkTreeModelFlags">GtkTreeModelFlags</link>.  The flags supported should not change
during the lifecycle of the tree_model.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The flags supported by this interface.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-n-columns">gtk_tree_model_get_n_columns ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_tree_model_get_n_columns    (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model);</programlisting>
<para>
Returns the number of columns supported by <parameter>tree_model</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The number of columns.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-column-type">gtk_tree_model_get_column_type ()</title>
<programlisting><link linkend="GType">GType</link>       gtk_tree_model_get_column_type  (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="gint">gint</link> index);</programlisting>
<para>
Returns the type of the column.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>index</parameter>&nbsp;:</entry>
<entry> The column index.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The type of the column.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-iter">gtk_tree_model_get_iter ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_get_iter         (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Sets <parameter>iter</parameter> to a valid iterator pointing to <parameter>path</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The uninitialized <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>iter</parameter> was set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-iter-from-string">gtk_tree_model_get_iter_from_string ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_get_iter_from_string
                                            (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             const <link linkend="gchar">gchar</link> *path_string);</programlisting>
<para>
Sets <parameter>iter</parameter> to a valid iterator pointing to <parameter>path_string</parameter>, if it
exists. Otherwise, <parameter>iter</parameter> is left invalid and <literal>FALSE</literal> is returned.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> An uninitialized <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><parameter>path_string</parameter>&nbsp;:</entry>
<entry> A string representation of a <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>iter</parameter> was set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-iter-first">gtk_tree_model_get_iter_first ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_get_iter_first   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Initializes <parameter>iter</parameter> with the first iterator in the tree (the one at the path
"0") and returns <literal>TRUE</literal>.  Returns <literal>FALSE</literal> if the tree is empty.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The uninitialized <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>iter</parameter> was set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-iter-root">gtk_tree_model_get_iter_root()</title>
<programlisting>#define gtk_tree_model_get_iter_root(tree_model, iter) gtk_tree_model_get_iter_first(tree_model, iter)
</programlisting>
<para>
A alternate name for <link linkend="gtk-tree-model-get-iter-root">gtk_tree_model_get_iter_root</link>() provided for
compatibility reasons; this macro will be deprecated in future
versions of GTK+.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry>uninitialized <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>iter</parameter> was set.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-path">gtk_tree_model_get_path ()</title>
<programlisting><link linkend="GtkTreePath">GtkTreePath</link>* gtk_tree_model_get_path        (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Returns a newly-created <link linkend="GtkTreePath">GtkTreePath</link> referenced by <parameter>iter</parameter>.  This path should
be freed with <link linkend="gtk-tree-path-free">gtk_tree_path_free</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a newly-created <link linkend="GtkTreePath">GtkTreePath</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-value">gtk_tree_model_get_value ()</title>
<programlisting>void        gtk_tree_model_get_value        (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gint">gint</link> column,
                                             <link linkend="GValue">GValue</link> *value);</programlisting>
<para>
Sets initializes and sets <parameter>value</parameter> to that at <parameter>column</parameter>.  When done with <parameter>value</parameter>,
<link linkend="g-value-unset">g_value_unset</link>() needs to be called to free any allocated memory.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><parameter>column</parameter>&nbsp;:</entry>
<entry> The column to lookup the value at.
</entry></row>
<row><entry align="right"><parameter>value</parameter>&nbsp;:</entry>
<entry> An empty <link linkend="GValue">GValue</link> to set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-iter-next">gtk_tree_model_iter_next ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_iter_next        (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Sets <parameter>iter</parameter> to point to the node following it at the current level.  If there
is no next <parameter>iter</parameter>, <literal>FALSE</literal> is returned and <parameter>iter</parameter> is set to be invalid.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>iter</parameter> has been changed to the next node.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-iter-children">gtk_tree_model_iter_children ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_iter_children    (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *parent);</programlisting>
<para>
Sets <parameter>iter</parameter> to point to the first child of <parameter>parent</parameter>.  If <parameter>parent</parameter> has no children,
<literal>FALSE</literal> is returned and <parameter>iter</parameter> is set to be invalid.  <parameter>parent</parameter> will remain a valid
node after this function has been called.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The new <link linkend="GtkTreeIter">GtkTreeIter</link> to be set to the child.
</entry></row>
<row><entry align="right"><parameter>parent</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>child</parameter> has been set to the first child.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-iter-has-child">gtk_tree_model_iter_has_child ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_iter_has_child   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Returns <literal>TRUE</literal> if <parameter>iter</parameter> has children, <literal>FALSE</literal> otherwise.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link> to test for children.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if <parameter>iter</parameter> has children.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-iter-n-children">gtk_tree_model_iter_n_children ()</title>
<programlisting><link linkend="gint">gint</link>        gtk_tree_model_iter_n_children  (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Returns the number of children that <parameter>iter</parameter> has.  As a special case, if <parameter>iter</parameter>
is <literal>NULL</literal>, then the number of toplevel nodes is returned.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>, or <literal>NULL</literal>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The number of children of <parameter>iter</parameter>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-iter-nth-child">gtk_tree_model_iter_nth_child ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_iter_nth_child   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *parent,
                                             <link linkend="gint">gint</link> n);</programlisting>
<para>
Sets <parameter>iter</parameter> to be the child of <parameter>parent</parameter>, using the given index.  The first
index is 0.  If <parameter>index</parameter> is too big, or <parameter>parent</parameter> has no children, <parameter>iter</parameter> is set
to an invalid iterator and <literal>FALSE</literal> is returned.  <parameter>parent</parameter> will remain a valid
node after this function has been called.  As a special case, if <parameter>parent</parameter> is
<literal>NULL</literal>, then the <parameter>n</parameter><!>th root node is set.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link> to set to the nth child.
</entry></row>
<row><entry align="right"><parameter>parent</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link> to get the child from, or <literal>NULL</literal>.
</entry></row>
<row><entry align="right"><parameter>n</parameter>&nbsp;:</entry>
<entry> Then index of the desired child.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>parent</parameter> has an <parameter>n</parameter><!>th child.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-iter-parent">gtk_tree_model_iter_parent ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    gtk_tree_model_iter_parent      (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *child);</programlisting>
<para>
Sets <parameter>iter</parameter> to be the parent of <parameter>child</parameter>.  If <parameter>child</parameter> is at the toplevel, and
doesn't have a parent, then <parameter>iter</parameter> is set to an invalid iterator and <literal>FALSE</literal>
is returned.  <parameter>child</parameter> will remain a valid node after this function has been
called.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The new <link linkend="GtkTreeIter">GtkTreeIter</link> to set to the parent.
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal>, if <parameter>iter</parameter> is set to the parent of <parameter>child</parameter>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-ref-node">gtk_tree_model_ref_node ()</title>
<programlisting>void        gtk_tree_model_ref_node         (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Lets the tree ref the node.  This is an optional method for models to
implement.  To be more specific, models may ignore this call as it exists
primarily for performance reasons.
</para>
<para>
This function is primarily meant as a way for views to let caching model know
when nodes are being displayed (and hence, whether or not to cache that
node.)  For example, a file-system based model would not want to keep the
entire file-hierarchy in memory, just the sections that are currently being
displayed by every current view.
</para>
<para>
A model should be expected to be able to get an iter independent of it's
reffed state.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-unref-node">gtk_tree_model_unref_node ()</title>
<programlisting>void        gtk_tree_model_unref_node       (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Lets the tree unref the node.  This is an optional method for models to
implement.  To be more specific, models may ignore this call as it exists
primarily for performance reasons.
</para>
<para>
For more information on what this means, see <link linkend="gtk-tree-model-ref-node">gtk_tree_model_ref_node</link>().
Please note that nodes that are deleted are not unreffed.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>.
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> The <link linkend="GtkTreeIter">GtkTreeIter</link>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get">gtk_tree_model_get ()</title>
<programlisting>void        gtk_tree_model_get              (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             ...);</programlisting>
<para>
Gets the value of one or more cells in the row referenced by <parameter>iter</parameter>.
The variable argument list should contain integer column numbers,
each column number followed by a place to store the value being
retrieved.  The list is terminated by a -1. For example, to get a
value from column 0 with type <literal>G_TYPE_STRING</literal>, you would
write: <literal>gtk_tree_model_get (model, iter, 0, &amp;place_string_here, -1)</literal>,
where <literal>place_string_here</literal> is a <type>gchar*</type> to be 
filled with the string.
If appropriate, the returned values have to be freed or unreferenced.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> a row in <parameter>tree_model</parameter>
</entry></row>
<row><entry align="right"><parameter>...</parameter>&nbsp;:</entry>
<entry> pairs of column number and value return locations, terminated by -1
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-get-valist">gtk_tree_model_get_valist ()</title>
<programlisting>void        gtk_tree_model_get_valist       (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             va_list var_args);</programlisting>
<para>
See <link linkend="gtk-tree-model-get">gtk_tree_model_get</link>(), this version takes a <type>va_list</type> 
for language bindings to use.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> a row in <parameter>tree_model</parameter>
</entry></row>
<row><entry align="right"><parameter>var_args</parameter>&nbsp;:</entry>
<entry> <type>va_list</type> of column/return location pairs
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-foreach">gtk_tree_model_foreach ()</title>
<programlisting>void        gtk_tree_model_foreach          (<link linkend="GtkTreeModel">GtkTreeModel</link> *model,
                                             <link linkend="GtkTreeModelForeachFunc">GtkTreeModelForeachFunc</link> func,
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Calls func on each node in model in a depth-first fashion.  If func returns
<literal>TRUE</literal>, then the tree ceases to be walked, and <link linkend="gtk-tree-model-foreach">gtk_tree_model_foreach</link>() returns.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>func</parameter>&nbsp;:</entry>
<entry> A function to be called on each row
</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry> User data to passed to func.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-row-changed">gtk_tree_model_row_changed ()</title>
<programlisting>void        gtk_tree_model_row_changed      (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Emits the "row_changed" signal on <parameter>tree_model</parameter>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link> pointing to the changed row
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> A valid <link linkend="GtkTreeIter">GtkTreeIter</link> pointing to the changed row
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-row-inserted">gtk_tree_model_row_inserted ()</title>
<programlisting>void        gtk_tree_model_row_inserted     (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Emits the "row_inserted" signal on <parameter>tree_model</parameter></para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link> pointing to the inserted row
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> A valid <link linkend="GtkTreeIter">GtkTreeIter</link> pointing to the inserted row
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-row-has-child-toggled">gtk_tree_model_row_has_child_toggled ()</title>
<programlisting>void        gtk_tree_model_row_has_child_toggled
                                            (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter);</programlisting>
<para>
Emits the "row_has_child_toggled" signal on <parameter>tree_model</parameter>.  This should be
called by models after the child state of a node changes.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link> pointing to the changed row
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> A valid <link linkend="GtkTreeIter">GtkTreeIter</link> pointing to the changed row
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-row-deleted">gtk_tree_model_row_deleted ()</title>
<programlisting>void        gtk_tree_model_row_deleted      (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path);</programlisting>
<para>
Emits the "row_deleted" signal on <parameter>tree_model</parameter>.  This should be called by
models after a row has been removed.  The location pointed to by <parameter>path</parameter> should
be the location that the row previously was at.  It may not be a valid
location anymore.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link> pointing to the previous location of the deleted row.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-tree-model-rows-reordered">gtk_tree_model_rows_reordered ()</title>
<programlisting>void        gtk_tree_model_rows_reordered   (<link linkend="GtkTreeModel">GtkTreeModel</link> *tree_model,
                                             <link linkend="GtkTreePath">GtkTreePath</link> *path,
                                             <link linkend="GtkTreeIter">GtkTreeIter</link> *iter,
                                             <link linkend="gint">gint</link> *new_order);</programlisting>
<para>
Emits the "rows_reordered" signal on <parameter>tree_model</parameter>.  This should be called by
models when their rows have been reordered.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>tree_model</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreeModel">GtkTreeModel</link>
</entry></row>
<row><entry align="right"><parameter>path</parameter>&nbsp;:</entry>
<entry> A <link linkend="GtkTreePath">GtkTreePath</link> pointing to the tree node whose children have been reordered
</entry></row>
<row><entry align="right"><parameter>iter</parameter>&nbsp;:</entry>
<entry> A valid <link linkend="GtkTreeIter">GtkTreeIter</link> pointing to the node whose children have been reordered
</entry></row>
<row><entry align="right"><parameter>new_order</parameter>&nbsp;:</entry>
<entry> an array of integers containing the new indices of the children,
     i.e. the former child <literal>n</literal> is now at position
     <parameter>new_order</parameter><literal>[n]</literal>. 
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="GtkTreeView">GtkTreeView</link>, <link linkend="GtkTreeStore">GtkTreeStore</link>, <link linkend="GtkListStore">GtkListStore</link>, <link linkend="gtk-GtkTreeView-drag-and-drop">GtkTreeDnd</link>, <link linkend="GtkTreeSortable">GtkTreeSortable</link>
</para>
</refsect1>

</refentry>
