<?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="GtkFlattenListModel">
<refmeta>
<refentrytitle role="top_of_page" id="GtkFlattenListModel.top_of_page">GtkFlattenListModel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkFlattenListModel</refname>
<refpurpose>A list model that flattens a list of lists</refpurpose>
</refnamediv>

<refsect1 id="GtkFlattenListModel.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="GtkFlattenListModel"><returnvalue>GtkFlattenListModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-flatten-list-model-new">gtk_flatten_list_model_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-flatten-list-model-set-model">gtk_flatten_list_model_set_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-flatten-list-model-get-model">gtk_flatten_list_model_get_model</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-flatten-list-model-get-model-for-item">gtk_flatten_list_model_get_model_for_item</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFlattenListModel.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="GType"><type>GType</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkFlattenListModel--item-type">item-type</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>
<row><entry role="property_type"><link linkend="GListModel"><type>GListModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkFlattenListModel--model">model</link></entry><entry role="property_flags">Read / Write</entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkFlattenListModel.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> GtkFlattenListModel
</screen>
</refsect1>
<refsect1 id="GtkFlattenListModel.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkFlattenListModel implements
 <link linkend="GListModel">GListModel</link>.</para>

</refsect1>

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

<refsect1 id="GtkFlattenListModel.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link> is a list model that takes a list model containing
list models and flattens it into a single model.</para>
<para>Another term for this is concatenation: <link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link> takes a
list of lists and concatenates them into a single list.</para>

</refsect1>
<refsect1 id="GtkFlattenListModel.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-flatten-list-model-new" role="function">
<title>gtk_flatten_list_model_new&#160;()</title>
<indexterm zone="gtk-flatten-list-model-new"><primary>gtk_flatten_list_model_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkFlattenListModel"><returnvalue>GtkFlattenListModel</returnvalue></link>&#160;*
gtk_flatten_list_model_new (<parameter><link linkend="GType"><type>GType</type></link> item_type</parameter>,
                            <parameter><link linkend="GListModel"><type>GListModel</type></link> *model</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link> that flattens <parameter>list</parameter>
. The
models returned by <parameter>model</parameter>
 must conform to the given <parameter>item_type</parameter>
,
either by having an identical type or a subtype.</para>
<refsect3 id="gtk-flatten-list-model-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>item_type</para></entry>
<entry role="parameter_description"><para>The type of items in the to-be-flattened models</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>the item to be flattened. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-flatten-list-model-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-flatten-list-model-set-model" role="function">
<title>gtk_flatten_list_model_set_model&#160;()</title>
<indexterm zone="gtk-flatten-list-model-set-model"><primary>gtk_flatten_list_model_set_model</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_flatten_list_model_set_model (<parameter><link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link> *self</parameter>,
                                  <parameter><link linkend="GListModel"><type>GListModel</type></link> *model</parameter>);</programlisting>
<para>Sets a new model to be flattened. The model must contain items of
<link linkend="GListModel"><type>GListModel</type></link> that conform to the item type of <parameter>self</parameter>
.</para>
<refsect3 id="gtk-flatten-list-model-set-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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>the new model 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-flatten-list-model-get-model" role="function">
<title>gtk_flatten_list_model_get_model&#160;()</title>
<indexterm zone="gtk-flatten-list-model-get-model"><primary>gtk_flatten_list_model_get_model</primary></indexterm>
<programlisting language="C"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
gtk_flatten_list_model_get_model (<parameter><link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link> *self</parameter>);</programlisting>
<para>Gets the model set via <link linkend="gtk-flatten-list-model-set-model"><function>gtk_flatten_list_model_set_model()</function></link>.</para>
<refsect3 id="gtk-flatten-list-model-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>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-flatten-list-model-get-model.returns" role="returns">
<title>Returns</title>
<para>The model flattened by <parameter>self</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-flatten-list-model-get-model-for-item" role="function">
<title>gtk_flatten_list_model_get_model_for_item&#160;()</title>
<indexterm zone="gtk-flatten-list-model-get-model-for-item"><primary>gtk_flatten_list_model_get_model_for_item</primary></indexterm>
<programlisting language="C"><link linkend="GListModel"><returnvalue>GListModel</returnvalue></link>&#160;*
gtk_flatten_list_model_get_model_for_item
                               (<parameter><link linkend="GtkFlattenListModel"><type>GtkFlattenListModel</type></link> *self</parameter>,
                                <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting>
<para>Returns the model containing the item at the given position.</para>
<refsect3 id="gtk-flatten-list-model-get-model-for-item.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="GtkFlattenListModel"><type>GtkFlattenListModel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>a position</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-flatten-list-model-get-model-for-item.returns" role="returns">
<title>Returns</title>
<para>the model containing the item at <parameter>position</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

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

</refsect1>
<refsect1 id="GtkFlattenListModel.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkFlattenListModel--item-type" role="property"><title>The <literal>“item-type”</literal> property</title>
<indexterm zone="GtkFlattenListModel--item-type"><primary>GtkFlattenListModel:item-type</primary></indexterm>
<programlisting>  “item-type”                <link linkend="GType"><type>GType</type></link>&#160;*</programlisting>
<para>The <link linkend="GType"><type>GType</type></link> for elements of this object</para>
<para>Owner: GtkFlattenListModel</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
<para>Allowed values: GObject</para>
</refsect2>
<refsect2 id="GtkFlattenListModel--model" role="property"><title>The <literal>“model”</literal> property</title>
<indexterm zone="GtkFlattenListModel--model"><primary>GtkFlattenListModel:model</primary></indexterm>
<programlisting>  “model”                    <link linkend="GListModel"><type>GListModel</type></link>&#160;*</programlisting>
<para>The model being flattened</para>
<para>Owner: GtkFlattenListModel</para>
<para>Flags: Read / Write</para>
</refsect2>

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

</refsect1>

</refentry>
