<refentry id="ThunarxPropertyPageProvider">
<refmeta>
<refentrytitle>ThunarxPropertyPageProvider</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>THUNARX Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ThunarxPropertyPageProvider</refname><refpurpose>The interface to extensions that provide additional property pages</refpurpose>
</refnamediv>
<refsect1>
<title>Stability Level</title>
Stable, unless otherwise indicated
</refsect1>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>

#include &lt;thunarx/thunarx.h&gt;


            <link linkend="ThunarxPropertyPageProvider-struct">ThunarxPropertyPageProvider</link>;
            <link linkend="ThunarxPropertyPageProviderIface">ThunarxPropertyPageProviderIface</link>;
<link linkend="GList">GList</link>*      <link linkend="thunarx-property-page-provider-get-pages">thunarx_property_page_provider_get_pages</link>
                                            (<link linkend="ThunarxPropertyPageProvider">ThunarxPropertyPageProvider</link> *provider,
                                             <link linkend="GList">GList</link> *files);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GInterface">GInterface</link>
   +----ThunarxPropertyPageProvider
</synopsis>

</refsect1>

<refsect1>
<title>Prerequisites</title>
<para>
ThunarxPropertyPageProvider requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>







<refsect1>
<title>Description</title>
<para>
  To add a property page to the file properties dialog, extensions must implement the
  <type>ThunarxPropertyPageProvider</type> interface. This interface has only one virtual
  method, <function>get_pages</function>, that is passed a list of <link
  linkend="ThunarxFileInfo"><type>ThunarxFileInfo</type></link> objects and returns a list
  of <link linkend="ThunarxPropertyPage"><type>ThunarxPropertyPage</type></link> objects.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="ThunarxPropertyPageProvider-struct"/>ThunarxPropertyPageProvider</title>
<indexterm><primary>ThunarxPropertyPageProvider</primary></indexterm><programlisting>typedef struct _ThunarxPropertyPageProvider ThunarxPropertyPageProvider;</programlisting>
<para>
  Property page provider type.
</para></refsect2>
<refsect2>
<title><anchor id="ThunarxPropertyPageProviderIface"/>ThunarxPropertyPageProviderIface</title>
<indexterm><primary>ThunarxPropertyPageProviderIface</primary></indexterm><programlisting>typedef struct {
  GList *(*get_pages) (ThunarxPropertyPageProvider *provider,
                       GList                       *files);
} ThunarxPropertyPageProviderIface;
</programlisting>
<para>
	Interface with virtual methods implemented by extensions that provide
	additional pages for the file properties dialog.
</para><variablelist role="struct">
<varlistentry>
<term><structfield>get_pages</structfield>&nbsp;()</term>
<listitem><simpara>See <link linkend="thunarx-property-page-provider-get-pages"><function>thunarx_property_page_provider_get_pages()</function></link>.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunarx-property-page-provider-get-pages"/>thunarx_property_page_provider_get_pages ()</title>
<indexterm><primary>thunarx_property_page_provider_get_pages</primary></indexterm><programlisting><link linkend="GList">GList</link>*      thunarx_property_page_provider_get_pages
                                            (<link linkend="ThunarxPropertyPageProvider">ThunarxPropertyPageProvider</link> *provider,
                                             <link linkend="GList">GList</link> *files);</programlisting>
<para>
Returns the list of <link linkend="ThunarxPropertyPage"><type>ThunarxPropertyPage</type></link><!---->s that <parameter>provider</parameter> has to offer for <parameter>files</parameter>.
</para>
<para>
As a special note, this method automatically takes a reference on the
<parameter>provider</parameter> for every <link linkend="ThunarxPropertyPage"><type>ThunarxPropertyPage</type></link> object returned from the real implementation
of this method in <parameter>provider</parameter>. This is to make sure that the extension stays
in memory for atleast the time that the pages are used. If the extension
wants to stay in memory for a longer time, it'll need to take care of this
itself (e.g. by taking an additional reference on the <parameter>provider</parameter> itself,
that's released at a later time).
</para>
<para>
The caller is responsible to free the returned list of pages using
something like this when no longer needed:
<informalexample><programlisting>
g_list_foreach (list, (GFunc) g_object_ref, NULL);
g_list_foreach (list, (GFunc) gtk_object_sink, NULL);
g_list_foreach (list, (GFunc) g_object_unref, NULL);
g_list_free (list);
</programlisting></informalexample></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>provider</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarxPropertyPageProvider"><type>ThunarxPropertyPageProvider</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>files</parameter>&nbsp;:</term>
<listitem><simpara> the list of <link linkend="ThunarxFileInfo"><type>ThunarxFileInfo</type></link><!---->s for which a properties dialog will be displayed.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the list of <link linkend="ThunarxPropertyPage"><type>ThunarxPropertyPage</type></link><!---->s that <parameter>provider</parameter> has to offer
              for <parameter>files</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
  The description of the <link linkend="ThunarxPropertyPage"><type>ThunarxPropertyPage</type></link> class.
</para>
</refsect1>

</refentry>
