1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Monitoring</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="libxfce4menu Reference Manual">
<link rel="up" href="utilities.html" title="Part IV. Utilities">
<link rel="prev" href="utilities.html" title="Part IV. Utilities">
<link rel="next" href="internals.html" title="Part V. Internals">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="utilities.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libxfce4menu Reference Manual</th>
<td><a accesskey="n" href="internals.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libxfce4menu-Monitoring.synopsis" class="shortcut">Top</a>
|
<a href="#libxfce4menu-Monitoring.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Monitoring">
<a name="libxfce4menu-Monitoring"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libxfce4menu-Monitoring.top_of_page"></a>Monitoring</span></h2>
<p>Monitoring</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libxfce4menu-Monitoring.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libxfce4menu/libxfce4menu.h>
<a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable">XfceMenuMonitorVTable</a>;
<span class="returnvalue">void</span> <a class="link" href="libxfce4menu-Monitoring.html#xfce-menu-monitor-set-vtable" title="xfce_menu_monitor_set_vtable ()">xfce_menu_monitor_set_vtable</a> (<em class="parameter"><code><a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable"><span class="type">XfceMenuMonitorVTable</span></a> *vtable</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libxfce4menu-Monitoring.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="libxfce4menu-Monitoring.details"></a><h2>Details</h2>
<div class="refsect2" title="XfceMenuMonitorVTable">
<a name="XfceMenuMonitorVTable"></a><h3>XfceMenuMonitorVTable</h3>
<pre class="programlisting">typedef struct {
gpointer (*monitor_file) (XfceMenu *menu,
const gchar *filename,
gpointer user_data);
gpointer (*monitor_directory) (XfceMenu *menu,
const gchar *filename,
gpointer user_data);
void (*remove_monitor) (XfceMenu *menu,
gpointer monitor_handle);
} XfceMenuMonitorVTable;
</pre>
<p>
This structure can be used by clients of the libxfce4menu API to
register functions which will be called whenever monitoring a
certain file or directory becomes necessary. This way libxfce4menu
only has to manage the monitor handles and leaves the monitoring
implementations to the client.
</p>
<p>
This mechanism was invented because the two main API clients,
Thunar and xfdesktop are already linked to ThunarVFS which has
monitoring capabilities.
</p>
</div>
<hr>
<div class="refsect2" title="xfce_menu_monitor_set_vtable ()">
<a name="xfce-menu-monitor-set-vtable"></a><h3>xfce_menu_monitor_set_vtable ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> xfce_menu_monitor_set_vtable (<em class="parameter"><code><a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable"><span class="type">XfceMenuMonitorVTable</span></a> *vtable</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
Sets the functions to be called when monitoring a file or directory
becomes necessary. See <a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable"><span class="type">XfceMenuMonitorVTable</span></a> for more detailled
information. Be careful with redefining the <a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable"><span class="type">XfceMenuMonitorVTable</span></a>
(e.g. don't redefine it while there are any <a class="link" href="XfceMenu.html" title="XfceMenu"><span class="type">XfceMenu</span></a>'s around).
</p>
<p>
In order to change the user data, just pass the same
<a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable"><span class="type">XfceMenuMonitorVTable</span></a> as you did before. Pass NULL to clear the
vtable (e.g. if you want to disable monitoring support).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>vtable</code></em> :</span></p></td>
<td>a <a class="link" href="libxfce4menu-Monitoring.html#XfceMenuMonitorVTable" title="XfceMenuMonitorVTable"><span class="type">XfceMenuMonitorVTable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>custom pointer to be passed to the vtable functions.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|