<?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="GtkTreeSelection">
<refmeta>
<refentrytitle role="top_of_page" id="GtkTreeSelection.top_of_page">GtkTreeSelection</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkTreeSelection</refname>
<refpurpose>The selection object for GtkTreeView</refpurpose>
</refnamediv>

<refsect1 id="GtkTreeSelection.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="GtkTreeSelectionFunc">*GtkTreeSelectionFunc</link><phrase role="c_punctuation">)</phrase>&#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"><phrase role="c_punctuation">(</phrase><link linkend="GtkTreeSelectionForeachFunc">*GtkTreeSelectionForeachFunc</link><phrase role="c_punctuation">)</phrase>&#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-selection-set-mode">gtk_tree_selection_set_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkSelectionMode"><returnvalue>GtkSelectionMode</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-selection-get-mode">gtk_tree_selection_get_mode</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-selection-set-select-function">gtk_tree_selection_set_select_function</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeSelectionFunc"><returnvalue>GtkTreeSelectionFunc</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-selection-get-select-function">gtk_tree_selection_get_select_function</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-tree-selection-get-user-data">gtk_tree_selection_get_user_data</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkTreeView"><returnvalue>GtkTreeView</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-selection-get-tree-view">gtk_tree_selection_get_tree_view</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-selection-get-selected">gtk_tree_selection_get_selected</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-selection-selected-foreach">gtk_tree_selection_selected_foreach</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-tree-selection-get-selected-rows">gtk_tree_selection_get_selected_rows</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-selection-count-selected-rows">gtk_tree_selection_count_selected_rows</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-selection-select-path">gtk_tree_selection_select_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-selection-unselect-path">gtk_tree_selection_unselect_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-selection-path-is-selected">gtk_tree_selection_path_is_selected</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-selection-select-iter">gtk_tree_selection_select_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-selection-unselect-iter">gtk_tree_selection_unselect_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-selection-iter-is-selected">gtk_tree_selection_iter_is_selected</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-selection-select-all">gtk_tree_selection_select_all</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-selection-unselect-all">gtk_tree_selection_unselect_all</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-selection-select-range">gtk_tree_selection_select_range</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-selection-unselect-range">gtk_tree_selection_unselect_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeSelection.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GtkSelectionMode"><type>GtkSelectionMode</type></link></entry><entry role="property_name"><link linkend="GtkTreeSelection--mode">mode</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeSelection.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="GtkTreeSelection-changed">changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeSelection.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="GtkTreeSelection-struct">GtkTreeSelection</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkTreeSelection.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkTreeSelection
</screen>
</refsect1>

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

<refsect1 id="GtkTreeSelection.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> object is a helper object to manage the selection
for a <link linkend="GtkTreeView"><type>GtkTreeView</type></link> widget.  The <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> object is
automatically created when a new <link linkend="GtkTreeView"><type>GtkTreeView</type></link> widget is created, and
cannot exist independently of this widget.  The primary reason the
<link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> objects exists is for cleanliness of code and API.
That is, there is no conceptual reason all these functions could not be
methods on the <link linkend="GtkTreeView"><type>GtkTreeView</type></link> widget instead of a separate function.</para>
<para>The <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> object is gotten from a <link linkend="GtkTreeView"><type>GtkTreeView</type></link> by calling
<link linkend="gtk-tree-view-get-selection"><function>gtk_tree_view_get_selection()</function></link>.  It can be manipulated to check the
selection status of the tree, as well as select and deselect individual
rows.  Selection is done completely view side.  As a result, multiple
views of the same model can have completely different selections.
Additionally, you cannot change the selection of a row on the model that
is not currently displayed by the view without expanding its parents
first.</para>
<para>One of the important things to remember when monitoring the selection of
a view is that the <link linkend="GtkTreeSelection-changed"><type>“changed”</type></link> signal is mostly a hint.
That is, it may only emit one signal when a range of rows is selected.
Additionally, it may on occasion emit a <link linkend="GtkTreeSelection-changed"><type>“changed”</type></link> signal
when nothing has happened (mostly as a result of programmers calling
select_row on an already selected row).</para>

</refsect1>
<refsect1 id="GtkTreeSelection.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="GtkTreeSelectionFunc" role="function">
<title>GtkTreeSelectionFunc&#160;()</title>
<indexterm zone="GtkTreeSelectionFunc"><primary>GtkTreeSelectionFunc</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GtkTreeSelectionFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                         <parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> *model</parameter>,
                         <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>,
                         <parameter><link linkend="gboolean"><type>gboolean</type></link> path_currently_selected</parameter>,
                         <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>A function used by <link linkend="gtk-tree-selection-set-select-function"><function>gtk_tree_selection_set_select_function()</function></link> to filter
whether or not a row may be selected.  It is called whenever a row's
state might change.  A return value of <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> indicates to <parameter>selection</parameter>

that it is okay to change the selection.</para>
<refsect3 id="GtkTreeSelectionFunc.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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> being viewed</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkTreePath"><type>GtkTreePath</type></link> of the row in question</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path_currently_selected</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if the path is currently selected</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>user data. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GtkTreeSelectionFunc.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if the selection state of the row can be toggled</para>
</refsect3></refsect2>
<refsect2 id="GtkTreeSelectionForeachFunc" role="function">
<title>GtkTreeSelectionForeachFunc&#160;()</title>
<indexterm zone="GtkTreeSelectionForeachFunc"><primary>GtkTreeSelectionForeachFunc</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GtkTreeSelectionForeachFunc<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>A function used by <link linkend="gtk-tree-selection-selected-foreach"><function>gtk_tree_selection_selected_foreach()</function></link> to map all
selected rows.  It will be called on every selected row in the view.</para>
<refsect3 id="GtkTreeSelectionForeachFunc.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 viewed</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkTreePath"><type>GtkTreePath</type></link> of a selected row</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"><type>GtkTreeIter</type></link> pointing to a selected row</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>user data. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-set-mode" role="function">
<title>gtk_tree_selection_set_mode&#160;()</title>
<indexterm zone="gtk-tree-selection-set-mode"><primary>gtk_tree_selection_set_mode</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_set_mode (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                             <parameter><link linkend="GtkSelectionMode"><type>GtkSelectionMode</type></link> type</parameter>);</programlisting>
<para>Sets the selection mode of the <parameter>selection</parameter>
.  If the previous type was
<link linkend="GTK-SELECTION-MULTIPLE:CAPS"><type>GTK_SELECTION_MULTIPLE</type></link>, then the anchor is kept selected, if it was
previously selected.</para>
<refsect3 id="gtk-tree-selection-set-mode.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>The selection mode</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-get-mode" role="function">
<title>gtk_tree_selection_get_mode&#160;()</title>
<indexterm zone="gtk-tree-selection-get-mode"><primary>gtk_tree_selection_get_mode</primary></indexterm>
<programlisting language="C"><link linkend="GtkSelectionMode"><returnvalue>GtkSelectionMode</returnvalue></link>
gtk_tree_selection_get_mode (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Gets the selection mode for <parameter>selection</parameter>
. See
<link linkend="gtk-tree-selection-set-mode"><function>gtk_tree_selection_set_mode()</function></link>.</para>
<refsect3 id="gtk-tree-selection-get-mode.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>selection</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-get-mode.returns" role="returns">
<title>Returns</title>
<para> the current selection mode</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-set-select-function" role="function">
<title>gtk_tree_selection_set_select_function&#160;()</title>
<indexterm zone="gtk-tree-selection-set-select-function"><primary>gtk_tree_selection_set_select_function</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_set_select_function
                               (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                <parameter><link linkend="GtkTreeSelectionFunc"><type>GtkTreeSelectionFunc</type></link> func</parameter>,
                                <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>,
                                <parameter><link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> destroy</parameter>);</programlisting>
<para>Sets the selection function.</para>
<para>If set, this function is called before any node is selected or unselected,
giving some control over which nodes are selected. The select function
should return <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the state of the node may be toggled, and <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
if the state of the node should be left unchanged.</para>
<refsect3 id="gtk-tree-selection-set-select-function.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>func</para></entry>
<entry role="parameter_description"><para>The selection function. May be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>The selection function’s data. May be <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>destroy</para></entry>
<entry role="parameter_description"><para>The destroy function for user data.  May be <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-get-select-function" role="function">
<title>gtk_tree_selection_get_select_function&#160;()</title>
<indexterm zone="gtk-tree-selection-get-select-function"><primary>gtk_tree_selection_get_select_function</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeSelectionFunc"><returnvalue>GtkTreeSelectionFunc</returnvalue></link>
gtk_tree_selection_get_select_function
                               (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Returns the current selection function.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-tree-selection-get-select-function.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-get-select-function.returns" role="returns">
<title>Returns</title>
<para> The function.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-get-user-data" role="function">
<title>gtk_tree_selection_get_user_data&#160;()</title>
<indexterm zone="gtk-tree-selection-get-user-data"><primary>gtk_tree_selection_get_user_data</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gtk_tree_selection_get_user_data (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Returns the user data for the selection function.</para>

<para><emphasis role="annotation">[<acronym>skip</acronym>]</emphasis></para><refsect3 id="gtk-tree-selection-get-user-data.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-get-user-data.returns" role="returns">
<title>Returns</title>
<para> The user data.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-get-tree-view" role="function">
<title>gtk_tree_selection_get_tree_view&#160;()</title>
<indexterm zone="gtk-tree-selection-get-tree-view"><primary>gtk_tree_selection_get_tree_view</primary></indexterm>
<programlisting language="C"><link linkend="GtkTreeView"><returnvalue>GtkTreeView</returnvalue></link>&#160;*
gtk_tree_selection_get_tree_view (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Returns the tree view associated with <parameter>selection</parameter>
.</para>
<refsect3 id="gtk-tree-selection-get-tree-view.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-get-tree-view.returns" role="returns">
<title>Returns</title>
<para>A <link linkend="GtkTreeView"><type>GtkTreeView</type></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-get-selected" role="function">
<title>gtk_tree_selection_get_selected&#160;()</title>
<indexterm zone="gtk-tree-selection-get-selected"><primary>gtk_tree_selection_get_selected</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_selection_get_selected (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                 <parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> **model</parameter>,
                                 <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Sets <parameter>iter</parameter>
 to the currently selected node if <parameter>selection</parameter>
 is set to
<link linkend="GTK-SELECTION-SINGLE:CAPS"><type>GTK_SELECTION_SINGLE</type></link> or <link linkend="GTK-SELECTION-BROWSE:CAPS"><type>GTK_SELECTION_BROWSE</type></link>.  <parameter>iter</parameter>
 may be NULL if you
just want to test if <parameter>selection</parameter>
 has any selected nodes.  <parameter>model</parameter>
 is filled
with the current model as a convenience.  This function will not work if you
use <parameter>selection</parameter>
 is <link linkend="GTK-SELECTION-MULTIPLE:CAPS"><type>GTK_SELECTION_MULTIPLE</type></link>.</para>
<refsect3 id="gtk-tree-selection-get-selected.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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 pointer to set to the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>, or NULL. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>iter</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link>, or NULL. </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-selection-get-selected.returns" role="returns">
<title>Returns</title>
<para> TRUE, if there is a selected node.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-selected-foreach" role="function">
<title>gtk_tree_selection_selected_foreach&#160;()</title>
<indexterm zone="gtk-tree-selection-selected-foreach"><primary>gtk_tree_selection_selected_foreach</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_selected_foreach (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                     <parameter><link linkend="GtkTreeSelectionForeachFunc"><type>GtkTreeSelectionForeachFunc</type></link> func</parameter>,
                                     <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting>
<para>Calls a function for each selected node. Note that you cannot modify
the tree or selection from within this function. As a result,
<link linkend="gtk-tree-selection-get-selected-rows"><function>gtk_tree_selection_get_selected_rows()</function></link> might be more useful.</para>
<refsect3 id="gtk-tree-selection-selected-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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>func</para></entry>
<entry role="parameter_description"><para>The function to call for each selected node. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>scope call</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>user data to pass to the function.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-get-selected-rows" role="function">
<title>gtk_tree_selection_get_selected_rows&#160;()</title>
<indexterm zone="gtk-tree-selection-get-selected-rows"><primary>gtk_tree_selection_get_selected_rows</primary></indexterm>
<programlisting language="C"><link linkend="GList"><returnvalue>GList</returnvalue></link>&#160;*
gtk_tree_selection_get_selected_rows (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                      <parameter><link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> **model</parameter>);</programlisting>
<para>Creates a list of path of all selected rows. Additionally, if you are
planning on modifying the model after calling this function, you may
want to convert the returned list into a list of <link linkend="GtkTreeRowReferences"><type>GtkTreeRowReferences</type></link>.
To do this, you can use <link linkend="gtk-tree-row-reference-new"><function>gtk_tree_row_reference_new()</function></link>.</para>
<para>To free the return value, use:</para>
<informalexample><programlisting role="example"><![CDATA[
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gtk-tree-selection-get-selected-rows.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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 pointer to set to the <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>, 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>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-get-selected-rows.returns" role="returns">
<title>Returns</title>
<para>A <link linkend="GList"><type>GList</type></link> containing a <link linkend="GtkTreePath"><type>GtkTreePath</type></link> for each selected row. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> GtkTreePath][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-count-selected-rows" role="function">
<title>gtk_tree_selection_count_selected_rows&#160;()</title>
<indexterm zone="gtk-tree-selection-count-selected-rows"><primary>gtk_tree_selection_count_selected_rows</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_tree_selection_count_selected_rows
                               (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Returns the number of rows that have been selected in <parameter>tree</parameter>
.</para>
<refsect3 id="gtk-tree-selection-count-selected-rows.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-count-selected-rows.returns" role="returns">
<title>Returns</title>
<para> The number of rows selected.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-select-path" role="function">
<title>gtk_tree_selection_select_path&#160;()</title>
<indexterm zone="gtk-tree-selection-select-path"><primary>gtk_tree_selection_select_path</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_select_path (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Select the row at <parameter>path</parameter>
.</para>
<refsect3 id="gtk-tree-selection-select-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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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 <link linkend="GtkTreePath"><type>GtkTreePath</type></link> to be selected.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-unselect-path" role="function">
<title>gtk_tree_selection_unselect_path&#160;()</title>
<indexterm zone="gtk-tree-selection-unselect-path"><primary>gtk_tree_selection_unselect_path</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_unselect_path (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                  <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Unselects the row at <parameter>path</parameter>
.</para>
<refsect3 id="gtk-tree-selection-unselect-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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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 <link linkend="GtkTreePath"><type>GtkTreePath</type></link> to be unselected.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-path-is-selected" role="function">
<title>gtk_tree_selection_path_is_selected&#160;()</title>
<indexterm zone="gtk-tree-selection-path-is-selected"><primary>gtk_tree_selection_path_is_selected</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_selection_path_is_selected (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                     <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *path</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the row pointed to by <parameter>path</parameter>
 is currently selected.  If <parameter>path</parameter>

does not point to a valid location, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> is returned</para>
<refsect3 id="gtk-tree-selection-path-is-selected.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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"><type>GtkTreePath</type></link> to check selection on.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-path-is-selected.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>path</parameter>
is selected.</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-select-iter" role="function">
<title>gtk_tree_selection_select_iter&#160;()</title>
<indexterm zone="gtk-tree-selection-select-iter"><primary>gtk_tree_selection_select_iter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_select_iter (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Selects the specified iterator.</para>
<refsect3 id="gtk-tree-selection-select-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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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"><type>GtkTreeIter</type></link> to be selected.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-unselect-iter" role="function">
<title>gtk_tree_selection_unselect_iter&#160;()</title>
<indexterm zone="gtk-tree-selection-unselect-iter"><primary>gtk_tree_selection_unselect_iter</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_unselect_iter (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                  <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Unselects the specified iterator.</para>
<refsect3 id="gtk-tree-selection-unselect-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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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"><type>GtkTreeIter</type></link> to be unselected.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-iter-is-selected" role="function">
<title>gtk_tree_selection_iter_is_selected&#160;()</title>
<indexterm zone="gtk-tree-selection-iter-is-selected"><primary>gtk_tree_selection_iter_is_selected</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_tree_selection_iter_is_selected (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                     <parameter><link linkend="GtkTreeIter"><type>GtkTreeIter</type></link> *iter</parameter>);</programlisting>
<para>Returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the row at <parameter>iter</parameter>
 is currently selected.</para>
<refsect3 id="gtk-tree-selection-iter-is-selected.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</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 valid <link linkend="GtkTreeIter"><type>GtkTreeIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-tree-selection-iter-is-selected.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, if <parameter>iter</parameter>
is selected</para>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-select-all" role="function">
<title>gtk_tree_selection_select_all&#160;()</title>
<indexterm zone="gtk-tree-selection-select-all"><primary>gtk_tree_selection_select_all</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_select_all (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Selects all the nodes. <parameter>selection</parameter>
 must be set to <link linkend="GTK-SELECTION-MULTIPLE:CAPS"><type>GTK_SELECTION_MULTIPLE</type></link>
mode.</para>
<refsect3 id="gtk-tree-selection-select-all.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-unselect-all" role="function">
<title>gtk_tree_selection_unselect_all&#160;()</title>
<indexterm zone="gtk-tree-selection-unselect-all"><primary>gtk_tree_selection_unselect_all</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_unselect_all (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>);</programlisting>
<para>Unselects all the nodes.</para>
<refsect3 id="gtk-tree-selection-unselect-all.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-select-range" role="function">
<title>gtk_tree_selection_select_range&#160;()</title>
<indexterm zone="gtk-tree-selection-select-range"><primary>gtk_tree_selection_select_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_select_range (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                 <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *start_path</parameter>,
                                 <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *end_path</parameter>);</programlisting>
<para>Selects a range of nodes, determined by <parameter>start_path</parameter>
 and <parameter>end_path</parameter>
 inclusive.
<parameter>selection</parameter>
 must be set to <link linkend="GTK-SELECTION-MULTIPLE:CAPS"><type>GTK_SELECTION_MULTIPLE</type></link> mode.</para>
<refsect3 id="gtk-tree-selection-select-range.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_path</para></entry>
<entry role="parameter_description"><para>The initial node of the range.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_path</para></entry>
<entry role="parameter_description"><para>The final node of the range.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-tree-selection-unselect-range" role="function">
<title>gtk_tree_selection_unselect_range&#160;()</title>
<indexterm zone="gtk-tree-selection-unselect-range"><primary>gtk_tree_selection_unselect_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_tree_selection_unselect_range (<parameter><link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *selection</parameter>,
                                   <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *start_path</parameter>,
                                   <parameter><link linkend="GtkTreePath"><type>GtkTreePath</type></link> *end_path</parameter>);</programlisting>
<para>Unselects a range of nodes, determined by <parameter>start_path</parameter>
 and <parameter>end_path</parameter>

inclusive.</para>
<refsect3 id="gtk-tree-selection-unselect-range.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>selection</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_path</para></entry>
<entry role="parameter_description"><para>The initial node of the range.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_path</para></entry>
<entry role="parameter_description"><para>The initial node of the range.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkTreeSelection.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkTreeSelection-struct" role="struct">
<title>GtkTreeSelection</title>
<indexterm zone="GtkTreeSelection-struct"><primary>GtkTreeSelection</primary></indexterm>
<programlisting language="C">typedef struct _GtkTreeSelection GtkTreeSelection;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkTreeSelection.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkTreeSelection--mode" role="property"><title>The <literal>“mode”</literal> property</title>
<indexterm zone="GtkTreeSelection--mode"><primary>GtkTreeSelection:mode</primary></indexterm>
<programlisting>  “mode”                     <link linkend="GtkSelectionMode"><type>GtkSelectionMode</type></link></programlisting>
<para>Selection mode.
See <link linkend="gtk-tree-selection-set-mode"><function>gtk_tree_selection_set_mode()</function></link> for more information on this property.</para>
<para>Owner: GtkTreeSelection</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_SELECTION_SINGLE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkTreeSelection.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkTreeSelection-changed" role="signal"><title>The <literal>“changed”</literal> signal</title>
<indexterm zone="GtkTreeSelection-changed"><primary>GtkTreeSelection::changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkTreeSelection"><type>GtkTreeSelection</type></link> *treeselection,
               <link linkend="gpointer"><type>gpointer</type></link>          user_data)</programlisting>
<para>Emitted whenever the selection has (possibly) changed. Please note that
this signal is mostly a hint.  It may only be emitted once when a range
of rows are selected, and it may occasionally be emitted when nothing
has happened.</para>
<refsect3 id="GtkTreeSelection-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>treeselection</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</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="GtkTreeSelection.see-also">
<title>See Also</title>
<para><link linkend="GtkTreeView"><type>GtkTreeView</type></link>, <link linkend="GtkTreeViewColumn"><type>GtkTreeViewColumn</type></link>, <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>,
<link linkend="GtkTreeSortable"><type>GtkTreeSortable</type></link>, <link linkend="GtkTreeModelSort"><type>GtkTreeModelSort</type></link>, <link linkend="GtkListStore"><type>GtkListStore</type></link>, <link linkend="GtkTreeStore"><type>GtkTreeStore</type></link>,
<link linkend="GtkCellRenderer"><type>GtkCellRenderer</type></link>, <link linkend="GtkCellEditable"><type>GtkCellEditable</type></link>, <link linkend="GtkCellRendererPixbuf"><type>GtkCellRendererPixbuf</type></link>,
<link linkend="GtkCellRendererText"><type>GtkCellRendererText</type></link>, <link linkend="GtkCellRendererToggle"><type>GtkCellRendererToggle</type></link>, <link linkend="gtk3-GtkTreeView-drag-and-drop">GtkTreeView drag-and-drop</link></para>

</refsect1>

</refentry>
