<refentry id="ThunarVfsMonitor">
<refmeta>
<refentrytitle>ThunarVfsMonitor</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>THUNAR-VFS Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ThunarVfsMonitor</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>

#include &lt;thunar-vfs/thunar-vfs.h&gt;


            <link linkend="ThunarVfsMonitor-struct">ThunarVfsMonitor</link>;
enum        <link linkend="ThunarVfsMonitorEvent">ThunarVfsMonitorEvent</link>;
            <link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link>;
<link linkend="void">void</link>        (<link linkend="ThunarVfsMonitorCallback">*ThunarVfsMonitorCallback</link>)     (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link> *handle,
                                             <link linkend="ThunarVfsMonitorEvent">ThunarVfsMonitorEvent</link> event,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *handle_path,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *event_path,
                                             <link linkend="gpointer">gpointer</link> user_data);
<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link>* <link linkend="thunar-vfs-monitor-get-default">thunar_vfs_monitor_get_default</link>
                                            (void);
<link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link>* <link linkend="thunar-vfs-monitor-add-directory">thunar_vfs_monitor_add_directory</link>
                                            (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *path,
                                             <link linkend="ThunarVfsMonitorCallback">ThunarVfsMonitorCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> user_data);
<link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link>* <link linkend="thunar-vfs-monitor-add-file">thunar_vfs_monitor_add_file</link>
                                            (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *path,
                                             <link linkend="ThunarVfsMonitorCallback">ThunarVfsMonitorCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> user_data);
<link linkend="void">void</link>        <link linkend="thunar-vfs-monitor-remove">thunar_vfs_monitor_remove</link>       (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link> *handle);
<link linkend="void">void</link>        <link linkend="thunar-vfs-monitor-feed">thunar_vfs_monitor_feed</link>         (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsMonitorEvent">ThunarVfsMonitorEvent</link> event,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *path);


</synopsis>
</refsynopsisdiv>

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

  <link linkend="GObject">GObject</link>
   +----ThunarVfsMonitor
</synopsis>

</refsect1>








<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="ThunarVfsMonitor-struct"/>ThunarVfsMonitor</title>
<indexterm><primary>ThunarVfsMonitor</primary></indexterm><programlisting>typedef struct _ThunarVfsMonitor ThunarVfsMonitor;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ThunarVfsMonitorEvent"/>enum ThunarVfsMonitorEvent</title>
<indexterm><primary>ThunarVfsMonitorEvent</primary></indexterm><programlisting>typedef enum
{
  THUNAR_VFS_MONITOR_EVENT_CHANGED,
  THUNAR_VFS_MONITOR_EVENT_CREATED,
  THUNAR_VFS_MONITOR_EVENT_DELETED,
} ThunarVfsMonitorEvent;
</programlisting>
<para>
Describes an event that occurred on a <link linkend="ThunarVfsMonitorHandle"><type>ThunarVfsMonitorHandle</type></link>.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>THUNAR_VFS_MONITOR_EVENT_CHANGED</literal></term>
<listitem><simpara> a file or directory was changed.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_MONITOR_EVENT_CREATED</literal></term>
<listitem><simpara> a file or directory was created.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_MONITOR_EVENT_DELETED</literal></term>
<listitem><simpara> a file or directory was deleted.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="ThunarVfsMonitorHandle"/>ThunarVfsMonitorHandle</title>
<indexterm><primary>ThunarVfsMonitorHandle</primary></indexterm><programlisting>typedef struct _ThunarVfsMonitorHandle ThunarVfsMonitorHandle;</programlisting>
<para>
A handle on a file system entity, which is currently watched
by a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ThunarVfsMonitorCallback"/>ThunarVfsMonitorCallback ()</title>
<indexterm><primary>ThunarVfsMonitorCallback</primary></indexterm><programlisting><link linkend="void">void</link>        (*ThunarVfsMonitorCallback)     (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link> *handle,
                                             <link linkend="ThunarVfsMonitorEvent">ThunarVfsMonitorEvent</link> event,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *handle_path,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *event_path,
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
The prototype for callback functions that will be called by a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>
whenever one of its associated <link linkend="ThunarVfsMonitorHandle"><type>ThunarVfsMonitorHandle</type></link><!---->s notice a
change.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>monitor</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsMonitorHandle"><type>ThunarVfsMonitorHandle</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>event</parameter>&nbsp;:</term>
<listitem><simpara> the event that occurred.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handle_path</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link> that was specified when registering the <parameter>handle</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>event_path</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link> on which the <parameter>event</parameter> occurred.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> the user data that was specified when registering the <parameter>handle</parameter> with the <parameter>monitor</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-monitor-get-default"/>thunar_vfs_monitor_get_default ()</title>
<indexterm><primary>thunar_vfs_monitor_get_default</primary></indexterm><programlisting><link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link>* thunar_vfs_monitor_get_default
                                            (void);</programlisting>
<para>
Returns the shared <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link> instance. The caller
is responsible to call <link linkend="g-object-unref"><function>g_object_unref()</function></link> on the returned
object when no longer needed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a reference to the shared <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>
              instance.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-monitor-add-directory"/>thunar_vfs_monitor_add_directory ()</title>
<indexterm><primary>thunar_vfs_monitor_add_directory</primary></indexterm><programlisting><link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link>* thunar_vfs_monitor_add_directory
                                            (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *path,
                                             <link linkend="ThunarVfsMonitorCallback">ThunarVfsMonitorCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>monitor</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link> of the directory that should be watched.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> the callback function to invoke.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> additional data to pass to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="ThunarVfsMonitorHandle"><type>ThunarVfsMonitorHandle</type></link> for the new watch.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-monitor-add-file"/>thunar_vfs_monitor_add_file ()</title>
<indexterm><primary>thunar_vfs_monitor_add_file</primary></indexterm><programlisting><link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link>* thunar_vfs_monitor_add_file
                                            (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *path,
                                             <link linkend="ThunarVfsMonitorCallback">ThunarVfsMonitorCallback</link> callback,
                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>monitor</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link> of the file that should be watched.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&nbsp;:</term>
<listitem><simpara> the callback function to invoke.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
<listitem><simpara> additional data to pass to <parameter>callback</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="ThunarVfsMonitorHandle"><type>ThunarVfsMonitorHandle</type></link> for the new watch.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-monitor-remove"/>thunar_vfs_monitor_remove ()</title>
<indexterm><primary>thunar_vfs_monitor_remove</primary></indexterm><programlisting><link linkend="void">void</link>        thunar_vfs_monitor_remove       (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsMonitorHandle">ThunarVfsMonitorHandle</link> *handle);</programlisting>
<para>
Removes <parameter>handle</parameter> from <parameter>monitor</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>monitor</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>handle</parameter>&nbsp;:</term>
<listitem><simpara> a valid <link linkend="ThunarVfsMonitorHandle"><type>ThunarVfsMonitorHandle</type></link> for <parameter>monitor</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-monitor-feed"/>thunar_vfs_monitor_feed ()</title>
<indexterm><primary>thunar_vfs_monitor_feed</primary></indexterm><programlisting><link linkend="void">void</link>        thunar_vfs_monitor_feed         (<link linkend="ThunarVfsMonitor">ThunarVfsMonitor</link> *monitor,
                                             <link linkend="ThunarVfsMonitorEvent">ThunarVfsMonitorEvent</link> event,
                                             <link linkend="ThunarVfsPath">ThunarVfsPath</link> *path);</programlisting>
<para>
Explicitly injects the given <parameter>event</parameter> into <parameter>monitor</parameter><!---->s event
processing logic.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>monitor</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsMonitor"><type>ThunarVfsMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>event</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsMonitorEvent"><type>ThunarVfsMonitorEvent</type></link> that should be emulated.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link> on which <parameter>event</parameter> took place.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
