~noskcaj/ubuntu/vivid/xfce4-panel/4.11.2

« back to all changes in this revision

Viewing changes to docs/references/html/libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.html

  • Committer: Jackson Doak
  • Date: 2015-01-04 19:22:07 UTC
  • mfrom: (1.1.39)
  • Revision ID: noskcaj@ubuntu.com-20150104192207-sgjnl2zb61bomm6f
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.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">
13
13
</head>
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-GObject-Oriented-Panel-Plugin-Registers-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-GObject-Oriented-Panel-Plugin-Registers-Macros.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19
19
                  <a href="#libxfce4panel-GObject-Oriented-Panel-Plugin-Registers-Macros.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20
20
</td>
21
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
161
161
<div class="refsect2">
162
162
<a name="XFCE-PANEL-DEFINE-TYPE:CAPS"></a><h3>XFCE_PANEL_DEFINE_TYPE()</h3>
163
163
<pre class="programlisting">#define             XFCE_PANEL_DEFINE_TYPE(TypeName, type_name, TYPE_PARENT)</pre>
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
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
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
 
164
<p>A convenient macro of <a href="https://developer.gnome.org/gobject/unstable/GTypeModule.html#G-DEFINE-DYNAMIC-TYPE:CAPS"><span class="type">G_DEFINE_DYNAMIC_TYPE</span></a> for panel plugins. Only
 
165
difference with <a href="https://developer.gnome.org/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
 
166
<a href="https://developer.gnome.org/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
167
167
use use shorted structure names in the code, while the real name of the
168
168
object is a full "Xfce" name.</p>
169
169
<p>The _register_type function should be added to the args in
202
202
<a name="XFCE-PANEL-DEFINE-PREINIT-FUNC:CAPS"></a><h3>XFCE_PANEL_DEFINE_PREINIT_FUNC()</h3>
203
203
<pre class="programlisting">#define             XFCE_PANEL_DEFINE_PREINIT_FUNC(preinit_func)</pre>
204
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
 
205
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
206
206
special libaries.
207
207
Downside of this that the plugin cannot run internal. Even if you
208
208
set X-XFCE-Interal=TRUE in the desktop file, the panel will force
209
209
the plugin to run inside a wrapper (this because the panel called
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>
 
210
<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).</p>
211
211
<p>Note that you can only use this once and it only works in
212
212
combination with the plugins register/define functions added
213
213
in 4.8.</p>
243
243
</div>
244
244
<div class="footer">
245
245
<hr>
246
 
          Generated by GTK-Doc V1.20</div>
 
246
          Generated by GTK-Doc V1.21</div>
247
247
</body>
248
248
</html>
 
 
b'\\ No newline at end of file'