<?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="GtkStringSorter">
<refmeta>
<refentrytitle role="top_of_page" id="GtkStringSorter.top_of_page">GtkStringSorter</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkStringSorter</refname>
<refpurpose>Sort by comparing strings</refpurpose>
</refnamediv>

<refsect1 id="GtkStringSorter.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="GtkStringSorter"><returnvalue>GtkStringSorter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-string-sorter-new">gtk_string_sorter_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkExpression"><returnvalue>GtkExpression</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-string-sorter-get-expression">gtk_string_sorter_get_expression</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-string-sorter-set-expression">gtk_string_sorter_set_expression</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-string-sorter-get-ignore-case">gtk_string_sorter_get_ignore_case</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-string-sorter-set-ignore-case">gtk_string_sorter_set_ignore_case</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkStringSorter.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="GtkExpression"><type>GtkExpression</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkStringSorter--expression">expression</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkStringSorter--ignore-case">ignore-case</link></entry><entry role="property_flags">Read / Write</entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkStringSorter.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> GtkStringSorter
</screen>
</refsect1>

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

<refsect1 id="GtkStringSorter.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkStringSorter is a <link linkend="GtkSorter"><type>GtkSorter</type></link> that compares strings. It does the
comparison in a linguistically correct way using the current locale by
normalizing Unicode strings and possibly case-folding them before
performing the comparison.</para>
<para>To obtain the strings to compare, this sorter evaluates a <link linkend="GtkExpression"><type>GtkExpression</type></link>.</para>

</refsect1>
<refsect1 id="GtkStringSorter.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-string-sorter-new" role="function">
<title>gtk_string_sorter_new&#160;()</title>
<indexterm zone="gtk-string-sorter-new"><primary>gtk_string_sorter_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkStringSorter"><returnvalue>GtkStringSorter</returnvalue></link>&#160;*
gtk_string_sorter_new (<parameter><link linkend="GtkExpression"><type>GtkExpression</type></link> *expression</parameter>);</programlisting>
<para>Creates a new string sorter that compares items using the given
<parameter>expression</parameter>
.</para>
<para>Unless an expression is set on it, this sorter will always
compare items as invalid.</para>
<refsect3 id="gtk-string-sorter-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>expression</para></entry>
<entry role="parameter_description"><para>The expression to evaluate. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-string-sorter-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkStringSorter"><type>GtkStringSorter</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-string-sorter-get-expression" role="function">
<title>gtk_string_sorter_get_expression&#160;()</title>
<indexterm zone="gtk-string-sorter-get-expression"><primary>gtk_string_sorter_get_expression</primary></indexterm>
<programlisting language="C"><link linkend="GtkExpression"><returnvalue>GtkExpression</returnvalue></link>&#160;*
gtk_string_sorter_get_expression (<parameter><link linkend="GtkStringSorter"><type>GtkStringSorter</type></link> *self</parameter>);</programlisting>
<para>Gets the expression that is evaluated to obtain strings from items.</para>
<refsect3 id="gtk-string-sorter-get-expression.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="GtkStringSorter"><type>GtkStringSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-string-sorter-get-expression.returns" role="returns">
<title>Returns</title>
<para>a <link linkend="GtkExpression"><type>GtkExpression</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-string-sorter-set-expression" role="function">
<title>gtk_string_sorter_set_expression&#160;()</title>
<indexterm zone="gtk-string-sorter-set-expression"><primary>gtk_string_sorter_set_expression</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_string_sorter_set_expression (<parameter><link linkend="GtkStringSorter"><type>GtkStringSorter</type></link> *self</parameter>,
                                  <parameter><link linkend="GtkExpression"><type>GtkExpression</type></link> *expression</parameter>);</programlisting>
<para>Sets the expression that is evaluated to obtain strings from items.</para>
<para>The expression must have the type G_TYPE_STRING.</para>
<refsect3 id="gtk-string-sorter-set-expression.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="GtkStringSorter"><type>GtkStringSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>expression</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkExpression"><type>GtkExpression</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-string-sorter-get-ignore-case" role="function">
<title>gtk_string_sorter_get_ignore_case&#160;()</title>
<indexterm zone="gtk-string-sorter-get-ignore-case"><primary>gtk_string_sorter_get_ignore_case</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_string_sorter_get_ignore_case (<parameter><link linkend="GtkStringSorter"><type>GtkStringSorter</type></link> *self</parameter>);</programlisting>
<para>Gets whether the sorter ignores case differences.</para>
<refsect3 id="gtk-string-sorter-get-ignore-case.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="GtkStringSorter"><type>GtkStringSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-string-sorter-get-ignore-case.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>self</parameter>
is ignoring case differences</para>
</refsect3></refsect2>
<refsect2 id="gtk-string-sorter-set-ignore-case" role="function">
<title>gtk_string_sorter_set_ignore_case&#160;()</title>
<indexterm zone="gtk-string-sorter-set-ignore-case"><primary>gtk_string_sorter_set_ignore_case</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_string_sorter_set_ignore_case (<parameter><link linkend="GtkStringSorter"><type>GtkStringSorter</type></link> *self</parameter>,
                                   <parameter><link linkend="gboolean"><type>gboolean</type></link> ignore_case</parameter>);</programlisting>
<para>Sets whether the sorter will ignore case differences.</para>
<refsect3 id="gtk-string-sorter-set-ignore-case.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="GtkStringSorter"><type>GtkStringSorter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ignore_case</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to ignore case differences</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

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

</refsect1>
<refsect1 id="GtkStringSorter.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkStringSorter--expression" role="property"><title>The <literal>“expression”</literal> property</title>
<indexterm zone="GtkStringSorter--expression"><primary>GtkStringSorter:expression</primary></indexterm>
<programlisting>  “expression”               <link linkend="GtkExpression"><type>GtkExpression</type></link>&#160;*</programlisting>
<para>The expression to evaluate on item to get a string to compare with</para>

<para><emphasis role="annotation">[<acronym>type</acronym> GtkExpression]</emphasis></para><para>Owner: GtkStringSorter</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkStringSorter--ignore-case" role="property"><title>The <literal>“ignore-case”</literal> property</title>
<indexterm zone="GtkStringSorter--ignore-case"><primary>GtkStringSorter:ignore-case</primary></indexterm>
<programlisting>  “ignore-case”              <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If matching is case sensitive</para>
<para>Owner: GtkStringSorter</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkStringSorter.see-also">
<title>See Also</title>
<para><link linkend="GtkExpression"><type>GtkExpression</type></link></para>

</refsect1>

</refentry>
