<?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="GtkMultiSorter">
<refmeta>
<refentrytitle role="top_of_page" id="GtkMultiSorter.top_of_page">GtkMultiSorter</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkMultiSorter</refname>
<refpurpose>Combining multiple sorters</refpurpose>
</refnamediv>

<refsect1 id="GtkMultiSorter.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="GtkMultiSorter"><returnvalue>GtkMultiSorter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-multi-sorter-new">gtk_multi_sorter_new</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-multi-sorter-append">gtk_multi_sorter_append</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-multi-sorter-remove">gtk_multi_sorter_remove</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkMultiSorter.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> <link linkend="GtkSorter">GtkSorter</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkMultiSorter
</screen>
</refsect1>
<refsect1 id="GtkMultiSorter.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkMultiSorter implements
 <link linkend="GListModel">GListModel</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>

</refsect1>

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

<refsect1 id="GtkMultiSorter.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkMultiSorter combines multiple sorters by trying them
in turn. If the first sorter compares two items as equal,
the second is tried next, and so on.</para>

</refsect1>
<refsect1 id="GtkMultiSorter.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-multi-sorter-new" role="function">
<title>gtk_multi_sorter_new&#160;()</title>
<indexterm zone="gtk-multi-sorter-new"><primary>gtk_multi_sorter_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkMultiSorter"><returnvalue>GtkMultiSorter</returnvalue></link>&#160;*
gtk_multi_sorter_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new multi sorter.</para>
<para>This sorter compares items by trying each of the sorters
in turn, until one returns non-zero. In particular, if
no sorter has been added to it, it will always compare
items as equal.</para>
<refsect3 id="gtk-multi-sorter-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkMultiSorter"><type>GtkMultiSorter</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-multi-sorter-append" role="function">
<title>gtk_multi_sorter_append&#160;()</title>
<indexterm zone="gtk-multi-sorter-append"><primary>gtk_multi_sorter_append</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_multi_sorter_append (<parameter><link linkend="GtkMultiSorter"><type>GtkMultiSorter</type></link> *self</parameter>,
                         <parameter><link linkend="GtkSorter"><type>GtkSorter</type></link> *sorter</parameter>);</programlisting>
<para>Add <parameter>sorter</parameter>
 to <parameter>self</parameter>
 to use for sorting at the end. <parameter>self</parameter>

will consult all existing sorters before it will sort with
the given <parameter>sorter</parameter>
.</para>
<refsect3 id="gtk-multi-sorter-append.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMultiSorter"><type>GtkMultiSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>sorter</para></entry>
<entry role="parameter_description"><para>a sorter to add. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-multi-sorter-remove" role="function">
<title>gtk_multi_sorter_remove&#160;()</title>
<indexterm zone="gtk-multi-sorter-remove"><primary>gtk_multi_sorter_remove</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_multi_sorter_remove (<parameter><link linkend="GtkMultiSorter"><type>GtkMultiSorter</type></link> *self</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>Removes the sorter at the given <parameter>position</parameter>
 from the list of sorter
used by <parameter>self</parameter>
.</para>
<para>If <parameter>position</parameter>
 is larger than the number of sorters, nothing happens.</para>
<refsect3 id="gtk-multi-sorter-remove.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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkMultiSorter"><type>GtkMultiSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>position of sorter to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

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

</refsect1>

</refentry>
