8
8
<link rel="up" href="libxfce4panel-plugins.html" title="Part II. Panel Plugins">
9
9
<link rel="prev" href="XfcePanelPlugin.html" title="XfcePanelPlugin">
10
10
<link rel="next" href="libxfce4panel-Panel-Plugin-Register-Macros-(4.6-Style).html" title="Panel Plugin Register Macros (4.6 Style)">
11
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16
16
<td width="100%" align="left" class="shortcuts">
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18
<a href="#libxfce4panel-Panel-Plugin-Register-Macros.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18
<a href="#libxfce4panel-Panel-Plugin-Register-Macros.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19
19
<a href="#libxfce4panel-Panel-Plugin-Register-Macros.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
21
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
44
44
<td class="function_type">
45
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
45
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
47
47
<td class="function_name">
48
48
<span class="c_punctuation">(</span><a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginCheck" title="XfcePanelPluginCheck ()">*XfcePanelPluginCheck</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
60
60
<td class="function_type">
61
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
61
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
63
63
<td class="function_name">
64
64
<span class="c_punctuation">(</span><a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginPreInit" title="XfcePanelPluginPreInit ()">*XfcePanelPluginPreInit</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
105
105
<a name="libxfce4panel-Panel-Plugin-Register-Macros.functions_details"></a><h2>Functions</h2>
106
106
<div class="refsect2">
107
107
<a name="XfcePanelPluginCheck"></a><h3>XfcePanelPluginCheck ()</h3>
108
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
108
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
109
109
<span class="c_punctuation">(</span>*XfcePanelPluginCheck<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="http://developer.gnome.org/gdk2/GdkScreen.html"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
110
110
<p>Callback function that is run before creating a plugin. It should return
111
<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
111
<a href="https://developer.gnome.org/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
112
112
can be given as argument to one of the registration macros.</p>
113
113
<div class="refsect3">
114
114
<a name="id-1.3.4.7.2.5"></a><h4>Parameters</h4>
128
128
<div class="refsect3">
129
129
<a name="id-1.3.4.7.2.6"></a><h4>Returns</h4>
130
<p> <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.</p>
130
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the plugin can be started, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
158
158
<div class="refsect2">
159
159
<a name="XfcePanelPluginPreInit"></a><h3>XfcePanelPluginPreInit ()</h3>
160
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
161
<span class="c_punctuation">(</span>*XfcePanelPluginPreInit<span class="c_punctuation">)</span> (<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>,
162
<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>
163
<p>Callback function that is run in an external plugin before <a href="http://library.gnome.org/devel/gtk3/gtk2-General.html#gtk-init"><code class="function">gtk_init()</code></a>. It
164
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.
160
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
161
<span class="c_punctuation">(</span>*XfcePanelPluginPreInit<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> argc</code></em>,
162
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **argv</code></em>);</pre>
163
<p>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
164
should return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the plugin is not available for whatever reason.
165
165
The function can be given as argument to one of the registration macros.</p>
166
166
<p>The main purpose of this callback is to allow multithreaded plugins to call
167
<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>.</p>
167
<a href="https://developer.gnome.org/glib/unstable/glib-Deprecated-Thread-APIs.html#g-thread-init"><code class="function">g_thread_init()</code></a>.</p>
168
168
<div class="refsect3">
169
169
<a name="id-1.3.4.7.4.6"></a><h4>Parameters</h4>
170
170
<div class="informaltable"><table width="100%" border="0">
190
190
<div class="refsect3">
191
191
<a name="id-1.3.4.7.4.7"></a><h4>Returns</h4>
192
<p> <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.</p>
192
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
195
195
<p class="since">Since 4.6</p>
227
227
<p>Register a panel plugin using a construct function. The <em class="parameter"><code>check_func</code></em>
229
229
will be called before the plugin is created. If this function returns
230
<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,
230
<a href="https://developer.gnome.org/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,
231
231
you are responsible for showing a dialog why the plugin is not added
232
232
to the panel.</p>
233
233
<div class="refsect3">