<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkTreeModel">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTreeModel.top_of_page">GtkTreeModel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkTreeModel</refname>
<refpurpose>The tree interface used by GtkTreeView</refpurpose>
</refnamediv>

<refsect1 id="GtkTreeModel.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="GtkTreeModelForeachFunc">*GtkTreeModelForeachFunc</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-new">gtk_tree_path_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-new-from-string">gtk_tree_path_new_from_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-new-from-indices">gtk_tree_path_new_from_indices</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-new-from-indicesv">gtk_tree_path_new_from_indicesv</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-to-string">gtk_tree_path_to_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-new-first">gtk_tree_path_new_first</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-append-index">gtk_tree_path_append_index</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-prepend-index">gtk_tree_path_prepend_index</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-get-depth">gtk_tree_path_get_depth</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-get-indices">gtk_tree_path_get_indices</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-get-indices-with-depth">gtk_tree_path_get_indices_with_depth</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-free">gtk_tree_path_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-path-copy">gtk_tree_path_copy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-compare">gtk_tree_path_compare</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-next">gtk_tree_path_next</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-prev">gtk_tree_path_prev</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-up">gtk_tree_path_up</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-down">gtk_tree_path_down</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-is-ancestor">gtk_tree_path_is_ancestor</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-path-is-descendant">gtk_tree_path_is_descendant</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeRowReference"><returnvalue>GtkTreeRowReference</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-new">gtk_tree_row_reference_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeRowReference"><returnvalue>GtkTreeRowReference</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-new-proxy">gtk_tree_row_reference_new_proxy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeModel"><returnvalue>GtkTreeModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-get-model">gtk_tree_row_reference_get_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-get-path">gtk_tree_row_reference_get_path</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-valid">gtk_tree_row_reference_valid</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-free">gtk_tree_row_reference_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeRowReference"><returnvalue>GtkTreeRowReference</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-copy">gtk_tree_row_reference_copy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-inserted">gtk_tree_row_reference_inserted</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-deleted">gtk_tree_row_reference_deleted</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-row-reference-reordered">gtk_tree_row_reference_reordered</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeIter"><returnvalue>GtkTreeIter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-iter-copy">gtk_tree_iter_copy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-iter-free">gtk_tree_iter_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeModelFlags"><returnvalue>GtkTreeModelFlags</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-flags">gtk_tree_model_get_flags</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-n-columns">gtk_tree_model_get_n_columns</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GType"><returnvalue>GType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-column-type">gtk_tree_model_get_column_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-iter">gtk_tree_model_get_iter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-iter-from-string">gtk_tree_model_get_iter_from_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-iter-first">gtk_tree_model_get_iter_first</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-path">gtk_tree_model_get_path</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-value">gtk_tree_model_get_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-next">gtk_tree_model_iter_next</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-previous">gtk_tree_model_iter_previous</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-children">gtk_tree_model_iter_children</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-has-child">gtk_tree_model_iter_has_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-n-children">gtk_tree_model_iter_n_children</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-nth-child">gtk_tree_model_iter_nth_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-iter-parent">gtk_tree_model_iter_parent</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-string-from-iter">gtk_tree_model_get_string_from_iter</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-ref-node">gtk_tree_model_ref_node</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-unref-node">gtk_tree_model_unref_node</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get">gtk_tree_model_get</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-get-valist">gtk_tree_model_get_valist</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-foreach">gtk_tree_model_foreach</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-row-changed">gtk_tree_model_row_changed</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-row-inserted">gtk_tree_model_row_inserted</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-row-has-child-toggled">gtk_tree_model_row_has_child_toggled</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-row-deleted">gtk_tree_model_row_deleted</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-rows-reordered">gtk_tree_model_rows_reordered</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-model-rows-reordered-with-length">gtk_tree_model_rows_reordered_with_length</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeModel.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTreeModel-row-changed">row-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTreeModel-row-deleted">row-deleted</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTreeModel-row-has-child-toggled">row-has-child-toggled</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTreeModel-row-inserted">row-inserted</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkTreeModel-rows-reordered">rows-reordered</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="GtkTreeIter"/><anchor id="GtkTreePath"/><refsect1 id="GtkTreeModel.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkTreeModel-struct">GtkTreeModel</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkTreeIter-struct">GtkTreeIter</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkTreePath-struct">GtkTreePath</link></entry></row>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkTreeRowReference">GtkTreeRowReference</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkTreeModelIface">GtkTreeModelIface</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkTreeModelFlags">GtkTreeModelFlags</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeModel.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GBoxed">GBoxed</link>
    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> GtkTreeIter
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkTreePath
    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkTreeModel
</screen>
</refsect1>
<refsect1 id="GtkTreeModel.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkTreeModel requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>
<refsect1 id="GtkTreeModel.derived-interfaces" role="derived_interfaces">
<title role="derived_interfaces.title">Known Derived Interfaces</title>
<para>
GtkTreeModel is required by
 <link linkend="GtkTreeSortable">GtkTreeSortable</link>.</para>

</refsect1>
<refsect1 id="GtkTreeModel.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkTreeModel is implemented by
 <link linkend="GtkListStore">GtkListStore</link>,  <link linkend="GtkTreeModelFilter">GtkTreeModelFilter</link>,  <link linkend="GtkTreeModelSort">GtkTreeModelSort</link> and  <link linkend="GtkTreeStore">GtkTreeStore</link>.</para>

</refsect1>

<refsect1 id="GtkTreeModel.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkTreeModel.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> interface defines a generic tree interface for
use by the <link linkend="GtkTreeView"><type>GtkTreeView</type></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"><type>GtkTreeView</type></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"><type>G_TYPE_INT</type></link>, <link linkend="GTK-TYPE-BUTTON:CAPS"><type>GTK_TYPE_BUTTON</type></link>, <link linkend="G-TYPE-POINTER:CAPS"><type>G_TYPE_POINTER</type></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
— the <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link> and the <link linkend="GtkListStore"><type>GtkListStore</type></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-struct"><type>GtkTreePath</type></link> and
the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> (“iter” is short for iterator). Most of the
interface consists of operations on a <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></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-struct"><type>GtkTreePath</type></link> 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 <literal>0</literal> refers to the root
node and the path <literal>2:4</literal> refers to the fifth child of
the third node.</para>
<para>By contrast, a <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></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"><function>gtk_tree_model_get_iter()</function></link>. These iterators are the primary way
of accessing a model and are similar to the iterators used by
<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>. They are generally statically allocated on the
stack 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"><type>GtkListStore</type></link> model, which is internally a simple
linked list, stores a list node in one of the pointers. The
<link linkend="GtkTreeModelSort"><type>GtkTreeModelSort</type></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"><type>GtkTreeStore</type></link> and <link linkend="GtkListStore"><type>GtkListStore</type></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"><type>GTK_TREE_MODEL_ITERS_PERSIST</type></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 <literal>3:2:5</literal>. While the first method shown is
easier, the second is much more common, as you often get paths from
callbacks.</para>
<refsect3><title>Acquiring a <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></title><informalexample><programlisting role="example"><![CDATA[
// 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,
                                     &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, &iter, path);
gtk_tree_path_free (path);

// walk the tree to find the iterator
gtk_tree_model_iter_nth_child (model, &iter,
                               NULL, 3);
parent_iter = iter;
gtk_tree_model_iter_nth_child (model, &iter,
                               &parent_iter, 2);
parent_iter = iter;
gtk_tree_model_iter_nth_child (model, &iter,
                               &parent_iter, 5);
]]></programlisting></informalexample>
<para></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
<link linkend="populate-model"><function>populate_model()</function></link> function used below is not
shown, as it is specific to the <link linkend="GtkListStore"><type>GtkListStore</type></link>. For information on
how to write such a function, see the <link linkend="GtkListStore"><type>GtkListStore</type></link> documentation.</para>
</refsect3>
<refsect3><title>Reading data from a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></title><informalexample><programlisting role="example"><![CDATA[
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, check it is valid and walk
// through the list, reading each row.

valid = gtk_tree_model_get_iter_first (list_store,
                                       &iter);
while (valid)
 {
   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, &iter,
                       STRING_COLUMN, &str_data,
                       INT_COLUMN, &int_data,
                       -1);

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

   valid = gtk_tree_model_iter_next (list_store,
                                     &iter);
   row_count++;
 }
]]></programlisting></informalexample>
<para></para>
<para>The <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> interface contains two methods for reference
counting: <link linkend="gtk-tree-model-ref-node"><function>gtk_tree_model_ref_node()</function></link> and <link linkend="gtk-tree-model-unref-node"><function>gtk_tree_model_unref_node()</function></link>.
These two methods are optional to implement. The reference counting
is meant as a way for views to let models know when nodes are being
displayed. <link linkend="GtkTreeView"><type>GtkTreeView</type></link> will take a reference on a node when it is
visible, which means the node is either in the toplevel or expanded.
Being displayed does not mean that the node is currently directly
visible to the user in the viewport. Based on this reference counting
scheme a caching model, for example, can decide whether or not to cache
a node based on the reference count. A file-system based model would
not want to keep the entire file hierarchy in memory, but just the
folders that are currently expanded in every current view.</para>
<para>When working with reference counting, the following rules must be taken
into account:</para>
<itemizedlist>
<listitem>
<para>Never take a reference on a node without owning a reference on its parent.
This means that all parent nodes of a referenced node must be referenced
as well.</para>
</listitem>
<listitem>
<para>Outstanding references on a deleted node are not released. This is not
possible because the node has already been deleted by the time the
row-deleted signal is received.</para>
</listitem>
<listitem><para>Models are not obligated to emit a signal on rows of which none of its
siblings are referenced. To phrase this differently, signals are only
required for levels in which nodes are referenced. For the root level
however, signals must be emitted at all times (however the root level
is always referenced when any view is attached).</para></listitem>
</itemizedlist>
</refsect3>

</refsect1>
<refsect1 id="GtkTreeModel.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="GtkTreeModelForeachFunc" role="function">
<title>GtkTreeModelForeachFunc&#160;()</title>
<indexterm zone="GtkTreeModelForeachFunc"><primary>GtkTreeModelForeachFunc</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GtkTreeModelForeachFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *model</parameter>,
                            <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                            <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>Type of the callback passed to <link linkend="gtk-tree-model-foreach"><function>gtk_tree_model_foreach()</function></link> to
iterate over the rows in a tree model.</para>
<refsect3 id="GtkTreeModelForeachFunc.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> being iterated</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>the current <link linkend="GtkTreePath"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the current <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>The user data passed to <link linkend="gtk-tree-model-foreach"><function>gtk_tree_model_foreach()</function></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GtkTreeModelForeachFunc.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to stop iterating, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> to continue</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-new" role="function">
<title>gtk_tree_path_new&#160;()</title>
<indexterm zone="gtk-tree-path-new"><primary>gtk_tree_path_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_path_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link>.
This refers to a row.</para>
<refsect3 id="gtk-tree-path-new.returns" role="returns">
<title>Returns</title>
<para> A newly created <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-new-from-string" role="function">
<title>gtk_tree_path_new_from_string&#160;()</title>
<indexterm zone="gtk-tree-path-new-from-string"><primary>gtk_tree_path_new_from_string</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_path_new_from_string (<parameter>const <link linkend="gchar"><type>gchar</type></link> *path</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> initialized to <parameter>path</parameter>
.</para>
<para><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, <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.</para>
<refsect3 id="gtk-tree-path-new-from-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>The string representation of a path</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-new-from-string.returns" role="returns">
<title>Returns</title>
<para> A newly-created <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-new-from-indices" role="function">
<title>gtk_tree_path_new_from_indices&#160;()</title>
<indexterm zone="gtk-tree-path-new-from-indices"><primary>gtk_tree_path_new_from_indices</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_path_new_from_indices (<parameter><link linkend="gint"><type>gint</type></link> first_index</parameter>,
                                <parameter>...</parameter>);</programlisting>
<para>Creates a new path with <parameter>first_index</parameter>
 and <parameter>varargs</parameter>
 as indices.</para>
<refsect3 id="gtk-tree-path-new-from-indices.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>first_index</para></entry>
<entry role="parameter_description"><para>first integer</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>list of integers terminated by -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-new-from-indices.returns" role="returns">
<title>Returns</title>
<para> A newly created <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-new-from-indicesv" role="function">
<title>gtk_tree_path_new_from_indicesv&#160;()</title>
<indexterm zone="gtk-tree-path-new-from-indicesv"><primary>gtk_tree_path_new_from_indicesv</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_path_new_from_indicesv (<parameter><link linkend="gint"><type>gint</type></link> *indices</parameter>,
                                 <parameter><link linkend="gsize"><type>gsize</type></link> length</parameter>);</programlisting>
<para>Creates a new path with the given <parameter>indices</parameter>
 array of <parameter>length</parameter>
.</para>

<para><emphasis role="annotation">[<acronym>rename-to</acronym> gtk_tree_path_new_from_indices]</emphasis></para><refsect3 id="gtk-tree-path-new-from-indicesv.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>indices</para></entry>
<entry role="parameter_description"><para>array of indices. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=length]</emphasis></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>length of <parameter>indices</parameter>
array</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-new-from-indicesv.returns" role="returns">
<title>Returns</title>
<para> A newly created <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-to-string" role="function">
<title>gtk_tree_path_to_string&#160;()</title>
<indexterm zone="gtk-tree-path-to-string"><primary>gtk_tree_path_to_string</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_tree_path_to_string (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Generates a string representation of the path.</para>
<para>This string is a “:” separated list of numbers.
For example, “4:10:0:3” would be an acceptable
return value for this string.</para>
<refsect3 id="gtk-tree-path-to-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-to-string.returns" role="returns">
<title>Returns</title>
<para> A newly-allocated string.
Must be freed with <link linkend="g-free"><function>g_free()</function></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-new-first" role="function">
<title>gtk_tree_path_new_first&#160;()</title>
<indexterm zone="gtk-tree-path-new-first"><primary>gtk_tree_path_new_first</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_path_new_first (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link>.</para>
<para>The string representation of this path is “0”.</para>
<refsect3 id="gtk-tree-path-new-first.returns" role="returns">
<title>Returns</title>
<para> A new <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-append-index" role="function">
<title>gtk_tree_path_append_index&#160;()</title>
<indexterm zone="gtk-tree-path-append-index"><primary>gtk_tree_path_append_index</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_path_append_index (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                            <parameter><link linkend="gint"><type>gint</type></link> index_</parameter>);</programlisting>
<para>Appends a new index to a path.</para>
<para>As a result, the depth of the path is increased.</para>
<refsect3 id="gtk-tree-path-append-index.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the index</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-prepend-index" role="function">
<title>gtk_tree_path_prepend_index&#160;()</title>
<indexterm zone="gtk-tree-path-prepend-index"><primary>gtk_tree_path_prepend_index</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_path_prepend_index (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                             <parameter><link linkend="gint"><type>gint</type></link> index_</parameter>);</programlisting>
<para>Prepends a new index to a path.</para>
<para>As a result, the depth of the path is increased.</para>
<refsect3 id="gtk-tree-path-prepend-index.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the index</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-get-depth" role="function">
<title>gtk_tree_path_get_depth&#160;()</title>
<indexterm zone="gtk-tree-path-get-depth"><primary>gtk_tree_path_get_depth</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_tree_path_get_depth (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Returns the current depth of <parameter>path</parameter>
.</para>
<refsect3 id="gtk-tree-path-get-depth.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-get-depth.returns" role="returns">
<title>Returns</title>
<para> The depth of <parameter>path</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-get-indices" role="function">
<title>gtk_tree_path_get_indices&#160;()</title>
<indexterm zone="gtk-tree-path-get-indices"><primary>gtk_tree_path_get_indices</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>&#160;*
gtk_tree_path_get_indices (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Returns the current indices of <parameter>path</parameter>
.</para>
<para>This is an array of integers, each representing a node in a tree.
This value should not be freed.</para>
<para>The length of the array can be obtained with <link linkend="gtk-tree-path-get-depth"><function>gtk_tree_path_get_depth()</function></link>.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-tree-path-get-indices.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-get-indices.returns" role="returns">
<title>Returns</title>
<para> The current indices, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-get-indices-with-depth" role="function">
<title>gtk_tree_path_get_indices_with_depth&#160;()</title>
<indexterm zone="gtk-tree-path-get-indices-with-depth"><primary>gtk_tree_path_get_indices_with_depth</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>&#160;*
gtk_tree_path_get_indices_with_depth (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                                      <parameter><link linkend="gint"><type>gint</type></link> *depth</parameter>);</programlisting>
<para>Returns the current indices of <parameter>path</parameter>
.</para>
<para>This is an array of integers, each representing a node in a tree.
It also returns the number of elements in the array.
The array should not be freed.</para>

<para><emphasis role="annotation">[<acronym>rename-to</acronym> gtk_tree_path_get_indices]</emphasis></para><refsect3 id="gtk-tree-path-get-indices-with-depth.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>depth</para></entry>
<entry role="parameter_description"><para>return location for number of elements
returned in the integer array, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-get-indices-with-depth.returns" role="returns">
<title>Returns</title>
<para>The current
indices, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>array</acronym> length=depth][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-free" role="function">
<title>gtk_tree_path_free&#160;()</title>
<indexterm zone="gtk-tree-path-free"><primary>gtk_tree_path_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_path_free (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Frees <parameter>path</parameter>
. If <parameter>path</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, it simply returns.</para>
<refsect3 id="gtk-tree-path-free.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-copy" role="function">
<title>gtk_tree_path_copy&#160;()</title>
<indexterm zone="gtk-tree-path-copy"><primary>gtk_tree_path_copy</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_path_copy (<parameter>const <link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> as a copy of <parameter>path</parameter>
.</para>
<refsect3 id="gtk-tree-path-copy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-copy.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-compare" role="function">
<title>gtk_tree_path_compare&#160;()</title>
<indexterm zone="gtk-tree-path-compare"><primary>gtk_tree_path_compare</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_tree_path_compare (<parameter>const <link linkend="GtkTreePath"><type>GtkTreePath</type></link> *a</parameter>,
                       <parameter>const <link linkend="GtkTreePath"><type>GtkTreePath</type></link> *b</parameter>);</programlisting>
<para>Compares two paths.</para>
<para>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>
<refsect3 id="gtk-tree-path-compare.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>a</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>b</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> to compare with</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-compare.returns" role="returns">
<title>Returns</title>
<para> the relative positions of <parameter>a</parameter>
and <parameter>b</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-next" role="function">
<title>gtk_tree_path_next&#160;()</title>
<indexterm zone="gtk-tree-path-next"><primary>gtk_tree_path_next</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_path_next (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Moves the <parameter>path</parameter>
 to point to the next node at the current depth.</para>
<refsect3 id="gtk-tree-path-next.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-prev" role="function">
<title>gtk_tree_path_prev&#160;()</title>
<indexterm zone="gtk-tree-path-prev"><primary>gtk_tree_path_prev</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_path_prev (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Moves the <parameter>path</parameter>
 to point to the previous node at the
current depth, if it exists.</para>
<refsect3 id="gtk-tree-path-prev.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-prev.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>path</parameter>
has a previous node, and
the move was made</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-up" role="function">
<title>gtk_tree_path_up&#160;()</title>
<indexterm zone="gtk-tree-path-up"><primary>gtk_tree_path_up</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_path_up (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Moves the <parameter>path</parameter>
 to point to its parent node, if it has a parent.</para>
<refsect3 id="gtk-tree-path-up.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-up.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>path</parameter>
has a parent, and the move was made</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-down" role="function">
<title>gtk_tree_path_down&#160;()</title>
<indexterm zone="gtk-tree-path-down"><primary>gtk_tree_path_down</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_path_down (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Moves <parameter>path</parameter>
 to point to the first child of the current path.</para>
<refsect3 id="gtk-tree-path-down.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-is-ancestor" role="function">
<title>gtk_tree_path_is_ancestor&#160;()</title>
<indexterm zone="gtk-tree-path-is-ancestor"><primary>gtk_tree_path_is_ancestor</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_path_is_ancestor (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                           <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *descendant</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>descendant</parameter>
 is a descendant of <parameter>path</parameter>
.</para>
<refsect3 id="gtk-tree-path-is-ancestor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>descendant</para></entry>
<entry role="parameter_description"><para>another <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-is-ancestor.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>descendant</parameter>
is contained inside <parameter>path</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-path-is-descendant" role="function">
<title>gtk_tree_path_is_descendant&#160;()</title>
<indexterm zone="gtk-tree-path-is-descendant"><primary>gtk_tree_path_is_descendant</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_path_is_descendant (<parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                             <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *ancestor</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>path</parameter>
 is a descendant of <parameter>ancestor</parameter>
.</para>
<refsect3 id="gtk-tree-path-is-descendant.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ancestor</para></entry>
<entry role="parameter_description"><para>another <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-path-is-descendant.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>ancestor</parameter>
contains <parameter>path</parameter>
somewhere below it</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-new" role="function">
<title>gtk_tree_row_reference_new&#160;()</title>
<indexterm zone="gtk-tree-row-reference-new"><primary>gtk_tree_row_reference_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeRowReference"><returnvalue>GtkTreeRowReference</returnvalue></link>&#160;*
gtk_tree_row_reference_new (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *model</parameter>,
                            <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Creates a row reference based on <parameter>path</parameter>
.</para>
<para>This reference will keep pointing to the node pointed to
by <parameter>path</parameter>
, so long as it exists. Any changes that occur on <parameter>model</parameter>
 are
propagated, and the path is updated appropriately. If
<parameter>path</parameter>
 isn’t a valid path in <parameter>model</parameter>
, then <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned.</para>
<refsect3 id="gtk-tree-row-reference-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> to monitor</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-row-reference-new.returns" role="returns">
<title>Returns</title>
<para> a newly allocated <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-new-proxy" role="function">
<title>gtk_tree_row_reference_new_proxy&#160;()</title>
<indexterm zone="gtk-tree-row-reference-new-proxy"><primary>gtk_tree_row_reference_new_proxy</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeRowReference"><returnvalue>GtkTreeRowReference</returnvalue></link>&#160;*
gtk_tree_row_reference_new_proxy (<parameter><link linkend="GObject"><type>GObject</type></link> *proxy</parameter>,
                                  <parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *model</parameter>,
                                  <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>You do not need to use this function.</para>
<para>Creates a row reference based on <parameter>path</parameter>
.</para>
<para>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 <link linkend="NULL:CAPS"><literal>NULL</literal></link> is returned. However, unlike
references created with <link linkend="gtk-tree-row-reference-new"><function>gtk_tree_row_reference_new()</function></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"><function>gtk_tree_row_reference_inserted()</function></link>, <link linkend="gtk-tree-row-reference-deleted"><function>gtk_tree_row_reference_deleted()</function></link>,
<link linkend="gtk-tree-row-reference-reordered"><function>gtk_tree_row_reference_reordered()</function></link>.</para>
<para>These functions must be called exactly once per proxy when the
corresponding signal on the model is emitted. This single call
updates all row references for that proxy. Since built-in GTK+
objects like <link linkend="GtkTreeView"><type>GtkTreeView</type></link> already use this mechanism internally,
using them as the proxy object will produce unpredictable results.
Further more, passing the same object as <parameter>model</parameter>
 and <parameter>proxy</parameter>

doesn’t work for reasons of internal implementation.</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>
<refsect3 id="gtk-tree-row-reference-new-proxy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>proxy</para></entry>
<entry role="parameter_description"><para>a proxy <link linkend="GObject"><type>GObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> to monitor</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-row-reference-new-proxy.returns" role="returns">
<title>Returns</title>
<para> a newly allocated <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-get-model" role="function">
<title>gtk_tree_row_reference_get_model&#160;()</title>
<indexterm zone="gtk-tree-row-reference-get-model"><primary>gtk_tree_row_reference_get_model</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeModel"><returnvalue>GtkTreeModel</returnvalue></link>&#160;*
gtk_tree_row_reference_get_model (<parameter><link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link> *reference</parameter>);</programlisting>
<para>Returns the model that the row reference is monitoring.</para>
<refsect3 id="gtk-tree-row-reference-get-model.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>reference</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-row-reference-get-model.returns" role="returns">
<title>Returns</title>
<para>the model. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-get-path" role="function">
<title>gtk_tree_row_reference_get_path&#160;()</title>
<indexterm zone="gtk-tree-row-reference-get-path"><primary>gtk_tree_row_reference_get_path</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_row_reference_get_path (<parameter><link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link> *reference</parameter>);</programlisting>
<para>Returns a path that the row reference currently points to,
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the path pointed to is no longer valid.</para>
<refsect3 id="gtk-tree-row-reference-get-path.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>reference</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-row-reference-get-path.returns" role="returns">
<title>Returns</title>
<para>a current path, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-valid" role="function">
<title>gtk_tree_row_reference_valid&#160;()</title>
<indexterm zone="gtk-tree-row-reference-valid"><primary>gtk_tree_row_reference_valid</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_row_reference_valid (<parameter><link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link> *reference</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>reference</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> and refers to
a current valid path.</para>
<refsect3 id="gtk-tree-row-reference-valid.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>reference</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-row-reference-valid.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>reference</parameter>
points to a valid path</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-free" role="function">
<title>gtk_tree_row_reference_free&#160;()</title>
<indexterm zone="gtk-tree-row-reference-free"><primary>gtk_tree_row_reference_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_row_reference_free (<parameter><link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link> *reference</parameter>);</programlisting>
<para>Free’s <parameter>reference</parameter>
. <parameter>reference</parameter>
 may be <link linkend="NULL:CAPS"><literal>NULL</literal></link></para>
<refsect3 id="gtk-tree-row-reference-free.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>reference</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-copy" role="function">
<title>gtk_tree_row_reference_copy&#160;()</title>
<indexterm zone="gtk-tree-row-reference-copy"><primary>gtk_tree_row_reference_copy</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeRowReference"><returnvalue>GtkTreeRowReference</returnvalue></link>&#160;*
gtk_tree_row_reference_copy (<parameter><link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link> *reference</parameter>);</programlisting>
<para>Copies a <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link>.</para>
<refsect3 id="gtk-tree-row-reference-copy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>reference</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeRowReference"><type>GtkTreeRowReference</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-row-reference-copy.returns" role="returns">
<title>Returns</title>
<para> a copy of <parameter>reference</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-inserted" role="function">
<title>gtk_tree_row_reference_inserted&#160;()</title>
<indexterm zone="gtk-tree-row-reference-inserted"><primary>gtk_tree_row_reference_inserted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_row_reference_inserted (<parameter><link linkend="GObject"><type>GObject</type></link> *proxy</parameter>,
                                 <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Lets a set of row reference created by
<link linkend="gtk-tree-row-reference-new-proxy"><function>gtk_tree_row_reference_new_proxy()</function></link> know that the
model emitted the <link linkend="GtkTreeModel-row-inserted"><type>“row-inserted”</type></link> signal.</para>
<refsect3 id="gtk-tree-row-reference-inserted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>proxy</para></entry>
<entry role="parameter_description"><para>a <link linkend="GObject"><type>GObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>the row position that was inserted</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-deleted" role="function">
<title>gtk_tree_row_reference_deleted&#160;()</title>
<indexterm zone="gtk-tree-row-reference-deleted"><primary>gtk_tree_row_reference_deleted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_row_reference_deleted (<parameter><link linkend="GObject"><type>GObject</type></link> *proxy</parameter>,
                                <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Lets a set of row reference created by
<link linkend="gtk-tree-row-reference-new-proxy"><function>gtk_tree_row_reference_new_proxy()</function></link> know that the
model emitted the <link linkend="GtkTreeModel-row-deleted"><type>“row-deleted”</type></link> signal.</para>
<refsect3 id="gtk-tree-row-reference-deleted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>proxy</para></entry>
<entry role="parameter_description"><para>a <link linkend="GObject"><type>GObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>the path position that was deleted</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-row-reference-reordered" role="function">
<title>gtk_tree_row_reference_reordered&#160;()</title>
<indexterm zone="gtk-tree-row-reference-reordered"><primary>gtk_tree_row_reference_reordered</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_row_reference_reordered (<parameter><link linkend="GObject"><type>GObject</type></link> *proxy</parameter>,
                                  <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                                  <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                                  <parameter><link linkend="gint"><type>gint</type></link> *new_order</parameter>);</programlisting>
<para>Lets a set of row reference created by
<link linkend="gtk-tree-row-reference-new-proxy"><function>gtk_tree_row_reference_new_proxy()</function></link> know that the
model emitted the <link linkend="GtkTreeModel-rows-reordered"><type>“rows-reordered”</type></link> signal.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-tree-row-reference-reordered.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>proxy</para></entry>
<entry role="parameter_description"><para>a <link linkend="GObject"><type>GObject</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>the parent path of the reordered signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the iter pointing to the parent of the reordered</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_order</para></entry>
<entry role="parameter_description"><para>the new order of rows. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-iter-copy" role="function">
<title>gtk_tree_iter_copy&#160;()</title>
<indexterm zone="gtk-tree-iter-copy"><primary>gtk_tree_iter_copy</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeIter"><returnvalue>GtkTreeIter</returnvalue></link>&#160;*
gtk_tree_iter_copy (<parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Creates a dynamically allocated tree iterator as a copy of <parameter>iter</parameter>
.</para>
<para>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"><function>gtk_tree_iter_free()</function></link>.</para>
<refsect3 id="gtk-tree-iter-copy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-iter-copy.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated copy of <parameter>iter</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-iter-free" role="function">
<title>gtk_tree_iter_free&#160;()</title>
<indexterm zone="gtk-tree-iter-free"><primary>gtk_tree_iter_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_iter_free (<parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Frees an iterator that has been allocated by <link linkend="gtk-tree-iter-copy"><function>gtk_tree_iter_copy()</function></link>.</para>
<para>This function is mainly used for language bindings.</para>
<refsect3 id="gtk-tree-iter-free.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a dynamically allocated tree iterator</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-flags" role="function">
<title>gtk_tree_model_get_flags&#160;()</title>
<indexterm zone="gtk-tree-model-get-flags"><primary>gtk_tree_model_get_flags</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeModelFlags"><returnvalue>GtkTreeModelFlags</returnvalue></link>
gtk_tree_model_get_flags (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>);</programlisting>
<para>Returns a set of flags supported by this interface.</para>
<para>The flags are a bitwise combination of <link linkend="GtkTreeModelFlags"><type>GtkTreeModelFlags</type></link>.
The flags supported should not change during the lifetime
of the <parameter>tree_model</parameter>
.</para>
<refsect3 id="gtk-tree-model-get-flags.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-flags.returns" role="returns">
<title>Returns</title>
<para> the flags supported by this interface</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-n-columns" role="function">
<title>gtk_tree_model_get_n_columns&#160;()</title>
<indexterm zone="gtk-tree-model-get-n-columns"><primary>gtk_tree_model_get_n_columns</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_tree_model_get_n_columns (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>);</programlisting>
<para>Returns the number of columns supported by <parameter>tree_model</parameter>
.</para>
<refsect3 id="gtk-tree-model-get-n-columns.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-n-columns.returns" role="returns">
<title>Returns</title>
<para> the number of columns</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-column-type" role="function">
<title>gtk_tree_model_get_column_type&#160;()</title>
<indexterm zone="gtk-tree-model-get-column-type"><primary>gtk_tree_model_get_column_type</primary></indexterm>
<programlisting language="C"><link linkend="GType"><returnvalue>GType</returnvalue></link>
gtk_tree_model_get_column_type (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> index_</parameter>);</programlisting>
<para>Returns the type of the column.</para>
<refsect3 id="gtk-tree-model-get-column-type.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the column index</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-column-type.returns" role="returns">
<title>Returns</title>
<para> the type of the column</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-iter" role="function">
<title>gtk_tree_model_get_iter&#160;()</title>
<indexterm zone="gtk-tree-model-get-iter"><primary>gtk_tree_model_get_iter</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_get_iter (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                         <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                         <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to a valid iterator pointing to <parameter>path</parameter>
.  If <parameter>path</parameter>
 does
not exist, <parameter>iter</parameter>
 is set to an invalid iterator and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is returned.</para>
<refsect3 id="gtk-tree-model-get-iter.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the uninitialized <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-iter.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
was set</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-iter-from-string" role="function">
<title>gtk_tree_model_get_iter_from_string&#160;()</title>
<indexterm zone="gtk-tree-model-get-iter-from-string"><primary>gtk_tree_model_get_iter_from_string</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_get_iter_from_string (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                                     <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *path_string</parameter>);</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 <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is returned.</para>
<refsect3 id="gtk-tree-model-get-iter-from-string.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>an uninitialized <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>path_string</para></entry>
<entry role="parameter_description"><para>a string representation of a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-iter-from-string.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
was set</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-iter-first" role="function">
<title>gtk_tree_model_get_iter_first&#160;()</title>
<indexterm zone="gtk-tree-model-get-iter-first"><primary>gtk_tree_model_get_iter_first</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_get_iter_first (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                               <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Initializes <parameter>iter</parameter>
 with the first iterator in the tree
(the one at the path "0") and returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>. Returns
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if the tree is empty.</para>
<refsect3 id="gtk-tree-model-get-iter-first.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the uninitialized <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-iter-first.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
was set</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-path" role="function">
<title>gtk_tree_model_get_path&#160;()</title>
<indexterm zone="gtk-tree-model-get-path"><primary>gtk_tree_model_get_path</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreePath"><returnvalue>GtkTreePath</returnvalue></link>&#160;*
gtk_tree_model_get_path (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                         <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Returns a newly-created <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> referenced by <parameter>iter</parameter>
.</para>
<para>This path should be freed with <link linkend="gtk-tree-path-free"><function>gtk_tree_path_free()</function></link>.</para>
<refsect3 id="gtk-tree-model-get-path.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-path.returns" role="returns">
<title>Returns</title>
<para> a newly-created <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-value" role="function">
<title>gtk_tree_model_get_value&#160;()</title>
<indexterm zone="gtk-tree-model-get-value"><primary>gtk_tree_model_get_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_get_value (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                          <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                          <parameter><link linkend="gint"><type>gint</type></link> column</parameter>,
                          <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<para>Initializes and sets <parameter>value</parameter>
 to that at <parameter>column</parameter>
.</para>
<para>When done with <parameter>value</parameter>
, <link linkend="g-value-unset"><function>g_value_unset()</function></link> needs to be called
to free any allocated memory.</para>
<refsect3 id="gtk-tree-model-get-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>column</para></entry>
<entry role="parameter_description"><para>the column to lookup the value at</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>an empty <link linkend="GValue"><type>GValue</type></link> to set. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-next" role="function">
<title>gtk_tree_model_iter_next&#160;()</title>
<indexterm zone="gtk-tree-model-iter-next"><primary>gtk_tree_model_iter_next</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_iter_next (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                          <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to point to the node following it at the current level.</para>
<para>If there is no next <parameter>iter</parameter>
, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is returned and <parameter>iter</parameter>
 is set
to be invalid.</para>
<refsect3 id="gtk-tree-model-iter-next.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>in</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-next.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>iter</parameter>
has been changed to the next node</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-previous" role="function">
<title>gtk_tree_model_iter_previous&#160;()</title>
<indexterm zone="gtk-tree-model-iter-previous"><primary>gtk_tree_model_iter_previous</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_iter_previous (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to point to the previous node at the current level.</para>
<para>If there is no previous <parameter>iter</parameter>
, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is returned and <parameter>iter</parameter>
 is
set to be invalid.</para>
<refsect3 id="gtk-tree-model-iter-previous.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>in</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-previous.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>iter</parameter>
has been changed to the previous node</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-children" role="function">
<title>gtk_tree_model_iter_children&#160;()</title>
<indexterm zone="gtk-tree-model-iter-children"><primary>gtk_tree_model_iter_children</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_iter_children (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                              <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to point to the first child of <parameter>parent</parameter>
.</para>
<para>If <parameter>parent</parameter>
 has no children, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> 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>If <parameter>parent</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link> returns the first node, equivalent to
<literal>gtk_tree_model_get_iter_first (tree_model, iter);</literal></para>
<refsect3 id="gtk-tree-model-iter-children.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the new <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> to be set to the child. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-children.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
has been set to the first child</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-has-child" role="function">
<title>gtk_tree_model_iter_has_child&#160;()</title>
<indexterm zone="gtk-tree-model-iter-has-child"><primary>gtk_tree_model_iter_has_child</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_iter_has_child (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                               <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>iter</parameter>
 has children, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</para>
<refsect3 id="gtk-tree-model-iter-has-child.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> to test for children</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-has-child.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>iter</parameter>
has children</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-n-children" role="function">
<title>gtk_tree_model_iter_n_children&#160;()</title>
<indexterm zone="gtk-tree-model-iter-n-children"><primary>gtk_tree_model_iter_n_children</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_tree_model_iter_n_children (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                                <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Returns the number of children that <parameter>iter</parameter>
 has.</para>
<para>As a special case, if <parameter>iter</parameter>
 is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, then the number
of toplevel nodes is returned.</para>
<refsect3 id="gtk-tree-model-iter-n-children.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-n-children.returns" role="returns">
<title>Returns</title>
<para> the number of children of <parameter>iter</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-nth-child" role="function">
<title>gtk_tree_model_iter_nth_child&#160;()</title>
<indexterm zone="gtk-tree-model-iter-nth-child"><primary>gtk_tree_model_iter_nth_child</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_iter_nth_child (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                               <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                               <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *parent</parameter>,
                               <parameter><link linkend="gint"><type>gint</type></link> n</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to be the child of <parameter>parent</parameter>
, using the given index.</para>
<para>The first index is 0. If <parameter>n</parameter>
 is too big, or <parameter>parent</parameter>
 has no children,
<parameter>iter</parameter>
 is set to an invalid iterator and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> 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 <link linkend="NULL:CAPS"><literal>NULL</literal></link>, then the <parameter>n</parameter>
-th root node
is set.</para>
<refsect3 id="gtk-tree-model-iter-nth-child.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> to set to the nth child. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> to get the child from, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n</para></entry>
<entry role="parameter_description"><para>the index of the desired child</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-nth-child.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>parent</parameter>
has an <parameter>n</parameter>
-th child</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-iter-parent" role="function">
<title>gtk_tree_model_iter_parent&#160;()</title>
<indexterm zone="gtk-tree-model-iter-parent"><primary>gtk_tree_model_iter_parent</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_model_iter_parent (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *child</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to be the parent of <parameter>child</parameter>
.</para>
<para>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 <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is returned.
<parameter>child</parameter>
 will remain a valid node after this function has been
called.</para>
<para><parameter>iter</parameter>
 will be initialized before the lookup is performed, so <parameter>child</parameter>

and <parameter>iter</parameter>
 cannot point to the same memory location.</para>
<refsect3 id="gtk-tree-model-iter-parent.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the new <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> to set to the parent. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-iter-parent.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
is set to the parent of <parameter>child</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-string-from-iter" role="function">
<title>gtk_tree_model_get_string_from_iter&#160;()</title>
<indexterm zone="gtk-tree-model-get-string-from-iter"><primary>gtk_tree_model_get_string_from_iter</primary></indexterm>
<programlisting language="C"><link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_tree_model_get_string_from_iter (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                                     <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Generates a string representation of the iter.</para>
<para>This string is a “:” separated list of numbers.
For example, “4:10:0:3” would be an acceptable
return value for this string.</para>
<refsect3 id="gtk-tree-model-get-string-from-iter.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-model-get-string-from-iter.returns" role="returns">
<title>Returns</title>
<para> a newly-allocated string.
Must be freed with <link linkend="g-free"><function>g_free()</function></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-ref-node" role="function">
<title>gtk_tree_model_ref_node&#160;()</title>
<indexterm zone="gtk-tree-model-ref-node"><primary>gtk_tree_model_ref_node</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_ref_node (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                         <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Lets the tree ref the node.</para>
<para>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 models know when nodes are being displayed (and hence,
whether or not to cache that node). Being displayed means a node
is in an expanded branch, regardless of whether the node is currently
visible in the viewport. 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 its reffed state.</para>
<refsect3 id="gtk-tree-model-ref-node.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-unref-node" role="function">
<title>gtk_tree_model_unref_node&#160;()</title>
<indexterm zone="gtk-tree-model-unref-node"><primary>gtk_tree_model_unref_node</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_unref_node (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                           <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Lets the tree unref the node.</para>
<para>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. For more information on what
this means, see <link linkend="gtk-tree-model-ref-node"><function>gtk_tree_model_ref_node()</function></link>.</para>
<para>Please note that nodes that are deleted are not unreffed.</para>
<refsect3 id="gtk-tree-model-unref-node.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get" role="function">
<title>gtk_tree_model_get&#160;()</title>
<indexterm zone="gtk-tree-model-get"><primary>gtk_tree_model_get</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_get (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                    <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                    <parameter>...</parameter>);</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 <link linkend="G-TYPE-STRING:CAPS"><literal>G_TYPE_STRING</literal></link>, you would
write: <literal>gtk_tree_model_get (model, iter, 0, &amp;amp;place_string_here, -1)</literal>,
where <literal>place_string_here</literal> is a <link linkend="gchararray"><type>gchararray</type></link>
to be filled with the string.</para>
<para>Returned values with type <link linkend="G-TYPE-OBJECT:CAPS"><literal>G_TYPE_OBJECT</literal></link> have to be unreferenced,
values with type <link linkend="G-TYPE-STRING:CAPS"><literal>G_TYPE_STRING</literal></link> or <link linkend="G-TYPE-BOXED:CAPS"><literal>G_TYPE_BOXED</literal></link> have to be freed.
Other values are passed by value.</para>
<refsect3 id="gtk-tree-model-get.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a row in <parameter>tree_model</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>pairs of column number and value return locations,
terminated by -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-get-valist" role="function">
<title>gtk_tree_model_get_valist&#160;()</title>
<indexterm zone="gtk-tree-model-get-valist"><primary>gtk_tree_model_get_valist</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_get_valist (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                           <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                           <parameter><link linkend="va-list"><type>va_list</type></link> var_args</parameter>);</programlisting>
<para>See <link linkend="gtk-tree-model-get"><function>gtk_tree_model_get()</function></link>, this version takes a va_list
for language bindings to use.</para>
<refsect3 id="gtk-tree-model-get-valist.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a row in <parameter>tree_model</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>var_args</para></entry>
<entry role="parameter_description"><para>va_list of column/return location pairs</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-foreach" role="function">
<title>gtk_tree_model_foreach&#160;()</title>
<indexterm zone="gtk-tree-model-foreach"><primary>gtk_tree_model_foreach</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_foreach (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *model</parameter>,
                        <parameter><link linkend="GtkTreeModelForeachFunc"><type>GtkTreeModelForeachFunc</type></link> func</parameter>,
                        <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>Calls func on each node in model in a depth-first fashion.</para>
<para>If <parameter>func</parameter>
 returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, then the tree ceases to be walked,
and <link linkend="gtk-tree-model-foreach"><function>gtk_tree_model_foreach()</function></link> returns.</para>
<refsect3 id="gtk-tree-model-foreach.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>func</para></entry>
<entry role="parameter_description"><para>a function to be called on each row. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>scope call</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>user data to passed to <parameter>func</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-row-changed" role="function">
<title>gtk_tree_model_row_changed&#160;()</title>
<indexterm zone="gtk-tree-model-row-changed"><primary>gtk_tree_model_row_changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_row_changed (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                            <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                            <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Emits the <link linkend="GtkTreeModel-row-changed"><type>“row-changed”</type></link> signal on <parameter>tree_model</parameter>
.</para>
<refsect3 id="gtk-tree-model-row-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> pointing to the changed row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the changed row</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-row-inserted" role="function">
<title>gtk_tree_model_row_inserted&#160;()</title>
<indexterm zone="gtk-tree-model-row-inserted"><primary>gtk_tree_model_row_inserted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_row_inserted (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                             <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                             <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Emits the <link linkend="GtkTreeModel-row-inserted"><type>“row-inserted”</type></link> signal on <parameter>tree_model</parameter>
.</para>
<refsect3 id="gtk-tree-model-row-inserted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> pointing to the inserted row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the inserted row</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-row-has-child-toggled" role="function">
<title>gtk_tree_model_row_has_child_toggled&#160;()</title>
<indexterm zone="gtk-tree-model-row-has-child-toggled"><primary>gtk_tree_model_row_has_child_toggled</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_row_has_child_toggled (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                                      <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                                      <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Emits the <link linkend="GtkTreeModel-row-has-child-toggled"><type>“row-has-child-toggled”</type></link> signal on
<parameter>tree_model</parameter>
. This should be called by models after the child
state of a node changes.</para>
<refsect3 id="gtk-tree-model-row-has-child-toggled.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> pointing to the changed row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the changed row</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-row-deleted" role="function">
<title>gtk_tree_model_row_deleted&#160;()</title>
<indexterm zone="gtk-tree-model-row-deleted"><primary>gtk_tree_model_row_deleted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_row_deleted (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                            <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Emits the <link linkend="GtkTreeModel-row-deleted"><type>“row-deleted”</type></link> signal on <parameter>tree_model</parameter>
.</para>
<para>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>Nodes that are deleted are not unreffed, this means that any
outstanding references on the deleted node should not be released.</para>
<refsect3 id="gtk-tree-model-row-deleted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> pointing to the previous location of
the deleted row</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-rows-reordered" role="function">
<title>gtk_tree_model_rows_reordered&#160;()</title>
<indexterm zone="gtk-tree-model-rows-reordered"><primary>gtk_tree_model_rows_reordered</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_rows_reordered (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                               <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                               <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                               <parameter><link linkend="gint"><type>gint</type></link> *new_order</parameter>);</programlisting>
<para>Emits the <link linkend="GtkTreeModel-rows-reordered"><type>“rows-reordered”</type></link> signal on <parameter>tree_model</parameter>
.</para>
<para>This should be called by models when their rows have been
reordered.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-tree-model-rows-reordered.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> pointing to the tree node whose children
have been reordered</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the node whose children
have been reordered, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the depth of <parameter>path</parameter>
is 0</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_order</para></entry>
<entry role="parameter_description"><para>an array of integers mapping the current position of
each child to its old position before the re-ordering,
i.e. <parameter>new_order</parameter>
<literal>[newpos] = oldpos</literal></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-model-rows-reordered-with-length" role="function">
<title>gtk_tree_model_rows_reordered_with_length&#160;()</title>
<indexterm zone="gtk-tree-model-rows-reordered-with-length"><primary>gtk_tree_model_rows_reordered_with_length</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_model_rows_reordered_with_length
                               (<parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model</parameter>,
                                <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                                <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> *new_order</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> length</parameter>);</programlisting>
<para>Emits the <link linkend="GtkTreeModel-rows-reordered"><type>“rows-reordered”</type></link> signal on <parameter>tree_model</parameter>
.</para>
<para>This should be called by models when their rows have been
reordered.</para>

<para><emphasis role="annotation">[<acronym>rename-to</acronym> gtk_tree_model_rows_reordered]</emphasis></para><refsect3 id="gtk-tree-model-rows-reordered-with-length.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> pointing to the tree node whose children
have been reordered</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the node
whose children have been reordered, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the depth
of <parameter>path</parameter>
is 0. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>new_order</para></entry>
<entry role="parameter_description"><para>an array of integers
mapping the current position of each child to its old
position before the re-ordering,
i.e. <parameter>new_order</parameter>
<literal>[newpos] = oldpos</literal>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=length]</emphasis></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>length of <parameter>new_order</parameter>
array</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTreeModel.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkTreeModel-struct" role="struct">
<title>GtkTreeModel</title>
<indexterm zone="GtkTreeModel-struct"><primary>GtkTreeModel</primary></indexterm>
<programlisting language="C">typedef struct _GtkTreeModel GtkTreeModel;</programlisting>
</refsect2>
<refsect2 id="GtkTreeIter-struct" role="struct">
<title>struct GtkTreeIter</title>
<indexterm zone="GtkTreeIter-struct"><primary>GtkTreeIter</primary></indexterm>
<programlisting language="C">struct GtkTreeIter {
  gint stamp;
  gpointer user_data;
  gpointer user_data2;
  gpointer user_data3;
};
</programlisting>
<para>The <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> is the primary structure
for accessing a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>. Models are expected to put a unique
integer in the <parameter>stamp</parameter>
 member, and put
model-specific data in the three <parameter>user_data</parameter>

members.</para>
<refsect3 id="GtkTreeIter.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="gint"><type>gint</type></link>&#160;<structfield id="GtkTreeIter-struct.stamp">stamp</structfield>;</para></entry>
<entry role="struct_member_description"><para>a unique stamp to catch invalid iterators</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gpointer"><type>gpointer</type></link>&#160;<structfield id="GtkTreeIter-struct.user-data">user_data</structfield>;</para></entry>
<entry role="struct_member_description"><para>model-specific data</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gpointer"><type>gpointer</type></link>&#160;<structfield id="GtkTreeIter-struct.user-data2">user_data2</structfield>;</para></entry>
<entry role="struct_member_description"><para>model-specific data</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gpointer"><type>gpointer</type></link>&#160;<structfield id="GtkTreeIter-struct.user-data3">user_data3</structfield>;</para></entry>
<entry role="struct_member_description"><para>model-specific data</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="GtkTreePath-struct" role="struct">
<title>GtkTreePath</title>
<indexterm zone="GtkTreePath-struct"><primary>GtkTreePath</primary></indexterm>
<programlisting language="C">typedef struct _GtkTreePath GtkTreePath;</programlisting>
</refsect2>
<refsect2 id="GtkTreeRowReference" role="struct">
<title>GtkTreeRowReference</title>
<indexterm zone="GtkTreeRowReference"><primary>GtkTreeRowReference</primary></indexterm>
<programlisting language="C">typedef struct _GtkTreeRowReference GtkTreeRowReference;</programlisting>
<para>A GtkTreeRowReference tracks model changes so that it always refers to the
same row (a <link linkend="GtkTreePath"><type>GtkTreePath</type></link> refers to a position, not a fixed row). Create a
new GtkTreeRowReference with <link linkend="gtk-tree-row-reference-new"><function>gtk_tree_row_reference_new()</function></link>.</para>
</refsect2>
<refsect2 id="GtkTreeModelIface" role="struct">
<title>struct GtkTreeModelIface</title>
<indexterm zone="GtkTreeModelIface"><primary>GtkTreeModelIface</primary></indexterm>
<programlisting language="C">struct GtkTreeModelIface {
  /* 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_previous)   (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>
<refsect3 id="GtkTreeModelIface.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.row-changed">row_changed</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when a row in the model has changed.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.row-inserted">row_inserted</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when a new row has been inserted in
the model.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.row-has-child-toggled">row_has_child_toggled</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when a row has gotten the
first child row or lost its last child row.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.row-deleted">row_deleted</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when a row has been deleted.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.rows-reordered">rows_reordered</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when the children of a node in the
GtkTreeModel have been reordered.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.get-flags">get_flags</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Get <link linkend="GtkTreeModelFlags"><type>GtkTreeModelFlags</type></link> supported by this interface.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.get-n-columns">get_n_columns</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Get the number of columns supported by the model.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.get-column-type">get_column_type</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Get the type of the column.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.get-iter">get_iter</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets iter to a valid iterator pointing to path.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.get-path">get_path</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Gets a newly-created <link linkend="GtkTreePath"><type>GtkTreePath</type></link> referenced by iter.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.get-value">get_value</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Initializes and sets value to that at column.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-next">iter_next</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets iter to point to the node following it at the
current level.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-previous">iter_previous</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets iter to point to the previous node at the
current level.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-children">iter_children</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets iter to point to the first child of parent.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-has-child">iter_has_child</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if iter has children, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-n-children">iter_n_children</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Gets the number of children that iter has.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-nth-child">iter_nth_child</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets iter to be the child of parent, using the
given index.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.iter-parent">iter_parent</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Sets iter to be the parent of child.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.ref-node">ref_node</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Lets the tree ref the node.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkTreeModelIface.unref-node">unref_node</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Lets the tree unref the node.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="GtkTreeModelFlags" role="enum">
<title>enum GtkTreeModelFlags</title>
<indexterm zone="GtkTreeModelFlags"><primary>GtkTreeModelFlags</primary></indexterm>
<para>These flags indicate various properties of a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>.</para>
<para>They are returned by <link linkend="gtk-tree-model-get-flags"><function>gtk_tree_model_get_flags()</function></link>, and must be
static for the lifetime of the object. A more complete description
of <link linkend="GTK-TREE-MODEL-ITERS-PERSIST:CAPS"><type>GTK_TREE_MODEL_ITERS_PERSIST</type></link> can be found in the overview of
this section.</para>
<refsect3 id="GtkTreeModelFlags.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-TREE-MODEL-ITERS-PERSIST:CAPS">GTK_TREE_MODEL_ITERS_PERSIST</para></entry>
<entry role="enum_member_description"><para>iterators survive all signals
emitted by the tree</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-TREE-MODEL-LIST-ONLY:CAPS">GTK_TREE_MODEL_LIST_ONLY</para></entry>
<entry role="enum_member_description"><para>the model is a list only, and never
has children</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTreeModel.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkTreeModel-row-changed" role="signal"><title>The <literal>“row-changed”</literal> signal</title>
<indexterm zone="GtkTreeModel-row-changed"><primary>GtkTreeModel::row-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model,
               <link linkend="GtkTreePath"><type>GtkTreePath</type></link>  *path,
               <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>  *iter,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>This signal is emitted when a row in the model has changed.</para>
<refsect3 id="GtkTreeModel-row-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> identifying the changed row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the changed row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTreeModel-row-deleted" role="signal"><title>The <literal>“row-deleted”</literal> signal</title>
<indexterm zone="GtkTreeModel-row-deleted"><primary>GtkTreeModel::row-deleted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model,
               <link linkend="GtkTreePath"><type>GtkTreePath</type></link>  *path,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>This signal is emitted when a row has been deleted.</para>
<para>Note that no iterator is passed to the signal handler,
since the row is already deleted.</para>
<para>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>
<refsect3 id="GtkTreeModel-row-deleted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> identifying the row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GtkTreeModel-row-has-child-toggled" role="signal"><title>The <literal>“row-has-child-toggled”</literal> signal</title>
<indexterm zone="GtkTreeModel-row-has-child-toggled"><primary>GtkTreeModel::row-has-child-toggled</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model,
               <link linkend="GtkTreePath"><type>GtkTreePath</type></link>  *path,
               <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>  *iter,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>This signal is emitted when a row has gotten the first child
row or lost its last child row.</para>
<refsect3 id="GtkTreeModel-row-has-child-toggled.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> identifying the row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkTreeModel-row-inserted" role="signal"><title>The <literal>“row-inserted”</literal> signal</title>
<indexterm zone="GtkTreeModel-row-inserted"><primary>GtkTreeModel::row-inserted</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model,
               <link linkend="GtkTreePath"><type>GtkTreePath</type></link>  *path,
               <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>  *iter,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>This signal is emitted when a new row has been inserted in
the model.</para>
<para>Note that the row may still be empty at this point, since
it is a common pattern to first insert an empty row, and
then fill it with the desired values.</para>
<refsect3 id="GtkTreeModel-row-inserted.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> identifying the new row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the new row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GtkTreeModel-rows-reordered" role="signal"><title>The <literal>“rows-reordered”</literal> signal</title>
<indexterm zone="GtkTreeModel-rows-reordered"><primary>GtkTreeModel::rows-reordered</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *tree_model,
               <link linkend="GtkTreePath"><type>GtkTreePath</type></link>  *path,
               <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>  *iter,
               <link linkend="gpointer"><type>gpointer</type></link>      new_order,
               <link linkend="gpointer"><type>gpointer</type></link>      user_data)</programlisting>
<para>This signal is emitted when the children of a node in the
<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> have been reordered.</para>
<para>Note that this signal is not emitted
when rows are reordered by DND, since this is implemented
by removing and then reinserting the row.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="GtkTreeModel-rows-reordered.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>tree_model</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreePath-struct"><type>GtkTreePath</type></link> identifying the tree node whose children
have been reordered</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>a valid <link linkend="GtkTreeIter-struct"><type>GtkTreeIter</type></link> pointing to the node whose children
have been reordered, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if the depth of <parameter>path</parameter>
is 0</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_order</para></entry>
<entry role="parameter_description"><para>an array of integers mapping the current position
of each child to its old position before the re-ordering,
i.e. <parameter>new_order</parameter>
<literal>[newpos] = oldpos</literal></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkTreeModel.see-also">
<title>See Also</title>
<para><link linkend="GtkTreeView"><type>GtkTreeView</type></link>, <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>, <link linkend="GtkListStore"><type>GtkListStore</type></link>,
<link linkend="gtk3-GtkTreeView-drag-and-drop">GtkTreeView drag-and-drop</link>
<link linkend="GtkTreeSortable"><type>GtkTreeSortable</type></link></para>

</refsect1>

</refentry>
