<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>glibmm 2.4: Gio::FileMonitor Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table border="0" width="100%"> <tr> <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td> <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td> </tr> </table> <center> <a class="qindex" href="../../../../gtkmm-2.4/docs/index.html">Main Page</a> <a href="../../../../gtkmm-2.4/docs/reference/html/group__Widgets.html">Widgets</a> <a class="qindex" href="namespaces.html">glibmm Namespaces</a> <a href="../../../../gtkmm-2.4/docs/tutorial/html/index.html"> Book</a> </center> <hr width="100%"/> <!-- begin main content --> <div id="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="nav"> <a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1FileMonitor.html">FileMonitor</a></div> <h1>Gio::FileMonitor Class Reference</h1><!-- doxytag: class="Gio::FileMonitor" --><!-- doxytag: inherits="Glib::Object" -->Monitors a file or directory for changes. <a href="#_details">More...</a> <p> <div class="dynheader"> Inheritance diagram for Gio::FileMonitor:</div> <div class="dynsection"> <p><center><img src="classGio_1_1FileMonitor__inherit__graph.png" border="0" usemap="#Gio_1_1FileMonitor__inherit__map" alt="Inheritance graph"></center> <map name="Gio_1_1FileMonitor__inherit__map"> <area shape="rect" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="21,161,115,188"><area shape="rect" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="5,84,131,111"><area shape="rect" href="classsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="12,7,124,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classGio_1_1FileMonitor-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#6ffb078bc2ce7e7c4dde4c5731fa1f08">~FileMonitor</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">GFileMonitor* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#047a5032cf7905ecc37c6379e8c82f35">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#047a5032cf7905ecc37c6379e8c82f35"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const GFileMonitor* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#3930ab1dd57d0ec9341edf13bd62712f">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#3930ab1dd57d0ec9341edf13bd62712f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">GFileMonitor* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#989efd770a3a68bc77f1917751feec9e">gobj_copy</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#989efd770a3a68bc77f1917751feec9e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#b6bdfc13b4a27521304c9be8aedec677">cancel</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Cancels a file monitor. <a href="#b6bdfc13b4a27521304c9be8aedec677"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#e5ebb0182704c6ea8314c6f0a6106fad">is_cancelled</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns: <code>true</code> if monitor is canceled. <a href="#e5ebb0182704c6ea8314c6f0a6106fad"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#47b6ca4693b67efead6c8dde6d526b31">set_rate_limit</a> (int limit_msecs)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the rate limit to which the <em>monitor</em> will report consecutive change events to the same file. <a href="#47b6ca4693b67efead6c8dde6d526b31"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1SignalProxy3.html">Glib::SignalProxy3</a><br> < void, const <br> <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>&,<br> const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br> <<a class="el" href="classGio_1_1File.html">File</a>>&,<br> <a class="el" href="group__giommEnums.html#gbd42cf9877b5b6556bb18b7fd6b6dd81">FileMonitorEvent</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#36215dcf2bf7a9476284f419f163aad9">signal_changed</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><dl class="user" compact><dt><b>Prototype:</b></dt><dd><code>void on_my_changed(const Glib::RefPtr<File>& file, const Glib::RefPtr<File>& other_file, FileMonitorEvent event_type)</code> </dd></dl> <a href="#36215dcf2bf7a9476284f419f163aad9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><br> <int> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#d7325a354c1ddb2466d738c222518c76">_rate_limit</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The limit of the monitor to watch for changes. <a href="#d7325a354c1ddb2466d738c222518c76"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1PropertyProxy__ReadOnly.html">Glib::PropertyProxy_ReadOnly</a><br> <int> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#3ec2f24532c43a0dc958be8daefd960c">_rate_limit</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The limit of the monitor to watch for changes. <a href="#3ec2f24532c43a0dc958be8daefd960c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1PropertyProxy__ReadOnly.html">Glib::PropertyProxy_ReadOnly</a><br> <bool> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#2dfa2bd6e597fb46ebd351815ad88d25">_cancelled</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Whether the monitor has been cancelled. <a href="#2dfa2bd6e597fb46ebd351815ad88d25"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#42c6d3679e90ad17504d3c0a5937da7c">on_changed</a> (const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>& file, const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>& other_file, <a class="el" href="group__giommEnums.html#gbd42cf9877b5b6556bb18b7fd6b6dd81">FileMonitorEvent</a> event_type)</td></tr> <tr><td colspan="2"><br><h2>Related Functions</h2></td></tr> <tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br> <<a class="el" href="classGio_1_1FileMonitor.html">Gio::FileMonitor</a>> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1FileMonitor.html#5ad2474eedfd1ae12f2c75003e6f26fe">wrap</a> (GFileMonitor* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#5ad2474eedfd1ae12f2c75003e6f26fe"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Monitors a file or directory for changes. <p> To obtain a <a class="el" href="classGio_1_1FileMonitor.html" title="Monitors a file or directory for changes.">FileMonitor</a> for a file or directory, use <a class="el" href="classGio_1_1File.html#b8e14809f330ddd58e628c96921cd987" title="Obtains a file monitor for the given file.">File::monitor_file()</a> or <a class="el" href="classGio_1_1File.html#a0fa22ffba0ff50779e49ff9d12344e6" title="Obtains a directory monitor for the given file.">File::monitor_directory()</a>.<p> To get informed about changes to the file or directory you are monitoring, connect to signal_changed.<p> <dl compact><dt><b><a class="el" href="newin2p16s.html#_newin2p16s000029">Since glibmm 2.16:</a></b></dt><dd></dd></dl> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="6ffb078bc2ce7e7c4dde4c5731fa1f08"></a><!-- doxytag: member="Gio::FileMonitor::~FileMonitor" ref="6ffb078bc2ce7e7c4dde4c5731fa1f08" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gio::FileMonitor::~FileMonitor </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="047a5032cf7905ecc37c6379e8c82f35"></a><!-- doxytag: member="Gio::FileMonitor::gobj" ref="047a5032cf7905ecc37c6379e8c82f35" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GFileMonitor* Gio::FileMonitor::gobj </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Provides access to the underlying C GObject. <p> <p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#4c6efc18be8cb9c56e58fc0bd20fafbe">Glib::ObjectBase</a>.</p> </div> </div><p> <a class="anchor" name="3930ab1dd57d0ec9341edf13bd62712f"></a><!-- doxytag: member="Gio::FileMonitor::gobj" ref="3930ab1dd57d0ec9341edf13bd62712f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GFileMonitor* Gio::FileMonitor::gobj </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Provides access to the underlying C GObject. <p> <p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#778a94181132976bbfb0519793f3b32e">Glib::ObjectBase</a>.</p> </div> </div><p> <a class="anchor" name="989efd770a3a68bc77f1917751feec9e"></a><!-- doxytag: member="Gio::FileMonitor::gobj_copy" ref="989efd770a3a68bc77f1917751feec9e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GFileMonitor* Gio::FileMonitor::gobj_copy </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <p> </div> </div><p> <a class="anchor" name="b6bdfc13b4a27521304c9be8aedec677"></a><!-- doxytag: member="Gio::FileMonitor::cancel" ref="b6bdfc13b4a27521304c9be8aedec677" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileMonitor::cancel </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Cancels a file monitor. <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if monitor was cancelled. </dd></dl> </div> </div><p> <a class="anchor" name="e5ebb0182704c6ea8314c6f0a6106fad"></a><!-- doxytag: member="Gio::FileMonitor::is_cancelled" ref="e5ebb0182704c6ea8314c6f0a6106fad" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gio::FileMonitor::is_cancelled </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns: <code>true</code> if monitor is canceled. <p> <code>false</code> otherwise. <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if monitor is canceled. <code>false</code> otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="47b6ca4693b67efead6c8dde6d526b31"></a><!-- doxytag: member="Gio::FileMonitor::set_rate_limit" ref="47b6ca4693b67efead6c8dde6d526b31" args="(int limit_msecs)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gio::FileMonitor::set_rate_limit </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>limit_msecs</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the rate limit to which the <em>monitor</em> will report consecutive change events to the same file. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>limit_msecs</em> </td><td>A integer with the limit in milliseconds to poll for changes. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="36215dcf2bf7a9476284f419f163aad9"></a><!-- doxytag: member="Gio::FileMonitor::signal_changed" ref="36215dcf2bf7a9476284f419f163aad9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1SignalProxy3.html">Glib::SignalProxy3</a><void,const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>&,const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>&,<a class="el" href="group__giommEnums.html#gbd42cf9877b5b6556bb18b7fd6b6dd81">FileMonitorEvent</a>> Gio::FileMonitor::signal_changed </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="user" compact><dt><b>Prototype:</b></dt><dd><code>void on_my_changed(const Glib::RefPtr<File>& file, const Glib::RefPtr<File>& other_file, FileMonitorEvent event_type)</code> </dd></dl> <p> </div> </div><p> <a class="anchor" name="d7325a354c1ddb2466d738c222518c76"></a><!-- doxytag: member="Gio::FileMonitor::_rate_limit" ref="d7325a354c1ddb2466d738c222518c76" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><int> Gio::FileMonitor::_rate_limit </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> The limit of the monitor to watch for changes. <p> You rarely need to use properties because there are get_ and set_ methods for almost all of them. <dl class="return" compact><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div><p> <a class="anchor" name="3ec2f24532c43a0dc958be8daefd960c"></a><!-- doxytag: member="Gio::FileMonitor::_rate_limit" ref="3ec2f24532c43a0dc958be8daefd960c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1PropertyProxy__ReadOnly.html">Glib::PropertyProxy_ReadOnly</a><int> Gio::FileMonitor::_rate_limit </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> The limit of the monitor to watch for changes. <p> You rarely need to use properties because there are get_ and set_ methods for almost all of them. <dl class="return" compact><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div><p> <a class="anchor" name="2dfa2bd6e597fb46ebd351815ad88d25"></a><!-- doxytag: member="Gio::FileMonitor::_cancelled" ref="2dfa2bd6e597fb46ebd351815ad88d25" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1PropertyProxy__ReadOnly.html">Glib::PropertyProxy_ReadOnly</a><bool> Gio::FileMonitor::_cancelled </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Whether the monitor has been cancelled. <p> You rarely need to use properties because there are get_ and set_ methods for almost all of them. <dl class="return" compact><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div><p> <a class="anchor" name="42c6d3679e90ad17504d3c0a5937da7c"></a><!-- doxytag: member="Gio::FileMonitor::on_changed" ref="42c6d3679e90ad17504d3c0a5937da7c" args="(const Glib::RefPtr< File > &file, const Glib::RefPtr< File > &other_file, FileMonitorEvent event_type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gio::FileMonitor::on_changed </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>& </td> <td class="paramname"> <em>file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1File.html">File</a>>& </td> <td class="paramname"> <em>other_file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__giommEnums.html#gbd42cf9877b5b6556bb18b7fd6b6dd81">FileMonitorEvent</a> </td> <td class="paramname"> <em>event_type</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> </div> </div><p> <hr><h2>Friends And Related Function Documentation</h2> <a class="anchor" name="5ad2474eedfd1ae12f2c75003e6f26fe"></a><!-- doxytag: member="Gio::FileMonitor::wrap" ref="5ad2474eedfd1ae12f2c75003e6f26fe" args="(GFileMonitor *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1FileMonitor.html">Gio::FileMonitor</a>> wrap </td> <td>(</td> <td class="paramtype">GFileMonitor * </td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>take_copy</em> = <code>false</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p> A <a class="el" href="namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr> <tr><td valign="top"></td><td valign="top"><em>take_copy</em> </td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="filemonitor_8h.html">filemonitor.h</a></ul> </div> <!-- end main content --> <hr><address><small> Generated for glibmm 2.4 by <a href="http://www.doxygen.org/index.html"> Doxygen</a> 1.5.3 © 1997-2001</small></address> </body> </html>