4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GObject Oriented Panel Plugin Registers Macros</title>
5
<title>Libxfce4panel Reference Manual: GObject Oriented Panel Plugin Registers Macros</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="Libxfce4panel Reference Manual">
8
8
<link rel="up" href="libxfce4panel-plugins.html" title="Part II. Panel Plugins">
9
9
<link rel="prev" href="libxfce4panel-Panel-Plugin-Register-Macros-(4.6-Style).html" title="Panel Plugin Register Macros (4.6 Style)">
10
10
<link rel="next" href="libxfce4panel-widgets.html" title="Part III. Additional Widgets">
11
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.20 (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="2">
17
<td><a accesskey="p" href="libxfce4panel-Panel-Plugin-Register-Macros-(4.6-Style).html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="libxfce4panel-plugins.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">Libxfce4panel Reference Manual</th>
21
<td><a accesskey="n" href="libxfce4panel-widgets.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.synopsis" class="shortcut">Top</a>
26
<a href="#libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.description" class="shortcut">Description</a>
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
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-GObject-Oriented-Panel-Plugin-Registers-Macros.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19
<a href="#libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22
<td><a accesskey="u" href="libxfce4panel-plugins.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23
<td><a accesskey="p" href="libxfce4panel-Panel-Plugin-Register-Macros-(4.6-Style).html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24
<td><a accesskey="n" href="libxfce4panel-widgets.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
29
26
<div class="refentry">
30
27
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros"></a><div class="titlepage"></div>
31
28
<div class="refnamediv"><table width="100%"><tr>
33
30
<h2><span class="refentrytitle"><a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.top_of_page"></a>GObject Oriented Panel Plugin Registers Macros</span></h2>
34
31
<p>GObject Oriented Panel Plugin Registers Macros — Macros to register panel plugins, written as GObjects.</p>
36
<td valign="top" align="right"></td>
33
<td class="gallery_image" valign="top" align="right"></td>
37
34
</tr></table></div>
38
<div class="refsynopsisdiv">
39
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <libxfce4panel/libxfce4panel.h>
43
typedef <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XfcePanelTypeModule" title="XfcePanelTypeModule">XfcePanelTypeModule</a>;
44
#define <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN()">XFCE_PANEL_DEFINE_PLUGIN</a> (TypeName,
47
#define <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN-RESIDENT:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN_RESIDENT()">XFCE_PANEL_DEFINE_PLUGIN_RESIDENT</a> (TypeName,
50
#define <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-TYPE:CAPS" title="XFCE_PANEL_DEFINE_TYPE()">XFCE_PANEL_DEFINE_TYPE</a> (TypeName,
53
#define <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PREINIT-FUNC:CAPS" title="XFCE_PANEL_DEFINE_PREINIT_FUNC()">XFCE_PANEL_DEFINE_PREINIT_FUNC</a> (preinit_func)
35
<div class="refsect1">
36
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.functions"></a><h2>Functions</h2>
37
<div class="informaltable"><table width="100%" border="0">
39
<col width="150px" class="functions_return">
40
<col class="functions_name">
44
<td class="define_keyword">#define</td>
45
<td class="function_name">
46
<a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN()">XFCE_PANEL_DEFINE_PLUGIN</a><span class="c_punctuation">()</span>
50
<td class="define_keyword">#define</td>
51
<td class="function_name">
52
<a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN-RESIDENT:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN_RESIDENT()">XFCE_PANEL_DEFINE_PLUGIN_RESIDENT</a><span class="c_punctuation">()</span>
56
<td class="define_keyword">#define</td>
57
<td class="function_name">
58
<a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-TYPE:CAPS" title="XFCE_PANEL_DEFINE_TYPE()">XFCE_PANEL_DEFINE_TYPE</a><span class="c_punctuation">()</span>
62
<td class="define_keyword">#define</td>
63
<td class="function_name">
64
<a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PREINIT-FUNC:CAPS" title="XFCE_PANEL_DEFINE_PREINIT_FUNC()">XFCE_PANEL_DEFINE_PREINIT_FUNC</a><span class="c_punctuation">()</span>
70
<div class="refsect1">
71
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.other"></a><h2>Types and Values</h2>
72
<div class="informaltable"><table width="100%" border="0">
74
<col width="150px" class="name">
75
<col class="description">
78
<td class="typedef_keyword">typedef</td>
79
<td class="function_name"><a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XfcePanelTypeModule" title="XfcePanelTypeModule">XfcePanelTypeModule</a></td>
83
<div class="refsect1">
84
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.object-hierarchy"></a><h2>Object Hierarchy</h2>
88
<div class="refsect1">
89
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.includes"></a><h2>Includes</h2>
90
<pre class="synopsis">#include <libxfce4panel/libxfce4panel.h>
56
93
<div class="refsect1">
57
94
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.description"></a><h2>Description</h2>
59
Macros to register panel plugin types and custom types inside panel plugins.
95
<p>Macros to register panel plugin types and custom types inside panel plugins.</p>
62
97
<div class="refsect1">
63
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.details"></a><h2>Details</h2>
64
<div class="refsect2">
65
<a name="XfcePanelTypeModule"></a><h3>XfcePanelTypeModule</h3>
66
<pre class="programlisting">typedef GTypeModule XfcePanelTypeModule;
69
Typedef for GTypeModule for possible future expansion.
71
<p class="since">Since 4.8</p>
98
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.functions_details"></a><h2>Functions</h2>
74
99
<div class="refsect2">
75
100
<a name="XFCE-PANEL-DEFINE-PLUGIN:CAPS"></a><h3>XFCE_PANEL_DEFINE_PLUGIN()</h3>
76
101
<pre class="programlisting">#define XFCE_PANEL_DEFINE_PLUGIN(TypeName, type_name, args...)</pre>
78
Define a new (resident) GObject panel plugin, the parent type of the object
79
should be XFCE_TYPE_PANEL_PLUGIN.
81
<div class="variablelist"><table border="0" class="variablelist">
102
<p>Define a new (resident) GObject panel plugin, the parent type of the object
103
should be XFCE_TYPE_PANEL_PLUGIN.</p>
104
<div class="refsect3">
105
<a name="id-1.3.6.8.2.5"></a><h4>Parameters</h4>
106
<div class="informaltable"><table width="100%" border="0">
83
<col align="left" valign="top">
108
<col width="150px" class="parameters_name">
109
<col class="parameters_description">
110
<col width="200px" class="parameters_annotations">
88
<td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
89
<td>The name of the new type, in Camel case.</td>
114
<td class="parameter_name"><p>TypeName</p></td>
115
<td class="parameter_description"><p>The name of the new type, in Camel case.</p></td>
116
<td class="parameter_annotations"> </td>
92
<td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
93
<td>The name of the new type, in lowercase, with words separated by '_'.</td>
119
<td class="parameter_name"><p>type_name</p></td>
120
<td class="parameter_description"><p>The name of the new type, in lowercase, with words separated by '_'.</p></td>
121
<td class="parameter_annotations"> </td>
97
126
<p class="since">Since 4.8</p>
100
129
<div class="refsect2">
101
130
<a name="XFCE-PANEL-DEFINE-PLUGIN-RESIDENT:CAPS"></a><h3>XFCE_PANEL_DEFINE_PLUGIN_RESIDENT()</h3>
102
131
<pre class="programlisting">#define XFCE_PANEL_DEFINE_PLUGIN_RESIDENT(TypeName, type_name, args...)</pre>
104
Same as <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN()"><span class="type">XFCE_PANEL_DEFINE_PLUGIN</span></a>, but if you use special libraries or objects,
132
<p>Same as <a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN()"><span class="type">XFCE_PANEL_DEFINE_PLUGIN</span></a>, but if you use special libraries or objects,
105
133
it is possible the plugin will give problems when unloading the library,
106
134
a resident plugin will never be unloaded after the first load, avoiding
109
<div class="variablelist"><table border="0" class="variablelist">
136
<div class="refsect3">
137
<a name="id-1.3.6.8.3.5"></a><h4>Parameters</h4>
138
<div class="informaltable"><table width="100%" border="0">
111
<col align="left" valign="top">
140
<col width="150px" class="parameters_name">
141
<col class="parameters_description">
142
<col width="200px" class="parameters_annotations">
116
<td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
117
<td>The name of the new type, in Camel case.</td>
146
<td class="parameter_name"><p>TypeName</p></td>
147
<td class="parameter_description"><p>The name of the new type, in Camel case.</p></td>
148
<td class="parameter_annotations"> </td>
120
<td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
121
<td>The name of the new type, in lowercase, with words separated by '_'.</td>
151
<td class="parameter_name"><p>type_name</p></td>
152
<td class="parameter_description"><p>The name of the new type, in lowercase, with words separated by '_'.</p></td>
153
<td class="parameter_annotations"> </td>
125
158
<p class="since">Since 4.8</p>
128
161
<div class="refsect2">
129
162
<a name="XFCE-PANEL-DEFINE-TYPE:CAPS"></a><h3>XFCE_PANEL_DEFINE_TYPE()</h3>
130
163
<pre class="programlisting">#define XFCE_PANEL_DEFINE_TYPE(TypeName, type_name, TYPE_PARENT)</pre>
132
A convenient macro of <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html#G-DEFINE-DYNAMIC-TYPE:CAPS"><span class="type">G_DEFINE_DYNAMIC_TYPE</span></a> for panel plugins. Only
164
<p>A convenient macro of <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html#G-DEFINE-DYNAMIC-TYPE:CAPS"><span class="type">G_DEFINE_DYNAMIC_TYPE</span></a> for panel plugins. Only
133
165
difference with <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html#G-DEFINE-DYNAMIC-TYPE:CAPS"><span class="type">G_DEFINE_DYNAMIC_TYPE</span></a> is that the type name send to
134
166
<a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html#g-type-module-register-type"><code class="function">g_type_module_register_type()</code></a> is prefixed with "Xfce". This allows you
135
167
use use shorted structure names in the code, while the real name of the
136
object is a full "Xfce" name.
139
The _register_type function should be added to the args in
140
<a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN()"><span class="type">XFCE_PANEL_DEFINE_PLUGIN</span></a>.
142
<div class="variablelist"><table border="0" class="variablelist">
168
object is a full "Xfce" name.</p>
169
<p>The _register_type function should be added to the args in
170
<a class="link" href="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html#XFCE-PANEL-DEFINE-PLUGIN:CAPS" title="XFCE_PANEL_DEFINE_PLUGIN()"><span class="type">XFCE_PANEL_DEFINE_PLUGIN</span></a>.</p>
171
<div class="refsect3">
172
<a name="id-1.3.6.8.4.6"></a><h4>Parameters</h4>
173
<div class="informaltable"><table width="100%" border="0">
144
<col align="left" valign="top">
175
<col width="150px" class="parameters_name">
176
<col class="parameters_description">
177
<col width="200px" class="parameters_annotations">
149
<td><p><span class="term"><em class="parameter"><code>TypeName</code></em> :</span></p></td>
150
<td>The name of the new type, in Camel case.</td>
153
<td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
154
<td>The name of the new type, in lowercase, with words separated by '_'.</td>
157
<td><p><span class="term"><em class="parameter"><code>TYPE_PARENT</code></em> :</span></p></td>
158
<td>The GType of the parent type.</td>
181
<td class="parameter_name"><p>TypeName</p></td>
182
<td class="parameter_description"><p>The name of the new type, in Camel case.</p></td>
183
<td class="parameter_annotations"> </td>
186
<td class="parameter_name"><p>type_name</p></td>
187
<td class="parameter_description"><p>The name of the new type, in lowercase, with words separated by '_'.</p></td>
188
<td class="parameter_annotations"> </td>
191
<td class="parameter_name"><p>TYPE_PARENT</p></td>
192
<td class="parameter_description"><p>The GType of the parent type.</p></td>
193
<td class="parameter_annotations"> </td>
162
198
<p class="since">Since 4.8</p>
165
201
<div class="refsect2">
166
202
<a name="XFCE-PANEL-DEFINE-PREINIT-FUNC:CAPS"></a><h3>XFCE_PANEL_DEFINE_PREINIT_FUNC()</h3>
167
203
<pre class="programlisting">#define XFCE_PANEL_DEFINE_PREINIT_FUNC(preinit_func)</pre>
169
Registers a pre-init function in the plugin module. This function
170
is called before <a href="http://developer.gnome.org/gtk2/gtk3-General.html#gtk-init"><code class="function">gtk_init()</code></a> and can be used to initialize
204
<p>Registers a pre-init function in the plugin module. This function
205
is called before <a href="http://library.gnome.org/devel/gtk3/gtk2-General.html#gtk-init"><code class="function">gtk_init()</code></a> and can be used to initialize
171
206
special libaries.
172
207
Downside of this that the plugin cannot run internal. Even if you
173
208
set X-XFCE-Interal=TRUE in the desktop file, the panel will force
174
209
the plugin to run inside a wrapper (this because the panel called
175
<a href="http://developer.gnome.org/gtk2/gtk3-General.html#gtk-init"><code class="function">gtk_init()</code></a> long before it starts to load the plugins).
178
Note that you can only use this once and it only works in
210
<a href="http://library.gnome.org/devel/gtk3/gtk2-General.html#gtk-init"><code class="function">gtk_init()</code></a> long before it starts to load the plugins).</p>
211
<p>Note that you can only use this once and it only works in
179
212
combination with the plugins register/define functions added
182
<div class="variablelist"><table border="0" class="variablelist">
214
<div class="refsect3">
215
<a name="id-1.3.6.8.5.6"></a><h4>Parameters</h4>
216
<div class="informaltable"><table width="100%" border="0">
184
<col align="left" valign="top">
218
<col width="150px" class="parameters_name">
219
<col class="parameters_description">
220
<col width="200px" class="parameters_annotations">
188
<td><p><span class="term"><em class="parameter"><code>preinit_func</code></em> :</span></p></td>
189
<td>name of the function that points to an
190
<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginPreInit" title="XfcePanelPluginPreInit ()"><span class="type">XfcePanelPluginPreInit</span></a> function.</td>
223
<td class="parameter_name"><p>preinit_func</p></td>
224
<td class="parameter_description"><p>name of the function that points to an
225
<a class="link" href="libxfce4panel-Panel-Plugin-Register-Macros.html#XfcePanelPluginPreInit" title="XfcePanelPluginPreInit ()"><span class="type">XfcePanelPluginPreInit</span></a> function.</p></td>
226
<td class="parameter_annotations"> </td>
230
<p class="since">Since 4.8</p>
233
<div class="refsect1">
234
<a name="libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.other_details"></a><h2>Types and Values</h2>
235
<div class="refsect2">
236
<a name="XfcePanelTypeModule"></a><h3>XfcePanelTypeModule</h3>
237
<pre class="programlisting">typedef GTypeModule XfcePanelTypeModule;
239
<p>Typedef for GTypeModule for possible future expansion.</p>
193
240
<p class="since">Since 4.8</p>
197
244
<div class="footer">
199
Generated by GTK-Doc V1.19</div>
246
Generated by GTK-Doc V1.20</div>
b'\\ No newline at end of file'