<?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="GtkSignalListItemFactory">
<refmeta>
<refentrytitle role="top_of_page" id="GtkSignalListItemFactory.top_of_page">GtkSignalListItemFactory</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkSignalListItemFactory</refname>
<refpurpose>A listitem factory providing signals</refpurpose>
</refnamediv>

<refsect1 id="GtkSignalListItemFactory.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="GtkListItemFactory"><returnvalue>GtkListItemFactory</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-signal-list-item-factory-new">gtk_signal_list_item_factory_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkSignalListItemFactory.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="GtkSignalListItemFactory-bind">bind</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSignalListItemFactory-setup">setup</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSignalListItemFactory-teardown">teardown</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSignalListItemFactory-unbind">unbind</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>

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

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkSignalListItemFactory.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="GtkListItemFactory">GtkListItemFactory</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkSignalListItemFactory
</screen>
</refsect1>

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

<refsect1 id="GtkSignalListItemFactory.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link> is a <link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link> that provides signals
that user code can connect to to manage listitems.
Signals are emitted for every listitem in the same order:</para>
<orderedlist>
<listitem>
<para><link linkend="GtkSignalListItemFactory-setup"><type>“setup”</type></link> is emitted to set up permanent things
on the listitem. This usually means constructing the widgets used in the
row and adding them to the listitem.</para>
</listitem>
<listitem>
<para><link linkend="GtkSignalListItemFactory-bind"><type>“bind”</type></link> is emitted to bind the item passed via
<link linkend="GtkListItem--item"><type>“item”</type></link> to the widgets that have been created in step 1 or to
add item-specific widgets. Signals are connected to listen to changes -
both to changes in the item to update the widgets or to changes in the
widgets to update the item. After this signal has been called, the
listitem may be shown in a list widget.</para>
</listitem>
<listitem>
<para><link linkend="GtkSignalListItemFactory-unbind"><type>“unbind”</type></link> is emitted to undo everything done
in step 2. Usually this means disconnecting signal handlers. Once this
signal has been called, the listitem will no longer be used in a list
widget.</para>
</listitem>
<listitem><para><link linkend="GtkSignalListItemFactory-bind"><type>“bind”</type></link> and <link linkend="GtkSignalListItemFactory-unbind"><type>“unbind”</type></link>
may be emitted multiple times again to bind the listitem for use with
new items. By reusing listitems, potentially costly setup can be
avoided. However, it means code needs to make sure to properly clean
up the listitem in step 3 so that no information from the previous
use leaks into the next use.</para>
<orderedlist>
<listitem>
<para><link linkend="GtkSignalListItemFactory-teardown"><type>“teardown”</type></link> is emitted to allow undoing the</para>
</listitem>
</orderedlist>
</listitem>
</orderedlist>
<para>effects of <link linkend="GtkSignalListItemFactory-setup"><type>“setup”</type></link>. After this signal was emitted
on a listitem, the listitem will be destroyed and not be used again.</para>
<para>Note that during the signal emissions, changing properties on the
<link linkend="GtkListItems"><type>GtkListItems</type></link> passed will not trigger notify signals as the listitem's
notifications are frozen. See <link linkend="g-object-freeze-notify"><function>g_object_freeze_notify()</function></link> for details.</para>
<para>For tracking changes in other properties in the <link linkend="GtkListItem"><type>GtkListItem</type></link>, the
<link linkend="GtkListItem-notify"><type>“notify”</type></link> signal is recommended. The signal can be connected
in the <link linkend="GtkSignalListItemFactory-setup"><type>“setup”</type></link> signal and removed again during
<link linkend="GtkSignalListItemFactory-teardown"><type>“teardown”</type></link>.</para>

</refsect1>
<refsect1 id="GtkSignalListItemFactory.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-signal-list-item-factory-new" role="function">
<title>gtk_signal_list_item_factory_new&#160;()</title>
<indexterm zone="gtk-signal-list-item-factory-new"><primary>gtk_signal_list_item_factory_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkListItemFactory"><returnvalue>GtkListItemFactory</returnvalue></link>&#160;*
gtk_signal_list_item_factory_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link>. You need to connect signal
handlers before you use it.</para>
<refsect3 id="gtk-signal-list-item-factory-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkSignalListItemFactory.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkSignalListItemFactory-struct" role="struct">
<title>GtkSignalListItemFactory</title>
<indexterm zone="GtkSignalListItemFactory-struct"><primary>GtkSignalListItemFactory</primary></indexterm>
<programlisting language="C">typedef struct _GtkSignalListItemFactory GtkSignalListItemFactory;</programlisting>
<para>The object for the <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link>.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkSignalListItemFactory.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkSignalListItemFactory-bind" role="signal"><title>The <literal>“bind”</literal> signal</title>
<indexterm zone="GtkSignalListItemFactory-bind"><primary>GtkSignalListItemFactory::bind</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link> *self,
               <link linkend="GtkListItem"><type>GtkListItem</type></link>              *listitem,
               <link linkend="gpointer"><type>gpointer</type></link>                  user_data)</programlisting>
<para>The ::bind signal is emitted when a new <link linkend="GtkListItem--item"><type>“item”</type></link> has been set
on the <parameter>listitem</parameter>
 and should be bound for use.</para>
<para>After this signal was emitted, the listitem might be shown in a <link linkend="GtkListView"><type>GtkListView</type></link>
or other list widget.</para>
<para>The <link linkend="GtkSignalListItemFactory-unbind"><type>“unbind”</type></link> signal is the opposite of this signal
and can be used to undo everything done in this signal.</para>
<refsect3 id="GtkSignalListItemFactory-bind.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>The <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>listitem</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkListItem"><type>GtkListItem</type></link> to bind</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><refsect2 id="GtkSignalListItemFactory-setup" role="signal"><title>The <literal>“setup”</literal> signal</title>
<indexterm zone="GtkSignalListItemFactory-setup"><primary>GtkSignalListItemFactory::setup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link> *self,
               <link linkend="GtkListItem"><type>GtkListItem</type></link>              *listitem,
               <link linkend="gpointer"><type>gpointer</type></link>                  user_data)</programlisting>
<para>The ::setup signal is emitted when a new listitem has been created and
needs to be setup for use. It is the first signal emitted for every listitem.</para>
<para>The <link linkend="GtkSignalListItemFactory-teardown"><type>“teardown”</type></link> signal is the opposite of this signal
and can be used to undo everything done in this signal.</para>
<refsect3 id="GtkSignalListItemFactory-setup.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>The <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>listitem</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkListItem"><type>GtkListItem</type></link> to set up</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><refsect2 id="GtkSignalListItemFactory-teardown" role="signal"><title>The <literal>“teardown”</literal> signal</title>
<indexterm zone="GtkSignalListItemFactory-teardown"><primary>GtkSignalListItemFactory::teardown</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link> *self,
               <link linkend="GtkListItem"><type>GtkListItem</type></link>              *listitem,
               <link linkend="gpointer"><type>gpointer</type></link>                  user_data)</programlisting>
<para>The ::teardown signal is emitted when a listitem is about to be destroyed.
It is the last signal ever emitted for this <parameter>listitem</parameter>
.</para>
<para>This signal is the opposite of the <link linkend="GtkSignalListItemFactory-setup"><type>“setup”</type></link> signal
and should be used to undo everything done in that signal.</para>
<refsect3 id="GtkSignalListItemFactory-teardown.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>The <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>listitem</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkListItem"><type>GtkListItem</type></link> to teardown</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><refsect2 id="GtkSignalListItemFactory-unbind" role="signal"><title>The <literal>“unbind”</literal> signal</title>
<indexterm zone="GtkSignalListItemFactory-unbind"><primary>GtkSignalListItemFactory::unbind</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link> *self,
               <link linkend="GtkListItem"><type>GtkListItem</type></link>              *listitem,
               <link linkend="gpointer"><type>gpointer</type></link>                  user_data)</programlisting>
<para>The ::unbind signal is emitted when a listitem has been removed from use
in a list widget and its new <link linkend="GtkListItem--item"><type>“item”</type></link> is about to be unset.</para>
<para>This signal is the opposite of the <link linkend="GtkSignalListItemFactory-bind"><type>“bind”</type></link> signal
and should be used to undo everything done in that signal.</para>
<refsect3 id="GtkSignalListItemFactory-unbind.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>The <link linkend="GtkSignalListItemFactory"><type>GtkSignalListItemFactory</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>listitem</para></entry>
<entry role="parameter_description"><para>The <link linkend="GtkListItem"><type>GtkListItem</type></link> to unbind</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="GtkSignalListItemFactory.see-also">
<title>See Also</title>
<para><link linkend="GtkListItemFactory"><type>GtkListItemFactory</type></link></para>

</refsect1>

</refentry>
