~ubuntu-branches/ubuntu/wily/xfce4-panel/wily

« back to all changes in this revision

Viewing changes to docs/references/html/libxfce4panel-Panel-Plugin-Register-Macros.html

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2014-02-16 14:34:33 UTC
  • mfrom: (1.1.37)
  • Revision ID: package-import@ubuntu.com-20140216143433-dmwlwlhc7dn0bxqz
Tags: 4.11.0-0ubuntu1
* New upstream release.
* Update lintian override

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
<pre class="synopsis">
41
41
#include &lt;libxfce4panel/libxfce4panel.h&gt;
42
42
 
43
 
<span class="returnvalue">gboolean</span>            (<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginCheck" title="XfcePanelPluginCheck ()">*XfcePanelPluginCheck</a>)             (<em class="parameter"><code><span class="type">GdkScreen</span> *screen</code></em>);
 
43
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginCheck" title="XfcePanelPluginCheck ()">*XfcePanelPluginCheck</a>)             (<em class="parameter"><code><a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>);
44
44
<span class="returnvalue">void</span>                (<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginFunc" title="XfcePanelPluginFunc ()">*XfcePanelPluginFunc</a>)              (<em class="parameter"><code><a class="link" href="XfcePanelPlugin.html" title="XfcePanelPlugin"><span class="type">XfcePanelPlugin</span></a> *plugin</code></em>);
45
 
<span class="returnvalue">gboolean</span>            (<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginPreInit" title="XfcePanelPluginPreInit ()">*XfcePanelPluginPreInit</a>)           (<em class="parameter"><code><span class="type">gint</span> argc</code></em>,
46
 
                                                         <em class="parameter"><code><span class="type">gchar</span> **argv</code></em>);
 
45
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginPreInit" title="XfcePanelPluginPreInit ()">*XfcePanelPluginPreInit</a>)           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> argc</code></em>,
 
46
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **argv</code></em>);
47
47
#define             <a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XFCE-PANEL-PLUGIN-REGISTER:CAPS" title="XFCE_PANEL_PLUGIN_REGISTER()">XFCE_PANEL_PLUGIN_REGISTER</a>          (construct_func)
48
48
#define             <a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XFCE-PANEL-PLUGIN-REGISTER-WITH-CHECK:CAPS" title="XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK()">XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK</a>(construct_func,
49
49
                                                         check_func)
64
64
<a name="libxfce4panel-Panel-Plugin-Register-Macros.details"></a><h2>Details</h2>
65
65
<div class="refsect2">
66
66
<a name="XfcePanelPluginCheck"></a><h3>XfcePanelPluginCheck ()</h3>
67
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            (*XfcePanelPluginCheck)             (<em class="parameter"><code><span class="type">GdkScreen</span> *screen</code></em>);</pre>
 
67
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*XfcePanelPluginCheck)             (<em class="parameter"><code><a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
68
68
<p>
69
69
Callback function that is run before creating a plugin. It should return
70
 
<code class="literal">FALSE</code> if the plugin is not available for whatever reason. The function
 
70
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the plugin is not available for whatever reason. The function
71
71
can be given as argument to one of the registration macros.
72
72
</p>
73
73
<div class="variablelist"><table border="0" class="variablelist">
78
78
<tbody>
79
79
<tr>
80
80
<td><p><span class="term"><em class="parameter"><code>screen</code></em> :</span></p></td>
81
 
<td>the <span class="type">GdkScreen</span> the panel is running on</td>
 
81
<td>the <a href="../gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> the panel is running on</td>
82
82
</tr>
83
83
<tr>
84
84
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
85
85
<td>
86
 
<code class="literal">TRUE</code> if the plugin can be started, <code class="literal">FALSE</code> otherwise.</td>
 
86
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the plugin can be started, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
87
87
</tr>
88
88
</tbody>
89
89
</table></div>
111
111
<hr>
112
112
<div class="refsect2">
113
113
<a name="XfcePanelPluginPreInit"></a><h3>XfcePanelPluginPreInit ()</h3>
114
 
<pre class="programlisting"><span class="returnvalue">gboolean</span>            (*XfcePanelPluginPreInit)           (<em class="parameter"><code><span class="type">gint</span> argc</code></em>,
115
 
                                                         <em class="parameter"><code><span class="type">gchar</span> **argv</code></em>);</pre>
 
114
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*XfcePanelPluginPreInit)           (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> argc</code></em>,
 
115
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **argv</code></em>);</pre>
116
116
<p>
117
 
Callback function that is run in an external plugin before <code class="function">gtk_init()</code>. It
118
 
should return <code class="literal">FALSE</code> if the plugin is not available for whatever reason.
 
117
Callback function that is run in an external plugin before <a href="http://developer.gnome.org/gtk2/gtk3-General.html#gtk-init"><code class="function">gtk_init()</code></a>. It
 
118
should return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the plugin is not available for whatever reason.
119
119
The function can be given as argument to one of the registration macros.
120
120
</p>
121
121
<p>
122
122
The main purpose of this callback is to allow multithreaded plugins to call
123
 
<code class="function">g_thread_init()</code>.
 
123
<a href="http://library.gnome.org/devel/glib/unstable/glib-Deprecated-Thread-APIs.html#g-thread-init"><code class="function">g_thread_init()</code></a>.
124
124
</p>
125
125
<div class="variablelist"><table border="0" class="variablelist">
126
126
<colgroup>
139
139
<tr>
140
140
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
141
141
<td>
142
 
<code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> otherwise.</td>
 
142
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
143
143
</tr>
144
144
</tbody>
145
145
</table></div>
174
174
<p>
175
175
Register a panel plugin using a construct function. The <em class="parameter"><code>check_func</code></em>
176
176
will be called before the plugin is created. If this function returns
177
 
<code class="literal">FALSE</code>, the plugin won't be added to the panel. For proper feedback,
 
177
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the plugin won't be added to the panel. For proper feedback,
178
178
you are responsible for showing a dialog why the plugin is not added
179
179
to the panel.
180
180
</p>