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

<refsect1 id="GtkMultiFilter.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="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-multi-filter-append">gtk_multi_filter_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-filter-remove">gtk_multi_filter_remove</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GtkAnyFilter"><returnvalue>GtkAnyFilter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-any-filter-new">gtk_any_filter_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GtkEveryFilter"><returnvalue>GtkEveryFilter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-every-filter-new">gtk_every_filter_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

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

<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkAnyFilter-struct">GtkAnyFilter</link></entry></row>

<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkEveryFilter-struct">GtkEveryFilter</link></entry></row>

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

</refsect1>

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

<refsect1 id="GtkMultiFilter.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkMultiFilter is the base type that implements support for handling
multiple filters.</para>
<para>GtkAnyFilter is a subclass of GtkMultiFilter that matches an item
when at least one of its filters matches.</para>
<para>GtkEveryFilter is a subclass of GtkMultiFilter that matches an item
when each of its filters matches.</para>

</refsect1>
<refsect1 id="GtkMultiFilter.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-multi-filter-append" role="function">
<title>gtk_multi_filter_append&#160;()</title>
<indexterm zone="gtk-multi-filter-append"><primary>gtk_multi_filter_append</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_multi_filter_append (<parameter><link linkend="GtkMultiFilter"><type>GtkMultiFilter</type></link> *self</parameter>,
                         <parameter><link linkend="GtkFilter"><type>GtkFilter</type></link> *filter</parameter>);</programlisting>
<para>Adds a <parameter>filter</parameter>
 to <parameter>self</parameter>
 to use for matching.</para>
<refsect3 id="gtk-multi-filter-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="GtkMultiFilter"><type>GtkMultiFilter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>filter</para></entry>
<entry role="parameter_description"><para>A new filter to use. </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-filter-remove" role="function">
<title>gtk_multi_filter_remove&#160;()</title>
<indexterm zone="gtk-multi-filter-remove"><primary>gtk_multi_filter_remove</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_multi_filter_remove (<parameter><link linkend="GtkMultiFilter"><type>GtkMultiFilter</type></link> *self</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>Removes the filter at the given <parameter>position</parameter>
 from the list of filters used
by <parameter>self</parameter>
.
If <parameter>position</parameter>
 is larger than the number of filters, nothing happens and
the function returns.</para>
<refsect3 id="gtk-multi-filter-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="GtkMultiFilter"><type>GtkMultiFilter</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 filter to remove</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-any-filter-new" role="function">
<title>gtk_any_filter_new&#160;()</title>
<indexterm zone="gtk-any-filter-new"><primary>gtk_any_filter_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkAnyFilter"><returnvalue>GtkAnyFilter</returnvalue></link>&#160;*
gtk_any_filter_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new empty "any" filter.
Use <link linkend="gtk-multi-filter-append"><function>gtk_multi_filter_append()</function></link> to add filters to it.</para>
<para>This filter matches an item if any of the filters added to it
matches the item.
In particular, this means that if no filter has been added to
it, the filter matches no item.</para>
<refsect3 id="gtk-any-filter-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkAnyFilter"><type>GtkAnyFilter</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-every-filter-new" role="function">
<title>gtk_every_filter_new&#160;()</title>
<indexterm zone="gtk-every-filter-new"><primary>gtk_every_filter_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkEveryFilter"><returnvalue>GtkEveryFilter</returnvalue></link>&#160;*
gtk_every_filter_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new empty "every" filter.
Use <link linkend="gtk-multi-filter-append"><function>gtk_multi_filter_append()</function></link> to add filters to it.</para>
<para>This filter matches an item if each of the filters added to it
matches the item.
In particular, this means that if no filter has been added to
it, the filter matches every item.</para>
<refsect3 id="gtk-every-filter-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkEveryFilter"><type>GtkEveryFilter</type></link></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkMultiFilter.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkMultiFilter-struct" role="struct">
<title>GtkMultiFilter</title>
<indexterm zone="GtkMultiFilter-struct"><primary>GtkMultiFilter</primary></indexterm>
<programlisting language="C">typedef struct _GtkMultiFilter GtkMultiFilter;</programlisting>
</refsect2>
<refsect2 id="GtkAnyFilter-struct" role="struct">
<title>GtkAnyFilter</title>
<indexterm zone="GtkAnyFilter-struct"><primary>GtkAnyFilter</primary></indexterm>
<programlisting language="C">typedef struct _GtkAnyFilter GtkAnyFilter;</programlisting>
</refsect2>
<refsect2 id="GtkEveryFilter-struct" role="struct">
<title>GtkEveryFilter</title>
<indexterm zone="GtkEveryFilter-struct"><primary>GtkEveryFilter</primary></indexterm>
<programlisting language="C">typedef struct _GtkEveryFilter GtkEveryFilter;</programlisting>
</refsect2>

</refsect1>

</refentry>
