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

« back to all changes in this revision

Viewing changes to doc/reference/panel-applet/xml/panel-applet.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-01-14 22:20:05 UTC
  • mto: (2.1.6 squeeze) (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 171.
  • Revision ID: james.westby@ubuntu.com-20100114222005-rll7tw9fojl3ac6z
Tags: upstream-2.29.5.1
ImportĀ upstreamĀ versionĀ 2.29.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<refentry id="PanelApplet">
2
 
<refmeta>
3
 
<refentrytitle role="top_of_page" id="PanelApplet.top_of_page">PanelApplet</refentrytitle>
4
 
<manvolnum>3</manvolnum>
5
 
<refmiscinfo>PANEL-APPLET Library</refmiscinfo>
6
 
</refmeta>
7
 
<refnamediv>
8
 
<refname>PanelApplet</refname>
9
 
<refpurpose>The PanelApplet object.</refpurpose>
10
 
</refnamediv>
11
 
 
12
 
<refsynopsisdiv id="PanelApplet.synopsis" role="synopsis">
13
 
<title role="synopsis.title">Synopsis</title>
14
 
 
15
 
<synopsis>
16
 
#include &lt;panel-applet.h&gt;
17
 
 
18
 
                    <link linkend="PanelApplet-struct">PanelApplet</link>;
19
 
typedef             <link linkend="PanelAppletOrient">PanelAppletOrient</link>;
20
 
#define             <link linkend="PANEL-APPLET-ORIENT-UP:CAPS">PANEL_APPLET_ORIENT_UP</link>
21
 
#define             <link linkend="PANEL-APPLET-ORIENT-DOWN:CAPS">PANEL_APPLET_ORIENT_DOWN</link>
22
 
#define             <link linkend="PANEL-APPLET-ORIENT-LEFT:CAPS">PANEL_APPLET_ORIENT_LEFT</link>
23
 
#define             <link linkend="PANEL-APPLET-ORIENT-RIGHT:CAPS">PANEL_APPLET_ORIENT_RIGHT</link>
24
 
enum                <link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link>;
25
 
enum                <link linkend="PanelAppletFlags">PanelAppletFlags</link>;
26
 
<link linkend="gboolean">gboolean</link>            (<link linkend="PanelAppletFactoryCallback">*PanelAppletFactoryCallback</link>)       (<link linkend="PanelApplet">PanelApplet</link> *applet,
27
 
                                                         const <link linkend="gchar">gchar</link> *iid,
28
 
                                                         <link linkend="gpointer">gpointer</link> user_data);
29
 
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="panel-applet-new">panel_applet_new</link>                    (void);
30
 
<link linkend="PanelAppletOrient">PanelAppletOrient</link>   <link linkend="panel-applet-get-orient">panel_applet_get_orient</link>             (<link linkend="PanelApplet">PanelApplet</link> *applet);
31
 
<link linkend="guint">guint</link>               <link linkend="panel-applet-get-size">panel_applet_get_size</link>               (<link linkend="PanelApplet">PanelApplet</link> *applet);
32
 
<link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link>  <link linkend="panel-applet-get-background">panel_applet_get_background</link>  (<link linkend="PanelApplet">PanelApplet</link> *applet,
33
 
                                                         <link linkend="GdkColor">GdkColor</link> *color,
34
 
                                                         <link linkend="GdkPixmap">GdkPixmap</link> **pixmap);
35
 
<link linkend="gchar">gchar</link> *             <link linkend="panel-applet-get-preferences-key">panel_applet_get_preferences_key</link>    (<link linkend="PanelApplet">PanelApplet</link> *applet);
36
 
<link linkend="void">void</link>                <link linkend="panel-applet-add-preferences">panel_applet_add_preferences</link>        (<link linkend="PanelApplet">PanelApplet</link> *applet,
37
 
                                                         const <link linkend="gchar">gchar</link> *schema_dir,
38
 
                                                         <link linkend="GError">GError</link> **opt_error);
39
 
<link linkend="PanelAppletFlags">PanelAppletFlags</link>    <link linkend="panel-applet-get-flags">panel_applet_get_flags</link>              (<link linkend="PanelApplet">PanelApplet</link> *applet);
40
 
<link linkend="void">void</link>                <link linkend="panel-applet-set-flags">panel_applet_set_flags</link>              (<link linkend="PanelApplet">PanelApplet</link> *applet,
41
 
                                                         <link linkend="PanelAppletFlags">PanelAppletFlags</link> flags);
42
 
<link linkend="void">void</link>                <link linkend="panel-applet-set-size-hints">panel_applet_set_size_hints</link>         (<link linkend="PanelApplet">PanelApplet</link> *applet,
43
 
                                                         const <link linkend="int">int</link> *size_hints,
44
 
                                                         <link linkend="int">int</link> n_elements,
45
 
                                                         <link linkend="int">int</link> base_size);
46
 
<link linkend="gboolean">gboolean</link>            <link linkend="panel-applet-get-locked-down">panel_applet_get_locked_down</link>        (<link linkend="PanelApplet">PanelApplet</link> *applet);
47
 
<link linkend="void">void</link>                <link linkend="panel-applet-request-focus">panel_applet_request_focus</link>          (<link linkend="PanelApplet">PanelApplet</link> *applet,
48
 
                                                         <link linkend="guint32">guint32</link> timestamp);
49
 
<link linkend="BonoboControl">BonoboControl</link> *     <link linkend="panel-applet-get-control">panel_applet_get_control</link>            (<link linkend="PanelApplet">PanelApplet</link> *applet);
50
 
<link linkend="BonoboUIComponent">BonoboUIComponent</link> * <link linkend="panel-applet-get-popup-component">panel_applet_get_popup_component</link>    (<link linkend="PanelApplet">PanelApplet</link> *applet);
51
 
<link linkend="void">void</link>                <link linkend="panel-applet-setup-menu">panel_applet_setup_menu</link>             (<link linkend="PanelApplet">PanelApplet</link> *applet,
52
 
                                                         const <link linkend="gchar">gchar</link> *xml,
53
 
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
54
 
                                                         <link linkend="gpointer">gpointer</link> user_data);
55
 
<link linkend="void">void</link>                <link linkend="panel-applet-setup-menu-from-file">panel_applet_setup_menu_from_file</link>   (<link linkend="PanelApplet">PanelApplet</link> *applet,
56
 
                                                         const <link linkend="gchar">gchar</link> *opt_datadir,
57
 
                                                         const <link linkend="gchar">gchar</link> *file,
58
 
                                                         const <link linkend="gchar">gchar</link> *opt_app_name,
59
 
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
60
 
                                                         <link linkend="gpointer">gpointer</link> user_data);
61
 
<link linkend="int">int</link>                 <link linkend="panel-applet-factory-main">panel_applet_factory_main</link>           (const <link linkend="gchar">gchar</link> *iid,
62
 
                                                         <link linkend="GType">GType</link> applet_type,
63
 
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
64
 
                                                         <link linkend="gpointer">gpointer</link> data);
65
 
<link linkend="int">int</link>                 <link linkend="panel-applet-factory-main-closure">panel_applet_factory_main_closure</link>   (const <link linkend="gchar">gchar</link> *iid,
66
 
                                                         <link linkend="GType">GType</link> applet_type,
67
 
                                                         <link linkend="GClosure">GClosure</link> *closure);
68
 
#define             <link linkend="PANEL-APPLET-BONOBO-FACTORY:CAPS">PANEL_APPLET_BONOBO_FACTORY</link>         (iid, type, name, version, callback, data)
69
 
<link linkend="Bonobo-Unknown">Bonobo_Unknown</link>      <link linkend="panel-applet-shlib-factory">panel_applet_shlib_factory</link>          (const <link linkend="char">char</link> *iid,
70
 
                                                         <link linkend="GType">GType</link> applet_type,
71
 
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
72
 
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
73
 
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
74
 
                                                         <link linkend="gpointer">gpointer</link> user_data,
75
 
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);
76
 
<link linkend="Bonobo-Unknown">Bonobo_Unknown</link>      <link linkend="panel-applet-shlib-factory-closure">panel_applet_shlib_factory_closure</link>  (const <link linkend="char">char</link> *iid,
77
 
                                                         <link linkend="GType">GType</link> applet_type,
78
 
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
79
 
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
80
 
                                                         <link linkend="GClosure">GClosure</link> *closure,
81
 
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);
82
 
#define             <link linkend="PANEL-APPLET-BONOBO-SHLIB-FACTORY:CAPS">PANEL_APPLET_BONOBO_SHLIB_FACTORY</link>   (iid, type, descr, callback, data)
83
 
</synopsis>
84
 
</refsynopsisdiv>
85
 
<refsect1 id="PanelApplet.object-hierarchy" role="object_hierarchy">
86
 
<title role="object_hierarchy.title">Object Hierarchy</title>
87
 
<synopsis>
88
 
  <link linkend="GObject">GObject</link>
89
 
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
90
 
         +----<link linkend="GtkObject">GtkObject</link>
91
 
               +----<link linkend="GtkWidget">GtkWidget</link>
92
 
                     +----<link linkend="GtkContainer">GtkContainer</link>
93
 
                           +----<link linkend="GtkBin">GtkBin</link>
94
 
                                 +----<link linkend="GtkEventBox">GtkEventBox</link>
95
 
                                       +----PanelApplet
96
 
</synopsis>
97
 
</refsect1>
98
 
<refsect1 id="PanelApplet.implemented-interfaces" role="impl_interfaces">
99
 
<title role="impl_interfaces.title">Implemented Interfaces</title>
100
 
<para>
101
 
PanelApplet implements
102
 
 <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
103
 
</refsect1>
104
 
<refsect1 id="PanelApplet.signals" role="signal_proto">
105
 
<title role="signal_proto.title">Signals</title>
106
 
<synopsis>
107
 
  &quot;<link linkend="PanelApplet-change-background">change-background</link>&quot;                              : Run Last
108
 
  &quot;<link linkend="PanelApplet-change-orient">change-orient</link>&quot;                                  : Run Last
109
 
  &quot;<link linkend="PanelApplet-change-size">change-size</link>&quot;                                    : Run Last
110
 
  &quot;<link linkend="PanelApplet-move-focus-out-of-applet">move-focus-out-of-applet</link>&quot;                       : Run Last / Action
111
 
</synopsis>
112
 
</refsect1>
113
 
 
114
 
<refsect1 id="PanelApplet.description" role="desc">
115
 
<title role="desc.title">Description</title>
116
 
<para>
117
 
The <link linkend="PanelApplet"><type>PanelApplet</type></link> object is an object which encapsulates an applet. It
118
 
is a <link linkend="GtkContainer"><type>GtkContainer</type></link> which may contain a single widget. This widget, in
119
 
turn, should contain all widgets exposed by the applet.
120
 
</para>
121
 
<para>
122
 
A <link linkend="PanelApplet"><type>PanelApplet</type></link> is associated with a <link linkend="BonoboControl."><type>BonoboControl.</type></link> The control makes
123
 
the cross process UI emmbedding required by applets possible.
124
 
</para>
125
 
</refsect1>
126
 
<refsect1 id="PanelApplet.details" role="details">
127
 
<title role="details.title">Details</title>
128
 
<refsect2 id="PanelApplet-struct" role="struct">
129
 
<title>PanelApplet</title>
130
 
<indexterm zone="PanelApplet-struct"><primary>PanelApplet</primary></indexterm>
131
 
<programlisting>typedef struct _PanelApplet PanelApplet;</programlisting>
132
 
<para>
133
 
The <link linkend="PanelApplet"><type>PanelApplet</type></link> struct contains private data only.
134
 
</para></refsect2>
135
 
<refsect2 id="PanelAppletOrient" role="typedef">
136
 
<title>PanelAppletOrient</title>
137
 
<indexterm zone="PanelAppletOrient"><primary>PanelAppletOrient</primary></indexterm>
138
 
<programlisting>typedef GNOME_Vertigo_PanelOrient PanelAppletOrient;
139
 
</programlisting>
140
 
<para>
141
 
The <link linkend="PanelAppletOrient"><type>PanelAppletOrient</type></link> type specifies the orientation of the applet. The
142
 
values may seem backward (e.g. <link linkend="PANEL-APPLET-ORIENT-LEFT:CAPS"><literal>PANEL_APPLET_ORIENT_LEFT</literal></link> means the panel
143
 
is on the right hand side), but this is because the value is representative
144
 
of the applet's <emphasis>orientation</emphasis>, not the panel's position.
145
 
</para></refsect2>
146
 
<refsect2 id="PANEL-APPLET-ORIENT-UP:CAPS" role="macro">
147
 
<title>PANEL_APPLET_ORIENT_UP</title>
148
 
<indexterm zone="PANEL-APPLET-ORIENT-UP:CAPS"><primary>PANEL_APPLET_ORIENT_UP</primary></indexterm>
149
 
<programlisting>#define PANEL_APPLET_ORIENT_UP    GNOME_Vertigo_PANEL_ORIENT_UP
150
 
</programlisting>
151
 
<para>
152
 
The applet is orientated up (i.e. the panel is at the bottom of the screen).
153
 
</para></refsect2>
154
 
<refsect2 id="PANEL-APPLET-ORIENT-DOWN:CAPS" role="macro">
155
 
<title>PANEL_APPLET_ORIENT_DOWN</title>
156
 
<indexterm zone="PANEL-APPLET-ORIENT-DOWN:CAPS"><primary>PANEL_APPLET_ORIENT_DOWN</primary></indexterm>
157
 
<programlisting>#define PANEL_APPLET_ORIENT_DOWN  GNOME_Vertigo_PANEL_ORIENT_DOWN
158
 
</programlisting>
159
 
<para>
160
 
The applet is orientated down (i.e. the panel is at the top of the screen).
161
 
</para></refsect2>
162
 
<refsect2 id="PANEL-APPLET-ORIENT-LEFT:CAPS" role="macro">
163
 
<title>PANEL_APPLET_ORIENT_LEFT</title>
164
 
<indexterm zone="PANEL-APPLET-ORIENT-LEFT:CAPS"><primary>PANEL_APPLET_ORIENT_LEFT</primary></indexterm>
165
 
<programlisting>#define PANEL_APPLET_ORIENT_LEFT  GNOME_Vertigo_PANEL_ORIENT_LEFT
166
 
</programlisting>
167
 
<para>
168
 
The applet is orientated left (i.e. the panel is at the right hand side of the screen).
169
 
</para></refsect2>
170
 
<refsect2 id="PANEL-APPLET-ORIENT-RIGHT:CAPS" role="macro">
171
 
<title>PANEL_APPLET_ORIENT_RIGHT</title>
172
 
<indexterm zone="PANEL-APPLET-ORIENT-RIGHT:CAPS"><primary>PANEL_APPLET_ORIENT_RIGHT</primary></indexterm>
173
 
<programlisting>#define PANEL_APPLET_ORIENT_RIGHT GNOME_Vertigo_PANEL_ORIENT_RIGHT
174
 
</programlisting>
175
 
<para>
176
 
The applet is orientated right (i.e. the panel is at the left hand side of the screen).
177
 
</para></refsect2>
178
 
<refsect2 id="PanelAppletBackgroundType" role="enum">
179
 
<title>enum PanelAppletBackgroundType</title>
180
 
<indexterm zone="PanelAppletBackgroundType"><primary>PanelAppletBackgroundType</primary></indexterm>
181
 
<programlisting>typedef enum {
182
 
        PANEL_NO_BACKGROUND,
183
 
        PANEL_COLOR_BACKGROUND,
184
 
        PANEL_PIXMAP_BACKGROUND
185
 
} PanelAppletBackgroundType;
186
 
</programlisting>
187
 
<para>
188
 
The <link linkend="PanelAppletBackgroundType"><type>PanelAppletBackgroundType</type></link> enumerated type specifies the type of
189
 
background of a panel.
190
 
</para><variablelist role="enum">
191
 
<varlistentry id="PANEL-NO-BACKGROUND:CAPS" role="constant">
192
 
<term><literal>PANEL_NO_BACKGROUND</literal></term>
193
 
<listitem><simpara>The panel has no background, the default is used.
194
 
</simpara></listitem>
195
 
</varlistentry>
196
 
<varlistentry id="PANEL-COLOR-BACKGROUND:CAPS" role="constant">
197
 
<term><literal>PANEL_COLOR_BACKGROUND</literal></term>
198
 
<listitem><simpara>The panel has a color, i.e rgb value,
199
 
background.
200
 
</simpara></listitem>
201
 
</varlistentry>
202
 
<varlistentry id="PANEL-PIXMAP-BACKGROUND:CAPS" role="constant">
203
 
<term><literal>PANEL_PIXMAP_BACKGROUND</literal></term>
204
 
<listitem><simpara> The panel has either an image background
205
 
or is translucent.
206
 
</simpara></listitem>
207
 
</varlistentry>
208
 
</variablelist></refsect2>
209
 
<refsect2 id="PanelAppletFlags" role="enum">
210
 
<title>enum PanelAppletFlags</title>
211
 
<indexterm zone="PanelAppletFlags"><primary>PanelAppletFlags</primary></indexterm>
212
 
<programlisting>typedef enum {
213
 
        PANEL_APPLET_FLAGS_NONE   = 0,
214
 
        PANEL_APPLET_EXPAND_MAJOR = 1 &lt;&lt; 0,
215
 
        PANEL_APPLET_EXPAND_MINOR = 1 &lt;&lt; 1,
216
 
        PANEL_APPLET_HAS_HANDLE   = 1 &lt;&lt; 2
217
 
} PanelAppletFlags;
218
 
</programlisting>
219
 
<para>
220
 
The <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> associated with the applet are boolean flags which
221
 
the panel may read in order to figure out how to handle the applet.
222
 
</para><variablelist role="enum">
223
 
<varlistentry id="PANEL-APPLET-FLAGS-NONE:CAPS" role="constant">
224
 
<term><literal>PANEL_APPLET_FLAGS_NONE</literal></term>
225
 
<listitem><simpara>No flags are to be associated with the applet.
226
 
</simpara></listitem>
227
 
</varlistentry>
228
 
<varlistentry id="PANEL-APPLET-EXPAND-MAJOR:CAPS" role="constant">
229
 
<term><literal>PANEL_APPLET_EXPAND_MAJOR</literal></term>
230
 
<listitem><simpara>The applet should expand horizontally on an
231
 
horizontal panel and vertically on a vertical panel - e.g. the behaviour
232
 
of the Window List applet.
233
 
</simpara></listitem>
234
 
</varlistentry>
235
 
<varlistentry id="PANEL-APPLET-EXPAND-MINOR:CAPS" role="constant">
236
 
<term><literal>PANEL_APPLET_EXPAND_MINOR</literal></term>
237
 
<listitem><simpara>The applet should expand vertically on an
238
 
horizontal panel and horizontally on a vertical panel. Most applets should
239
 
set this flag in order to utilise the full panel width and allow the applet
240
 
to be Fitt's Law compliant.
241
 
</simpara></listitem>
242
 
</varlistentry>
243
 
<varlistentry id="PANEL-APPLET-HAS-HANDLE:CAPS" role="constant">
244
 
<term><literal>PANEL_APPLET_HAS_HANDLE</literal></term>
245
 
<listitem><simpara>The panel should draw a grab handle around the
246
 
applet - e.g. the Window List and Notification Area applets both set this
247
 
flag.
248
 
</simpara></listitem>
249
 
</varlistentry>
250
 
</variablelist></refsect2>
251
 
<refsect2 id="PanelAppletFactoryCallback" role="function">
252
 
<title>PanelAppletFactoryCallback ()</title>
253
 
<indexterm zone="PanelAppletFactoryCallback"><primary>PanelAppletFactoryCallback</primary></indexterm>
254
 
<programlisting><link linkend="gboolean">gboolean</link>            (*PanelAppletFactoryCallback)       (<link linkend="PanelApplet">PanelApplet</link> *applet,
255
 
                                                         const <link linkend="gchar">gchar</link> *iid,
256
 
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
257
 
<para>
258
 
This callback is invoked when the applet is loaded onto the panel. Typically
259
 
the callback will check that <parameter>iid</parameter> matches and fill the <parameter>applet</parameter> with the
260
 
widgets which make up the applet.
261
 
</para>
262
 
<para>
263
 
Prior to the callback being invoked the <link linkend="PanelApplet"><type>PanelApplet</type></link> (or an instance of the
264
 
sub-class specified by the <link linkend="GType"><type>GType</type></link> passed to the factory macros) is instantiated
265
 
and initialized.
266
 
</para><variablelist role="params">
267
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
268
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
269
 
</simpara></listitem></varlistentry>
270
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
271
 
<listitem><simpara>The Bonobo IID of the applet requested.
272
 
</simpara></listitem></varlistentry>
273
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
274
 
<listitem><simpara>The data passed to the factory macros.
275
 
</simpara></listitem></varlistentry>
276
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> on success, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> on failure.
277
 
</simpara></listitem></varlistentry>
278
 
</variablelist></refsect2>
279
 
<refsect2 id="panel-applet-new" role="function">
280
 
<title>panel_applet_new ()</title>
281
 
<indexterm zone="panel-applet-new"><primary>panel_applet_new</primary></indexterm>
282
 
<programlisting><link linkend="GtkWidget">GtkWidget</link> *         panel_applet_new                    (void);</programlisting>
283
 
<para>
284
 
Creates a new <link linkend="PanelApplet."><type>PanelApplet.</type></link> This function is typically not
285
 
useful as the applet is created before the <link linkend="PanelAppletFactoryCallback"><type>PanelAppletFactoryCallback</type></link>
286
 
is invoked.
287
 
</para><variablelist role="params">
288
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
289
 
</simpara></listitem></varlistentry>
290
 
</variablelist></refsect2>
291
 
<refsect2 id="panel-applet-get-orient" role="function">
292
 
<title>panel_applet_get_orient ()</title>
293
 
<indexterm zone="panel-applet-get-orient"><primary>panel_applet_get_orient</primary></indexterm>
294
 
<programlisting><link linkend="PanelAppletOrient">PanelAppletOrient</link>   panel_applet_get_orient             (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
295
 
<para>
296
 
Get the current orientation of the applet.
297
 
</para><variablelist role="params">
298
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
299
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
300
 
</simpara></listitem></varlistentry>
301
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The orientation of the applet.
302
 
</simpara></listitem></varlistentry>
303
 
</variablelist></refsect2>
304
 
<refsect2 id="panel-applet-get-size" role="function">
305
 
<title>panel_applet_get_size ()</title>
306
 
<indexterm zone="panel-applet-get-size"><primary>panel_applet_get_size</primary></indexterm>
307
 
<programlisting><link linkend="guint">guint</link>               panel_applet_get_size               (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
308
 
<para>
309
 
Get the current size hint for the panel. The size hint is
310
 
not useful for most applets.
311
 
</para>
312
 
<para>
313
 
Note: The return value is <emphasis>not an integer value
314
 
specifying the pixel size of the panel.</emphasis> Do not
315
 
use this value to calculate the size of the applet. Use it
316
 
only as a hint by which to decide the applet's layout.
317
 
</para><variablelist role="params">
318
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
319
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
320
 
</simpara></listitem></varlistentry>
321
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The panel's size hint.
322
 
</simpara></listitem></varlistentry>
323
 
</variablelist></refsect2>
324
 
<refsect2 id="panel-applet-get-background" role="function">
325
 
<title>panel_applet_get_background ()</title>
326
 
<indexterm zone="panel-applet-get-background"><primary>panel_applet_get_background</primary></indexterm>
327
 
<programlisting><link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link>  panel_applet_get_background  (<link linkend="PanelApplet">PanelApplet</link> *applet,
328
 
                                                         <link linkend="GdkColor">GdkColor</link> *color,
329
 
                                                         <link linkend="GdkPixmap">GdkPixmap</link> **pixmap);</programlisting>
330
 
<para>
331
 
Returns the current background type. If the background
332
 
type is <link linkend="PANEL-NO-BACKGROUND:CAPS"><literal>PANEL_NO_BACKGROUND</literal></link> both <parameter>color</parameter> and <parameter>pixmap</parameter> will
333
 
be unaffected. If the background type is <link linkend="PANEL-COLOR-BACKGROUND:CAPS"><literal>PANEL_COLOR_BACKGROUND</literal></link>
334
 
then <parameter>color</parameter> will contain the current panel background colour.
335
 
If the background type is <link linkend="PANEL-PIXMAP-BACKGROUND:CAPS"><literal>PANEL_PIXMAP_BACKGROUND</literal></link>, <parameter>pixmap</parameter> will
336
 
contain a pointer to a <link linkend="GdkPixmap"><type>GdkPixmap</type></link> which is a copy of the applet's
337
 
portion of the panel's background pixmap.
338
 
</para>
339
 
<!-- FIXME: give an example of how to use this --><variablelist role="params">
340
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
341
 
<listitem><simpara>A <link linkend="PanelApplet."><type>PanelApplet.</type></link>
342
 
</simpara></listitem></varlistentry>
343
 
<varlistentry><term><parameter>color</parameter>&#160;:</term>
344
 
<listitem><simpara>A <link linkend="GdkColor"><type>GdkColor</type></link> to be filled in.
345
 
</simpara></listitem></varlistentry>
346
 
<varlistentry><term><parameter>pixmap</parameter>&#160;:</term>
347
 
<listitem><simpara>Returned <link linkend="GdkPixmap."><type>GdkPixmap.</type></link>
348
 
</simpara></listitem></varlistentry>
349
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The background type.
350
 
</simpara></listitem></varlistentry>
351
 
</variablelist></refsect2>
352
 
<refsect2 id="panel-applet-get-preferences-key" role="function">
353
 
<title>panel_applet_get_preferences_key ()</title>
354
 
<indexterm zone="panel-applet-get-preferences-key"><primary>panel_applet_get_preferences_key</primary></indexterm>
355
 
<programlisting><link linkend="gchar">gchar</link> *             panel_applet_get_preferences_key    (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
356
 
<para>
357
 
Returns the GConf path to the directory containing the applet's
358
 
per-instance preference keys. Using this you may construct the
359
 
full path for the applet's preference keys. See
360
 
<xref linkend="panel-applet-Panel-Applet-GConf-Utilities" /> for
361
 
more information.
362
 
</para><variablelist role="params">
363
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
364
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
365
 
</simpara></listitem></varlistentry>
366
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A GConf path.
367
 
</simpara></listitem></varlistentry>
368
 
</variablelist></refsect2>
369
 
<refsect2 id="panel-applet-add-preferences" role="function">
370
 
<title>panel_applet_add_preferences ()</title>
371
 
<indexterm zone="panel-applet-add-preferences"><primary>panel_applet_add_preferences</primary></indexterm>
372
 
<programlisting><link linkend="void">void</link>                panel_applet_add_preferences        (<link linkend="PanelApplet">PanelApplet</link> *applet,
373
 
                                                         const <link linkend="gchar">gchar</link> *schema_dir,
374
 
                                                         <link linkend="GError">GError</link> **opt_error);</programlisting>
375
 
<para>
376
 
Associates each schema in <parameter>schema_dir</parameter> with a key in the applet's
377
 
preferences directory (i.e. the directory returned by
378
 
<link linkend="panel-applet-get-preferences-key"><function>panel_applet_get_preferences_key()</function></link>). Each applet preference
379
 
should have an associated schema to ensure that the key has
380
 
a defined type, sane default and documentation.
381
 
</para>
382
 
<para>
383
 
If you pass <link linkend="NULL:CAPS"><literal>NULL</literal></link> for <parameter>opt_error</parameter>, this function will print
384
 
a warning message from any <link linkend="GError"><type>GError</type></link> which GConf may return.
385
 
</para><variablelist role="params">
386
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
387
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
388
 
</simpara></listitem></varlistentry>
389
 
<varlistentry><term><parameter>schema_dir</parameter>&#160;:</term>
390
 
<listitem><simpara>The GConf path where the applet's schemas are installed
391
 
e.g. /schemas/apps/my_applet
392
 
</simpara></listitem></varlistentry>
393
 
<varlistentry><term><parameter>opt_error</parameter>&#160;:</term>
394
 
<listitem><simpara>Optional <link linkend="GError."><type>GError.</type></link>
395
 
</simpara></listitem></varlistentry>
396
 
</variablelist></refsect2>
397
 
<refsect2 id="panel-applet-get-flags" role="function">
398
 
<title>panel_applet_get_flags ()</title>
399
 
<indexterm zone="panel-applet-get-flags"><primary>panel_applet_get_flags</primary></indexterm>
400
 
<programlisting><link linkend="PanelAppletFlags">PanelAppletFlags</link>    panel_applet_get_flags              (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
401
 
<para>
402
 
Retrieve the <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> associated with the applet.
403
 
</para><variablelist role="params">
404
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
405
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
406
 
</simpara></listitem></varlistentry>
407
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The <link linkend="PanelAppletFlags."><type>PanelAppletFlags.</type></link>
408
 
</simpara></listitem></varlistentry>
409
 
</variablelist></refsect2>
410
 
<refsect2 id="panel-applet-set-flags" role="function">
411
 
<title>panel_applet_set_flags ()</title>
412
 
<indexterm zone="panel-applet-set-flags"><primary>panel_applet_set_flags</primary></indexterm>
413
 
<programlisting><link linkend="void">void</link>                panel_applet_set_flags              (<link linkend="PanelApplet">PanelApplet</link> *applet,
414
 
                                                         <link linkend="PanelAppletFlags">PanelAppletFlags</link> flags);</programlisting>
415
 
<para>
416
 
Set the <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> associated with the applet. See
417
 
<link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> for more details on the possible uses of
418
 
these flags.
419
 
</para><variablelist role="params">
420
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
421
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
422
 
</simpara></listitem></varlistentry>
423
 
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
424
 
<listitem><simpara>The <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> to associate.
425
 
</simpara></listitem></varlistentry>
426
 
</variablelist></refsect2>
427
 
<refsect2 id="panel-applet-set-size-hints" role="function">
428
 
<title>panel_applet_set_size_hints ()</title>
429
 
<indexterm zone="panel-applet-set-size-hints"><primary>panel_applet_set_size_hints</primary></indexterm>
430
 
<programlisting><link linkend="void">void</link>                panel_applet_set_size_hints         (<link linkend="PanelApplet">PanelApplet</link> *applet,
431
 
                                                         const <link linkend="int">int</link> *size_hints,
432
 
                                                         <link linkend="int">int</link> n_elements,
433
 
                                                         <link linkend="int">int</link> base_size);</programlisting>
434
 
<para>
435
 
Set a list of desired size ranges for an applet with the
436
 
<link linkend="PANEL-APPLET-EXPAND-MAJOR:CAPS"><type>PANEL_APPLET_EXPAND_MAJOR</type></link> flags set. <parameter>size_hints</parameter> is an
437
 
array of (max, min) pairs where min(i) > max(i + 1).
438
 
</para>
439
 
<para>
440
 
The panel will endeavour to allocate the applet a size
441
 
in one of the (<parameter>base</parameter> + max, <parameter>base</parameter> + min) ranges.
442
 
</para><variablelist role="params">
443
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
444
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
445
 
</simpara></listitem></varlistentry>
446
 
<varlistentry><term><parameter>size_hints</parameter>&#160;:</term>
447
 
<listitem><simpara>Array of size_hints.
448
 
</simpara></listitem></varlistentry>
449
 
<varlistentry><term><parameter>n_elements</parameter>&#160;:</term>
450
 
<listitem><simpara>Number of elements in the array. <emphasis>
451
 
Not</emphasis> the number of pairs.
452
 
</simpara></listitem></varlistentry>
453
 
<varlistentry><term><parameter>base_size</parameter>&#160;:</term>
454
 
<listitem><simpara>The base size of the applet.
455
 
</simpara></listitem></varlistentry>
456
 
</variablelist></refsect2>
457
 
<refsect2 id="panel-applet-get-locked-down" role="function">
458
 
<title>panel_applet_get_locked_down ()</title>
459
 
<indexterm zone="panel-applet-get-locked-down"><primary>panel_applet_get_locked_down</primary></indexterm>
460
 
<programlisting><link linkend="gboolean">gboolean</link>            panel_applet_get_locked_down        (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
461
 
<para>
462
 
Check if the <parameter>applet</parameter> is locked down. A locked down applet should not allow any change to its configuration.
463
 
</para><variablelist role="params">
464
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
465
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
466
 
</simpara></listitem></varlistentry>
467
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the <parameter>applet</parameter> is locked down, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
468
 
</simpara></listitem></varlistentry>
469
 
</variablelist></refsect2>
470
 
<refsect2 id="panel-applet-request-focus" role="function">
471
 
<title>panel_applet_request_focus ()</title>
472
 
<indexterm zone="panel-applet-request-focus"><primary>panel_applet_request_focus</primary></indexterm>
473
 
<programlisting><link linkend="void">void</link>                panel_applet_request_focus          (<link linkend="PanelApplet">PanelApplet</link> *applet,
474
 
                                                         <link linkend="guint32">guint32</link> timestamp);</programlisting>
475
 
<para>
476
 
Set keyboard focus to <parameter>applet</parameter>.
477
 
</para><variablelist role="params">
478
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
479
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
480
 
</simpara></listitem></varlistentry>
481
 
<varlistentry><term><parameter>timestamp</parameter>&#160;:</term>
482
 
<listitem><simpara>timestamp of the event triggering the window focus
483
 
</simpara></listitem></varlistentry>
484
 
</variablelist></refsect2>
485
 
<refsect2 id="panel-applet-get-control" role="function">
486
 
<title>panel_applet_get_control ()</title>
487
 
<indexterm zone="panel-applet-get-control"><primary>panel_applet_get_control</primary></indexterm>
488
 
<programlisting><link linkend="BonoboControl">BonoboControl</link> *     panel_applet_get_control            (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
489
 
<para>
490
 
Retrieves the <link linkend="BonoboControl"><type>BonoboControl</type></link> associated with <parameter>applet</parameter>.
491
 
</para><variablelist role="params">
492
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
493
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
494
 
</simpara></listitem></varlistentry>
495
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="BonoboControl."><type>BonoboControl.</type></link>
496
 
</simpara></listitem></varlistentry>
497
 
</variablelist></refsect2>
498
 
<refsect2 id="panel-applet-get-popup-component" role="function">
499
 
<title>panel_applet_get_popup_component ()</title>
500
 
<indexterm zone="panel-applet-get-popup-component"><primary>panel_applet_get_popup_component</primary></indexterm>
501
 
<programlisting><link linkend="BonoboUIComponent">BonoboUIComponent</link> * panel_applet_get_popup_component    (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
502
 
<para>
503
 
Retrieves the <link linkend="BonoboUIComponent"><type>BonoboUIComponent</type></link> used for popup menus associated
504
 
with <parameter>applet</parameter>.
505
 
</para><variablelist role="params">
506
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
507
 
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
508
 
</simpara></listitem></varlistentry>
509
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="BonoboUIComponent."><type>BonoboUIComponent.</type></link>
510
 
</simpara></listitem></varlistentry>
511
 
</variablelist></refsect2>
512
 
<refsect2 id="panel-applet-setup-menu" role="function">
513
 
<title>panel_applet_setup_menu ()</title>
514
 
<indexterm zone="panel-applet-setup-menu"><primary>panel_applet_setup_menu</primary></indexterm>
515
 
<programlisting><link linkend="void">void</link>                panel_applet_setup_menu             (<link linkend="PanelApplet">PanelApplet</link> *applet,
516
 
                                                         const <link linkend="gchar">gchar</link> *xml,
517
 
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
518
 
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
519
 
<para>
520
 
Sets up a popup menu for <parameter>applet</parameter> described by the xml
521
 
string, <parameter>xml</parameter>. See <xref linkend="applet-writing" /> section
522
 
for a description of the format of the xml.
523
 
</para><variablelist role="params">
524
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
525
 
<listitem><simpara>A <link linkend="PanelApplet."><type>PanelApplet.</type></link>
526
 
</simpara></listitem></varlistentry>
527
 
<varlistentry><term><parameter>xml</parameter>&#160;:</term>
528
 
<listitem><simpara>The xml character string describing the popup menu.
529
 
</simpara></listitem></varlistentry>
530
 
<varlistentry><term><parameter>verb_list</parameter>&#160;:</term>
531
 
<listitem><simpara>The list of <link linkend="BonoboUIVerbs"><type>BonoboUIVerbs</type></link> for the menu.
532
 
</simpara></listitem></varlistentry>
533
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
534
 
<listitem><simpara>The user data pointer for the menu.
535
 
</simpara></listitem></varlistentry>
536
 
</variablelist></refsect2>
537
 
<refsect2 id="panel-applet-setup-menu-from-file" role="function">
538
 
<title>panel_applet_setup_menu_from_file ()</title>
539
 
<indexterm zone="panel-applet-setup-menu-from-file"><primary>panel_applet_setup_menu_from_file</primary></indexterm>
540
 
<programlisting><link linkend="void">void</link>                panel_applet_setup_menu_from_file   (<link linkend="PanelApplet">PanelApplet</link> *applet,
541
 
                                                         const <link linkend="gchar">gchar</link> *opt_datadir,
542
 
                                                         const <link linkend="gchar">gchar</link> *file,
543
 
                                                         const <link linkend="gchar">gchar</link> *opt_app_name,
544
 
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
545
 
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
546
 
<para>
547
 
Sets up a popup menu for <parameter>applet</parameter> described by the xml
548
 
file, <parameter>file</parameter>. See <xref linkend="applet-writing" /> for a description of
549
 
the format of the xml.
550
 
</para><variablelist role="params">
551
 
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
552
 
<listitem><simpara>A <link linkend="PanelApplet."><type>PanelApplet.</type></link>
553
 
</simpara></listitem></varlistentry>
554
 
<varlistentry><term><parameter>opt_datadir</parameter>&#160;:</term>
555
 
<listitem><simpara>The data directory - i.e. ${prefix}/share (optional).
556
 
</simpara></listitem></varlistentry>
557
 
<varlistentry><term><parameter>file</parameter>&#160;:</term>
558
 
<listitem><simpara>The file's name.
559
 
</simpara></listitem></varlistentry>
560
 
<varlistentry><term><parameter>opt_app_name</parameter>&#160;:</term>
561
 
<listitem><simpara>The application's name (optional).
562
 
</simpara></listitem></varlistentry>
563
 
<varlistentry><term><parameter>verb_list</parameter>&#160;:</term>
564
 
<listitem><simpara>The list of <link linkend="BonoboUIVerbs"><type>BonoboUIVerbs</type></link> for the menu.
565
 
</simpara></listitem></varlistentry>
566
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
567
 
<listitem><simpara>The user data pointer for the menu.
568
 
</simpara></listitem></varlistentry>
569
 
</variablelist></refsect2>
570
 
<refsect2 id="panel-applet-factory-main" role="function">
571
 
<title>panel_applet_factory_main ()</title>
572
 
<indexterm zone="panel-applet-factory-main"><primary>panel_applet_factory_main</primary></indexterm>
573
 
<programlisting><link linkend="int">int</link>                 panel_applet_factory_main           (const <link linkend="gchar">gchar</link> *iid,
574
 
                                                         <link linkend="GType">GType</link> applet_type,
575
 
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
576
 
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
577
 
<para>
578
 
A generic 'main' routine for applets. This should not normally be
579
 
used directly because it is invoked by <link linkend="PANEL-APPLET-BONOBO-FACTORY.:CAPS"><type>PANEL_APPLET_BONOBO_FACTORY.</type></link>
580
 
</para><variablelist role="params">
581
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
582
 
<listitem><simpara>The bonobo-activation iid of the factory.
583
 
</simpara></listitem></varlistentry>
584
 
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
585
 
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
586
 
</simpara></listitem></varlistentry>
587
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
588
 
<listitem><simpara>The factory callback.
589
 
</simpara></listitem></varlistentry>
590
 
<varlistentry><term><parameter>data</parameter>&#160;:</term>
591
 
<listitem><simpara>The factory user data pointer.
592
 
</simpara></listitem></varlistentry>
593
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>0 on success, 1 on failure.
594
 
</simpara></listitem></varlistentry>
595
 
</variablelist></refsect2>
596
 
<refsect2 id="panel-applet-factory-main-closure" role="function">
597
 
<title>panel_applet_factory_main_closure ()</title>
598
 
<indexterm zone="panel-applet-factory-main-closure"><primary>panel_applet_factory_main_closure</primary></indexterm>
599
 
<programlisting><link linkend="int">int</link>                 panel_applet_factory_main_closure   (const <link linkend="gchar">gchar</link> *iid,
600
 
                                                         <link linkend="GType">GType</link> applet_type,
601
 
                                                         <link linkend="GClosure">GClosure</link> *closure);</programlisting>
602
 
<para>
603
 
A generic 'main' routine for applets. This should not normally be
604
 
used directly because it is invoked by <link linkend="PANEL-APPLET-BONOBO-FACTORY.:CAPS"><type>PANEL_APPLET_BONOBO_FACTORY.</type></link>
605
 
</para><variablelist role="params">
606
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
607
 
<listitem><simpara>The bonobo-activation iid of the factory.
608
 
</simpara></listitem></varlistentry>
609
 
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
610
 
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
611
 
</simpara></listitem></varlistentry>
612
 
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
613
 
<listitem><simpara>The factory callback closure.
614
 
</simpara></listitem></varlistentry>
615
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>0 on success, 1 on failure.
616
 
</simpara></listitem></varlistentry>
617
 
</variablelist></refsect2>
618
 
<refsect2 id="PANEL-APPLET-BONOBO-FACTORY:CAPS" role="macro">
619
 
<title>PANEL_APPLET_BONOBO_FACTORY()</title>
620
 
<indexterm zone="PANEL-APPLET-BONOBO-FACTORY:CAPS"><primary>PANEL_APPLET_BONOBO_FACTORY</primary></indexterm>
621
 
<programlisting>#define             PANEL_APPLET_BONOBO_FACTORY(iid, type, name, version, callback, data)</programlisting>
622
 
<para>
623
 
Defines a 'main' routine for the applet factory.
624
 
</para><variablelist role="params">
625
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
626
 
<listitem><simpara>The bonobo-activation iid of the factory.
627
 
</simpara></listitem></varlistentry>
628
 
<varlistentry><term><parameter>type</parameter>&#160;:</term>
629
 
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
630
 
</simpara></listitem></varlistentry>
631
 
<varlistentry><term><parameter>name</parameter>&#160;:</term>
632
 
<listitem><simpara>The applet ID string.
633
 
</simpara></listitem></varlistentry>
634
 
<varlistentry><term><parameter>version</parameter>&#160;:</term>
635
 
<listitem><simpara>The applet version string.
636
 
</simpara></listitem></varlistentry>
637
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
638
 
<listitem><simpara>The factory callback.
639
 
</simpara></listitem></varlistentry>
640
 
<varlistentry><term><parameter>data</parameter>&#160;:</term>
641
 
<listitem><simpara>The factory user data pointer.
642
 
</simpara></listitem></varlistentry>
643
 
</variablelist></refsect2>
644
 
<refsect2 id="panel-applet-shlib-factory" role="function">
645
 
<title>panel_applet_shlib_factory ()</title>
646
 
<indexterm zone="panel-applet-shlib-factory"><primary>panel_applet_shlib_factory</primary></indexterm>
647
 
<programlisting><link linkend="Bonobo-Unknown">Bonobo_Unknown</link>      panel_applet_shlib_factory          (const <link linkend="char">char</link> *iid,
648
 
                                                         <link linkend="GType">GType</link> applet_type,
649
 
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
650
 
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
651
 
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
652
 
                                                         <link linkend="gpointer">gpointer</link> user_data,
653
 
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);</programlisting>
654
 
<para>
655
 
A generic shared library factory routine for applets. This should not
656
 
normally be used directly as it is invoked by <link linkend="PANEL-APPLET-BONOBO-SHLIB-FACTORY.:CAPS"><type>PANEL_APPLET_BONOBO_SHLIB_FACTORY.</type></link>
657
 
</para><variablelist role="params">
658
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
659
 
<listitem><simpara>The bonobo-activation iid of the factory.
660
 
</simpara></listitem></varlistentry>
661
 
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
662
 
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
663
 
</simpara></listitem></varlistentry>
664
 
<varlistentry><term><parameter>poa</parameter>&#160;:</term>
665
 
<listitem><simpara>The <link linkend="PortableServer-POA"><type>PortableServer_POA</type></link> passed to the shlib factory
666
 
callback.
667
 
</simpara></listitem></varlistentry>
668
 
<varlistentry><term><parameter>impl_ptr</parameter>&#160;:</term>
669
 
<listitem><simpara>The <link linkend="gpointer"><type>gpointer</type></link> passed to the shlib factory callback.
670
 
</simpara></listitem></varlistentry>
671
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
672
 
<listitem><simpara>The applet factory callback.
673
 
</simpara></listitem></varlistentry>
674
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
675
 
<listitem><simpara>The factory user data pointer.
676
 
</simpara></listitem></varlistentry>
677
 
<varlistentry><term><parameter>ev</parameter>&#160;:</term>
678
 
<listitem><simpara>The $CORBA_Environment passed to the shlib factory callback.
679
 
</simpara></listitem></varlistentry>
680
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="Bonobo-Unknown"><type>Bonobo_Unknown</type></link> to return from the shlib factory
681
 
callback.
682
 
</simpara></listitem></varlistentry>
683
 
</variablelist></refsect2>
684
 
<refsect2 id="panel-applet-shlib-factory-closure" role="function">
685
 
<title>panel_applet_shlib_factory_closure ()</title>
686
 
<indexterm zone="panel-applet-shlib-factory-closure"><primary>panel_applet_shlib_factory_closure</primary></indexterm>
687
 
<programlisting><link linkend="Bonobo-Unknown">Bonobo_Unknown</link>      panel_applet_shlib_factory_closure  (const <link linkend="char">char</link> *iid,
688
 
                                                         <link linkend="GType">GType</link> applet_type,
689
 
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
690
 
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
691
 
                                                         <link linkend="GClosure">GClosure</link> *closure,
692
 
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);</programlisting>
693
 
<para>
694
 
A generic shared library factory routine for applets. This should not
695
 
normally be used directly as it is invoked by <link linkend="PANEL-APPLET-BONOBO-SHLIB-FACTORY.:CAPS"><type>PANEL_APPLET_BONOBO_SHLIB_FACTORY.</type></link>
696
 
</para><variablelist role="params">
697
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
698
 
<listitem><simpara>The bonobo-activation iid of the factory.
699
 
</simpara></listitem></varlistentry>
700
 
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
701
 
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
702
 
</simpara></listitem></varlistentry>
703
 
<varlistentry><term><parameter>poa</parameter>&#160;:</term>
704
 
<listitem><simpara>The <link linkend="PortableServer-POA"><type>PortableServer_POA</type></link> passed to the shlib factory
705
 
callback.
706
 
</simpara></listitem></varlistentry>
707
 
<varlistentry><term><parameter>impl_ptr</parameter>&#160;:</term>
708
 
<listitem><simpara>The <link linkend="gpointer"><type>gpointer</type></link> passed to the shlib factory callback.
709
 
</simpara></listitem></varlistentry>
710
 
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
711
 
<listitem><simpara>The applet factory closure.
712
 
</simpara></listitem></varlistentry>
713
 
<varlistentry><term><parameter>ev</parameter>&#160;:</term>
714
 
<listitem><simpara>The $CORBA_Environment passed to the shlib factory callback.
715
 
</simpara></listitem></varlistentry>
716
 
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="Bonobo-Unknown"><type>Bonobo_Unknown</type></link> to return from the shlib factory
717
 
callback.
718
 
</simpara></listitem></varlistentry>
719
 
</variablelist></refsect2>
720
 
<refsect2 id="PANEL-APPLET-BONOBO-SHLIB-FACTORY:CAPS" role="macro">
721
 
<title>PANEL_APPLET_BONOBO_SHLIB_FACTORY()</title>
722
 
<indexterm zone="PANEL-APPLET-BONOBO-SHLIB-FACTORY:CAPS"><primary>PANEL_APPLET_BONOBO_SHLIB_FACTORY</primary></indexterm>
723
 
<programlisting>#define             PANEL_APPLET_BONOBO_SHLIB_FACTORY(iid, type, descr, callback, data)</programlisting>
724
 
<para>
725
 
Defines a Bonobo Activation shared library plugin and associated
726
 
factory callback.
727
 
</para><variablelist role="params">
728
 
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
729
 
<listitem><simpara>The bonobo-activation iid of the factory.
730
 
</simpara></listitem></varlistentry>
731
 
<varlistentry><term><parameter>type</parameter>&#160;:</term>
732
 
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
733
 
</simpara></listitem></varlistentry>
734
 
<varlistentry><term><parameter>descr</parameter>&#160;:</term>
735
 
<listitem><simpara>A description of the applet.
736
 
</simpara></listitem></varlistentry>
737
 
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
738
 
<listitem><simpara>The factory callback.
739
 
</simpara></listitem></varlistentry>
740
 
<varlistentry><term><parameter>data</parameter>&#160;:</term>
741
 
<listitem><simpara>The factory user data pointer.
742
 
</simpara></listitem></varlistentry>
743
 
</variablelist></refsect2>
744
 
 
745
 
</refsect1>
746
 
<refsect1 id="PanelApplet.signal-details" role="signals">
747
 
<title role="signals.title">Signal Details</title>
748
 
<refsect2 id="PanelApplet-change-background" role="signal"><title>The <literal>&quot;change-background&quot;</literal> signal</title>
749
 
<indexterm zone="PanelApplet-change-background"><primary>PanelApplet::change-background</primary></indexterm>
750
 
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link>              *panelapplet,
751
 
                                                        <link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link> arg1,
752
 
                                                        <link linkend="GdkColor">GdkColor</link>                 *arg2,
753
 
                                                        <link linkend="GdkPixmap">GdkPixmap</link>                *arg3,
754
 
                                                        <link linkend="gpointer">gpointer</link>                  user_data)        : Run Last</programlisting>
755
 
<para>
756
 
Emitted when the background of the panel changes. Use <parameter>type</parameter> to
757
 
determine which, if any, of <parameter>color</parameter> and <parameter>pimxap</parameter> is valid.
758
 
</para><variablelist role="params">
759
 
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
760
 
<listitem><simpara>The object which received the signal.
761
 
</simpara></listitem></varlistentry>
762
 
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
763
 
<listitem><simpara>
764
 
</simpara></listitem></varlistentry>
765
 
<varlistentry><term><parameter>arg2</parameter>&#160;:</term>
766
 
<listitem><simpara>
767
 
</simpara></listitem></varlistentry>
768
 
<varlistentry><term><parameter>arg3</parameter>&#160;:</term>
769
 
<listitem><simpara>
770
 
</simpara></listitem></varlistentry>
771
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
772
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
773
 
</variablelist></refsect2><refsect2 id="PanelApplet-change-orient" role="signal"><title>The <literal>&quot;change-orient&quot;</literal> signal</title>
774
 
<indexterm zone="PanelApplet-change-orient"><primary>PanelApplet::change-orient</primary></indexterm>
775
 
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link> *panelapplet,
776
 
                                                        <link linkend="guint">guint</link>        arg1,
777
 
                                                        <link linkend="gpointer">gpointer</link>     user_data)        : Run Last</programlisting>
778
 
<para>
779
 
Emitted when the orientation of the panel changes.
780
 
</para><variablelist role="params">
781
 
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
782
 
<listitem><simpara>The object which received the signal.
783
 
</simpara></listitem></varlistentry>
784
 
<varlistentry><term><parameter>orient</parameter>&#160;:</term>
785
 
<listitem><simpara>The new <link linkend="PanelAppletOrient"><type>PanelAppletOrient</type></link> of the applet.
786
 
</simpara></listitem></varlistentry>
787
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
788
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
789
 
</variablelist></refsect2><refsect2 id="PanelApplet-change-size" role="signal"><title>The <literal>&quot;change-size&quot;</literal> signal</title>
790
 
<indexterm zone="PanelApplet-change-size"><primary>PanelApplet::change-size</primary></indexterm>
791
 
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link> *panelapplet,
792
 
                                                        <link linkend="gint">gint</link>         arg1,
793
 
                                                        <link linkend="gpointer">gpointer</link>     user_data)        : Run Last</programlisting>
794
 
<para>
795
 
Emitted when the size of the panel changes.
796
 
</para>
797
 
<para>
798
 
Note: this is different for size negotiation which is handled by
799
 
<link linkend="size-request"><function>size_request()</function></link> and <link linkend="size-allocate"><function>size_allocate()</function></link> as usual. This signal should
800
 
be used to determine what font size or widget layout to use
801
 
depending on the size of the panel. See <link linkend="panel-applet-get-size"><function>panel_applet_get_size()</function></link>.
802
 
</para><variablelist role="params">
803
 
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
804
 
<listitem><simpara>The object which received the signal.
805
 
</simpara></listitem></varlistentry>
806
 
<varlistentry><term><parameter>size</parameter>&#160;:</term>
807
 
<listitem><simpara>The size hint of the panel.
808
 
</simpara></listitem></varlistentry>
809
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
810
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
811
 
</variablelist></refsect2><refsect2 id="PanelApplet-move-focus-out-of-applet" role="signal"><title>The <literal>&quot;move-focus-out-of-applet&quot;</literal> signal</title>
812
 
<indexterm zone="PanelApplet-move-focus-out-of-applet"><primary>PanelApplet::move-focus-out-of-applet</primary></indexterm>
813
 
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link>     *panelapplet,
814
 
                                                        <link linkend="GtkDirectionType">GtkDirectionType</link> arg1,
815
 
                                                        <link linkend="gpointer">gpointer</link>         user_data)        : Run Last / Action</programlisting>
816
 
<para>
817
 
Emitted when the applet has lost focus. This signal is used internally and is not meant to be used by applets themselves.
818
 
</para><variablelist role="params">
819
 
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
820
 
<listitem><simpara>The object which received the signal.
821
 
</simpara></listitem></varlistentry>
822
 
<varlistentry><term><parameter>direction</parameter>&#160;:</term>
823
 
<listitem><simpara>The direction of focus movement.
824
 
</simpara></listitem></varlistentry>
825
 
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
826
 
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
827
 
</variablelist></refsect2>
828
 
</refsect1>
829
 
 
830
 
</refentry>