~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to doc/reference/panel-applet/html/panel-applet-Panel-Applet-Factory.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Sebastien Bacher, Jeremy Bicha
  • Date: 2011-05-30 11:04:49 UTC
  • mfrom: (1.13.10 upstream) (2.2.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110530110449-hinl17kxkcefjw6x
Tags: 1:3.0.2-0ubuntu1
[ Sebastien Bacher ]
* New upstream version
* debian/control.in:
  - the new libgweather version is in oneiric, use it
  - drop the python and python-gconf depends, 
    they were added for gnome-panel-add which is still using gconf and buggy
* debian/gnome-panel-data.install:
  - don't install the apport hook, it's only getting gconf datas which 
    doesn't work since gnome-panel uses gsettings
* debian/patches/90_build_fixes.patch:
  - restore build fix from git not applied in the new serie
* debian/patches/01_panel_submenus.patch:
  - don't take that Debian diff, the .menus use the upstream naming in Ubuntu
* debian/patches/06_no_resize_grip.patch:
  - dropped, the issue is fixed in the new version
* debian/patches/50_fix-potfiles.patch:
  - dropped, the issue is fixed in the new version
* debian/watch:
  - track unstable series as well

Drop those delta, since gnome-panel is not the default Ubuntu session now we
can go back to an experience closer to the upstream one: 
* debian/control.in:
  - drop the indicators recommends, unity-2d is the ubuntu fallback session
    so we can get back to use an upstream config for gnome-panel and reduce
    the delta we carry
* debian/patches/04_default_panel_config.patch:
  - don't modify the upstream layout
* debian/patches/05_no_session_delay.patch:
  - no need to tweak the upstream session to optimize it
* debian/patches/16_compiz_workspace_switcher.patch:
  - go back to the upstream switcher behaviour    
* debian/patches/25_dynamic_fusa_detection.patch:
  - not needed since we use the upstream layout, could be ported if someone
    is wanting to do the work though
* debian/patches/30_disable-initial-animation.patch, debian/rules:
  - drop the --disable-initial-animation, that was some login optimization
    but since it's not the default desktop you should go back to the 
    upstream behaviour

[ Jeremy Bicha ]   
* New upstream version
* Merge from Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Recommends gnome-settings-daemon which has the timezone polkit service
* debian/rules:
  - Update translations template.
* debian/gnome-panel-data.install:
  - Install apport hook
  - Install the "About Ubuntu" menu item.
* debian/patches/01_layout.patch:
  - Disabled, Help & About Ubuntu don't fit as well in Gnome Panel 3
* debian/patches/01_panel_submenus.patch.
  - Dropped
* debian/patches/03_dnd_places_link.patch:
  - Disabled, when using Drag'n'Drop from Places menu, install a link launcher
    (.desktop file) instead of copying the entire directory.
* debian/patches/17_about-ubuntu-translation.patch:
  - List ubuntu-about.desktop for translation.
* debian/patches/40_unset_menuproxy.patch:
  - Make sure gnome-panel and the applets don't pick up menu proxies.
* debian/patches/50_fix-potfiles.patch
  - Fix i18n
* debian/patches/85_disable_shutdown_on_ltsp.patch:
  - Suppress the shutdown option in the panel if LTSP_CLIENT is set.
* debian/patches/71_change_bookmark_submenu_limit_value.patch
  - Dropped, picked up by Debian
* debian/patches/18_lockdown_lock_editor.patch:
* debian/patches/90_git_wnck_show_realize.patch:
* debian/patches/90_fix_linking_DSO_link.patch:
* debian/patches/91_gir_annotations.patch
* debian/patches/92_git_calendar_day.patch
* debian/patches/92_git_fix_applets_in_multiscreen.patch:
  - Dropped, applied upstream
* debian/watch:
  - watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>Panel Applet Factory</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
7
<link rel="home" href="index.html" title="Panel Applet Library Reference Manual">
 
8
<link rel="up" href="reference.html" title="Part IV. API Reference">
 
9
<link rel="prev" href="panel-applet-Panel-Applet.html" title="Panel Applet">
 
10
<link rel="next" href="panel-applet-GConf-Utilities.html" title="GConf Utilities">
 
11
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
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">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="panel-applet-Panel-Applet.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="reference.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">Panel Applet Library Reference Manual</th>
 
21
<td><a accesskey="n" href="panel-applet-GConf-Utilities.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#panel-applet-Panel-Applet-Factory.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#panel-applet-Panel-Applet-Factory.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
29
<div class="refentry">
 
30
<a name="panel-applet-Panel-Applet-Factory"></a><div class="titlepage"></div>
 
31
<div class="refnamediv"><table width="100%"><tr>
 
32
<td valign="top">
 
33
<h2><span class="refentrytitle"><a name="panel-applet-Panel-Applet-Factory.top_of_page"></a>Panel Applet Factory</span></h2>
 
34
<p>Panel Applet Factory — the factory that will create applets.</p>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsect1">
 
39
<a name="panel-applet-Panel-Applet-Factory.stability-level"></a><h2>Stability Level</h2>
 
40
Unstable, unless otherwise indicated
 
41
</div>
 
42
<div class="refsynopsisdiv">
 
43
<a name="panel-applet-Panel-Applet-Factory.synopsis"></a><h2>Synopsis</h2>
 
44
<pre class="synopsis">
 
45
#include &lt;panel-applet.h&gt;
 
46
 
 
47
<span class="returnvalue">gboolean</span>            (<a class="link" href="panel-applet-Panel-Applet-Factory.html#PanelAppletFactoryCallback" title="PanelAppletFactoryCallback ()">*PanelAppletFactoryCallback</a>)       (<em class="parameter"><code><a class="link" href="panel-applet-Panel-Applet.html#PanelApplet"><span class="type">PanelApplet</span></a> *applet</code></em>,
 
48
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *iid</code></em>,
 
49
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
 
50
#define             <a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-OUT-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_OUT_PROCESS_FACTORY()">PANEL_APPLET_OUT_PROCESS_FACTORY</a>    (id,
 
51
                                                         type,
 
52
                                                         callback,
 
53
                                                         data)
 
54
#define             <a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-IN-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_IN_PROCESS_FACTORY()">PANEL_APPLET_IN_PROCESS_FACTORY</a>     (id,
 
55
                                                         type,
 
56
                                                         callback,
 
57
                                                         data)
 
58
<span class="returnvalue">int</span>                 <a class="link" href="panel-applet-Panel-Applet-Factory.html#panel-applet-factory-main" title="panel_applet_factory_main ()">panel_applet_factory_main</a>           (<em class="parameter"><code>const <span class="type">gchar</span> *factory_id</code></em>,
 
59
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> applet_type</code></em>,
 
60
                                                         <em class="parameter"><code><a class="link" href="panel-applet-Panel-Applet-Factory.html#PanelAppletFactoryCallback" title="PanelAppletFactoryCallback ()"><span class="type">PanelAppletFactoryCallback</span></a> callback</code></em>,
 
61
                                                         <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);
 
62
</pre>
 
63
</div>
 
64
<div class="refsect1">
 
65
<a name="panel-applet-Panel-Applet-Factory.description"></a><h2>Description</h2>
 
66
<p>
 
67
This API is used to create an <a class="link" href="getting-started.concepts.html#getting-started.concepts.applet-factory" title="Applet Factory">applet factory</a>. You
 
68
need to call one and only one of these functions to get applets working in
 
69
your binary.
 
70
</p>
 
71
</div>
 
72
<div class="refsect1">
 
73
<a name="panel-applet-Panel-Applet-Factory.details"></a><h2>Details</h2>
 
74
<div class="refsect2">
 
75
<a name="PanelAppletFactoryCallback"></a><h3>PanelAppletFactoryCallback ()</h3>
 
76
<pre class="programlisting"><span class="returnvalue">gboolean</span>            (*PanelAppletFactoryCallback)       (<em class="parameter"><code><a class="link" href="panel-applet-Panel-Applet.html#PanelApplet"><span class="type">PanelApplet</span></a> *applet</code></em>,
 
77
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *iid</code></em>,
 
78
                                                         <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
 
79
<p>
 
80
The type used for callbacks after. The callback will usually check that <em class="parameter"><code>iid</code></em>
 
81
is a valid applet type identifier for the applet factory, and will then fill
 
82
<em class="parameter"><code>applet</code></em> with widgets, connect to signals, etc.
 
83
</p>
 
84
<div class="variablelist"><table border="0">
 
85
<col align="left" valign="top">
 
86
<tbody>
 
87
<tr>
 
88
<td><p><span class="term"><em class="parameter"><code>applet</code></em> :</span></p></td>
 
89
<td>a newly-created <a class="link" href="panel-applet-Panel-Applet.html#PanelApplet"><span class="type">PanelApplet</span></a>.</td>
 
90
</tr>
 
91
<tr>
 
92
<td><p><span class="term"><em class="parameter"><code>iid</code></em> :</span></p></td>
 
93
<td>identifier of the requested applet type.</td>
 
94
</tr>
 
95
<tr>
 
96
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
 
97
<td>user data.</td>
 
98
</tr>
 
99
<tr>
 
100
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
101
<td>
 
102
<code class="literal">TRUE</code> if <em class="parameter"><code>iid</code></em> is a valid applet type identifier for the applet
 
103
factory and if the creation of <em class="parameter"><code>applet</code></em> was successfully completed, <code class="literal">FALSE</code>
 
104
otherwise.</td>
 
105
</tr>
 
106
</tbody>
 
107
</table></div>
 
108
</div>
 
109
<hr>
 
110
<div class="refsect2">
 
111
<a name="PANEL-APPLET-OUT-PROCESS-FACTORY:CAPS"></a><h3>PANEL_APPLET_OUT_PROCESS_FACTORY()</h3>
 
112
<pre class="programlisting">#define             PANEL_APPLET_OUT_PROCESS_FACTORY(id, type, callback, data)</pre>
 
113
<p>
 
114
Convenience macro providing a <code class="function">main()</code> function for an out-of-process applet.
 
115
Internally, it will call <a class="link" href="panel-applet-Panel-Applet-Factory.html#panel-applet-factory-main" title="panel_applet_factory_main ()"><code class="function">panel_applet_factory_main()</code></a> to create the
 
116
<em class="parameter"><code>factory_id</code></em> applet factory.
 
117
</p>
 
118
<p>
 
119
Applet instances created by the applet factory will use <em class="parameter"><code>applet_type</code></em> as
 
120
GType. Unless you subclass <a class="link" href="panel-applet-Panel-Applet.html#PanelApplet"><span class="type">PanelApplet</span></a>, you should use <code class="literal">PANEL_TYPE_APPLET</code>
 
121
as <em class="parameter"><code>applet_type</code></em>.
 
122
</p>
 
123
<p>
 
124
On creation of the applet instances, <em class="parameter"><code>callback</code></em> is called to setup the
 
125
applet. If <em class="parameter"><code>callback</code></em> returns <code class="literal">FALSE</code>, the creation of the applet instance is
 
126
cancelled.
 
127
</p>
 
128
<p>
 
129
It can only be used once, and is incompatible with the use of
 
130
<a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-IN-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_IN_PROCESS_FACTORY()"><code class="literal">PANEL_APPLET_IN_PROCESS_FACTORY</code></a> and <a class="link" href="panel-applet-Panel-Applet-Factory.html#panel-applet-factory-main" title="panel_applet_factory_main ()"><code class="function">panel_applet_factory_main()</code></a>.
 
131
</p>
 
132
<div class="variablelist"><table border="0">
 
133
<col align="left" valign="top">
 
134
<tbody>
 
135
<tr>
 
136
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
 
137
<td>identifier of an applet factory.</td>
 
138
</tr>
 
139
<tr>
 
140
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
 
141
<td>GType of the applet this factory creates.</td>
 
142
</tr>
 
143
<tr>
 
144
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
145
<td>callback to be called when a new applet is created. <span class="annotation">[<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span>
 
146
</td>
 
147
</tr>
 
148
<tr>
 
149
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
 
150
<td>callback data. <span class="annotation">[<a href="http://foldoc.org/closure"><span class="acronym">closure</span></a>]</span>
 
151
</td>
 
152
</tr>
 
153
</tbody>
 
154
</table></div>
 
155
</div>
 
156
<hr>
 
157
<div class="refsect2">
 
158
<a name="PANEL-APPLET-IN-PROCESS-FACTORY:CAPS"></a><h3>PANEL_APPLET_IN_PROCESS_FACTORY()</h3>
 
159
<pre class="programlisting">#define             PANEL_APPLET_IN_PROCESS_FACTORY(id, type, callback, data)</pre>
 
160
<p>
 
161
Convenience macro providing the symbol needed to automatically register the
 
162
<em class="parameter"><code>factory_id</code></em> applet factory for an in-process applet.
 
163
</p>
 
164
<p>
 
165
Applet instances created by the applet factory will use <em class="parameter"><code>applet_type</code></em> as
 
166
GType. Unless you subclass <a class="link" href="panel-applet-Panel-Applet.html#PanelApplet"><span class="type">PanelApplet</span></a>, you should use <code class="literal">PANEL_TYPE_APPLET</code>
 
167
as <em class="parameter"><code>applet_type</code></em>.
 
168
</p>
 
169
<p>
 
170
On creation of the applet instances, <em class="parameter"><code>callback</code></em> is called to setup the
 
171
applet. If <em class="parameter"><code>callback</code></em> returns <code class="literal">FALSE</code>, the creation of the applet instance is
 
172
cancelled.
 
173
</p>
 
174
<p>
 
175
It can only be used once, and is incompatible with the use of
 
176
<a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-OUT-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_OUT_PROCESS_FACTORY()"><code class="literal">PANEL_APPLET_OUT_PROCESS_FACTORY</code></a> and <a class="link" href="panel-applet-Panel-Applet-Factory.html#panel-applet-factory-main" title="panel_applet_factory_main ()"><code class="function">panel_applet_factory_main()</code></a>.
 
177
</p>
 
178
<div class="variablelist"><table border="0">
 
179
<col align="left" valign="top">
 
180
<tbody>
 
181
<tr>
 
182
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
 
183
<td>identifier of an applet factory.</td>
 
184
</tr>
 
185
<tr>
 
186
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
 
187
<td>GType of the applet this factory creates.</td>
 
188
</tr>
 
189
<tr>
 
190
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
191
<td>callback to be called when a new applet is created. <span class="annotation">[<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span>
 
192
</td>
 
193
</tr>
 
194
<tr>
 
195
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
 
196
<td>callback data. <span class="annotation">[<a href="http://foldoc.org/closure"><span class="acronym">closure</span></a>]</span>
 
197
</td>
 
198
</tr>
 
199
</tbody>
 
200
</table></div>
 
201
</div>
 
202
<hr>
 
203
<div class="refsect2">
 
204
<a name="panel-applet-factory-main"></a><h3>panel_applet_factory_main ()</h3>
 
205
<pre class="programlisting"><span class="returnvalue">int</span>                 panel_applet_factory_main           (<em class="parameter"><code>const <span class="type">gchar</span> *factory_id</code></em>,
 
206
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> applet_type</code></em>,
 
207
                                                         <em class="parameter"><code><a class="link" href="panel-applet-Panel-Applet-Factory.html#PanelAppletFactoryCallback" title="PanelAppletFactoryCallback ()"><span class="type">PanelAppletFactoryCallback</span></a> callback</code></em>,
 
208
                                                         <em class="parameter"><code><span class="type">gpointer</span> data</code></em>);</pre>
 
209
<p>
 
210
Creates the applet factory for <em class="parameter"><code>factory_id</code></em>, so that the factory can create
 
211
instances of the applet types it is associated with.
 
212
</p>
 
213
<p>
 
214
Applet instances created by the applet factory will use <em class="parameter"><code>applet_type</code></em> as
 
215
GType. Unless you subclass <a class="link" href="panel-applet-Panel-Applet.html#PanelApplet"><span class="type">PanelApplet</span></a>, you should use <code class="literal">PANEL_TYPE_APPLET</code>
 
216
as <em class="parameter"><code>applet_type</code></em>.
 
217
</p>
 
218
<p>
 
219
On creation of the applet instances, <em class="parameter"><code>callback</code></em> is called to setup the
 
220
applet. If <em class="parameter"><code>callback</code></em> returns <code class="literal">FALSE</code>, the creation of the applet instance is
 
221
cancelled.
 
222
</p>
 
223
<p>
 
224
If using C, it is recommended to use <a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-OUT-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_OUT_PROCESS_FACTORY()"><span class="type">PANEL_APPLET_OUT_PROCESS_FACTORY</span></a>
 
225
instead as it will create a <code class="function">main()</code> function for you.
 
226
</p>
 
227
<p>
 
228
It can only be used once, and is incompatible with the use of
 
229
<a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-IN-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_IN_PROCESS_FACTORY()"><code class="literal">PANEL_APPLET_IN_PROCESS_FACTORY</code></a> and <a class="link" href="panel-applet-Panel-Applet-Factory.html#PANEL-APPLET-OUT-PROCESS-FACTORY:CAPS" title="PANEL_APPLET_OUT_PROCESS_FACTORY()"><code class="literal">PANEL_APPLET_OUT_PROCESS_FACTORY</code></a>.
 
230
</p>
 
231
<div class="variablelist"><table border="0">
 
232
<col align="left" valign="top">
 
233
<tbody>
 
234
<tr>
 
235
<td><p><span class="term"><em class="parameter"><code>factory_id</code></em> :</span></p></td>
 
236
<td>identifier of an applet factory.</td>
 
237
</tr>
 
238
<tr>
 
239
<td><p><span class="term"><em class="parameter"><code>applet_type</code></em> :</span></p></td>
 
240
<td>GType of the applet this factory creates.</td>
 
241
</tr>
 
242
<tr>
 
243
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
244
<td>callback to be called when a new applet is created. <span class="annotation">[<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span>
 
245
</td>
 
246
</tr>
 
247
<tr>
 
248
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
 
249
<td>callback data. <span class="annotation">[<a href="http://foldoc.org/closure"><span class="acronym">closure</span></a>]</span>
 
250
</td>
 
251
</tr>
 
252
<tr>
 
253
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
254
<td>0 on success, 1 if there is an error.</td>
 
255
</tr>
 
256
</tbody>
 
257
</table></div>
 
258
</div>
 
259
</div>
 
260
</div>
 
261
<div class="footer">
 
262
<hr>
 
263
          Generated by GTK-Doc V1.17.1</div>
 
264
</body>
 
265
</html>
 
 
b'\\ No newline at end of file'