<refentry id="PanelApplet">
<refmeta>
<refentrytitle role="top_of_page" id="PanelApplet.top_of_page">PanelApplet</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANEL-APPLET Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>PanelApplet</refname>
<refpurpose>The PanelApplet object.</refpurpose>
</refnamediv>

<refsynopsisdiv id="PanelApplet.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
#include &lt;panel-applet.h&gt;

                    <link linkend="PanelApplet-struct">PanelApplet</link>;
typedef             <link linkend="PanelAppletOrient">PanelAppletOrient</link>;
#define             <link linkend="PANEL-APPLET-ORIENT-UP:CAPS">PANEL_APPLET_ORIENT_UP</link>
#define             <link linkend="PANEL-APPLET-ORIENT-DOWN:CAPS">PANEL_APPLET_ORIENT_DOWN</link>
#define             <link linkend="PANEL-APPLET-ORIENT-LEFT:CAPS">PANEL_APPLET_ORIENT_LEFT</link>
#define             <link linkend="PANEL-APPLET-ORIENT-RIGHT:CAPS">PANEL_APPLET_ORIENT_RIGHT</link>
enum                <link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link>;
enum                <link linkend="PanelAppletFlags">PanelAppletFlags</link>;
<link linkend="gboolean">gboolean</link>            (<link linkend="PanelAppletFactoryCallback">*PanelAppletFactoryCallback</link>)       (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *iid,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="panel-applet-new">panel_applet_new</link>                    (void);
<link linkend="PanelAppletOrient">PanelAppletOrient</link>   <link linkend="panel-applet-get-orient">panel_applet_get_orient</link>             (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="guint">guint</link>               <link linkend="panel-applet-get-size">panel_applet_get_size</link>               (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link>  <link linkend="panel-applet-get-background">panel_applet_get_background</link>  (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         <link linkend="GdkColor">GdkColor</link> *color,
                                                         <link linkend="GdkPixmap">GdkPixmap</link> **pixmap);
<link linkend="gchar">gchar</link> *             <link linkend="panel-applet-get-preferences-key">panel_applet_get_preferences_key</link>    (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="void">void</link>                <link linkend="panel-applet-add-preferences">panel_applet_add_preferences</link>        (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *schema_dir,
                                                         <link linkend="GError">GError</link> **opt_error);
<link linkend="PanelAppletFlags">PanelAppletFlags</link>    <link linkend="panel-applet-get-flags">panel_applet_get_flags</link>              (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="void">void</link>                <link linkend="panel-applet-set-flags">panel_applet_set_flags</link>              (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         <link linkend="PanelAppletFlags">PanelAppletFlags</link> flags);
<link linkend="void">void</link>                <link linkend="panel-applet-set-size-hints">panel_applet_set_size_hints</link>         (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="int">int</link> *size_hints,
                                                         <link linkend="int">int</link> n_elements,
                                                         <link linkend="int">int</link> base_size);
<link linkend="gboolean">gboolean</link>            <link linkend="panel-applet-get-locked-down">panel_applet_get_locked_down</link>        (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="void">void</link>                <link linkend="panel-applet-request-focus">panel_applet_request_focus</link>          (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         <link linkend="guint32">guint32</link> timestamp);
<link linkend="BonoboControl">BonoboControl</link> *     <link linkend="panel-applet-get-control">panel_applet_get_control</link>            (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="BonoboUIComponent">BonoboUIComponent</link> * <link linkend="panel-applet-get-popup-component">panel_applet_get_popup_component</link>    (<link linkend="PanelApplet">PanelApplet</link> *applet);
<link linkend="void">void</link>                <link linkend="panel-applet-setup-menu">panel_applet_setup_menu</link>             (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *xml,
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<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,
                                                         const <link linkend="gchar">gchar</link> *opt_datadir,
                                                         const <link linkend="gchar">gchar</link> *file,
                                                         const <link linkend="gchar">gchar</link> *opt_app_name,
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
                                                         <link linkend="gpointer">gpointer</link> user_data);
<link linkend="int">int</link>                 <link linkend="panel-applet-factory-main">panel_applet_factory_main</link>           (const <link linkend="gchar">gchar</link> *iid,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> data);
<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,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="GClosure">GClosure</link> *closure);
#define             <link linkend="PANEL-APPLET-BONOBO-FACTORY:CAPS">PANEL_APPLET_BONOBO_FACTORY</link>         (iid, type, name, version, callback, data)
<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,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data,
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);
<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,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
                                                         <link linkend="GClosure">GClosure</link> *closure,
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);
#define             <link linkend="PANEL-APPLET-BONOBO-SHLIB-FACTORY:CAPS">PANEL_APPLET_BONOBO_SHLIB_FACTORY</link>   (iid, type, descr, callback, data)
</synopsis>
</refsynopsisdiv>
<refsect1 id="PanelApplet.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkContainer">GtkContainer</link>
                           +----<link linkend="GtkBin">GtkBin</link>
                                 +----<link linkend="GtkEventBox">GtkEventBox</link>
                                       +----PanelApplet
</synopsis>
</refsect1>
<refsect1 id="PanelApplet.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
PanelApplet implements
 <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
</refsect1>
<refsect1 id="PanelApplet.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="PanelApplet-change-background">change-background</link>&quot;                              : Run Last
  &quot;<link linkend="PanelApplet-change-orient">change-orient</link>&quot;                                  : Run Last
  &quot;<link linkend="PanelApplet-change-size">change-size</link>&quot;                                    : Run Last
  &quot;<link linkend="PanelApplet-move-focus-out-of-applet">move-focus-out-of-applet</link>&quot;                       : Run Last / Action
</synopsis>
</refsect1>

<refsect1 id="PanelApplet.description" role="desc">
<title role="desc.title">Description</title>
<para>
The <link linkend="PanelApplet"><type>PanelApplet</type></link> object is an object which encapsulates an applet. It
is a <link linkend="GtkContainer"><type>GtkContainer</type></link> which may contain a single widget. This widget, in
turn, should contain all widgets exposed by the applet.
</para>
<para>
A <link linkend="PanelApplet"><type>PanelApplet</type></link> is associated with a <link linkend="BonoboControl."><type>BonoboControl.</type></link> The control makes
the cross process UI emmbedding required by applets possible.
</para>
</refsect1>
<refsect1 id="PanelApplet.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PanelApplet-struct" role="struct">
<title>PanelApplet</title>
<indexterm zone="PanelApplet-struct"><primary>PanelApplet</primary></indexterm>
<programlisting>typedef struct _PanelApplet PanelApplet;</programlisting>
<para>
The <link linkend="PanelApplet"><type>PanelApplet</type></link> struct contains private data only.
</para></refsect2>
<refsect2 id="PanelAppletOrient" role="typedef">
<title>PanelAppletOrient</title>
<indexterm zone="PanelAppletOrient"><primary>PanelAppletOrient</primary></indexterm>
<programlisting>typedef GNOME_Vertigo_PanelOrient PanelAppletOrient;
</programlisting>
<para>
The <link linkend="PanelAppletOrient"><type>PanelAppletOrient</type></link> type specifies the orientation of the applet. The
values may seem backward (e.g. <link linkend="PANEL-APPLET-ORIENT-LEFT:CAPS"><literal>PANEL_APPLET_ORIENT_LEFT</literal></link> means the panel
is on the right hand side), but this is because the value is representative
of the applet's <emphasis>orientation</emphasis>, not the panel's position.
</para></refsect2>
<refsect2 id="PANEL-APPLET-ORIENT-UP:CAPS" role="macro">
<title>PANEL_APPLET_ORIENT_UP</title>
<indexterm zone="PANEL-APPLET-ORIENT-UP:CAPS"><primary>PANEL_APPLET_ORIENT_UP</primary></indexterm>
<programlisting>#define PANEL_APPLET_ORIENT_UP    GNOME_Vertigo_PANEL_ORIENT_UP
</programlisting>
<para>
The applet is orientated up (i.e. the panel is at the bottom of the screen).
</para></refsect2>
<refsect2 id="PANEL-APPLET-ORIENT-DOWN:CAPS" role="macro">
<title>PANEL_APPLET_ORIENT_DOWN</title>
<indexterm zone="PANEL-APPLET-ORIENT-DOWN:CAPS"><primary>PANEL_APPLET_ORIENT_DOWN</primary></indexterm>
<programlisting>#define PANEL_APPLET_ORIENT_DOWN  GNOME_Vertigo_PANEL_ORIENT_DOWN
</programlisting>
<para>
The applet is orientated down (i.e. the panel is at the top of the screen).
</para></refsect2>
<refsect2 id="PANEL-APPLET-ORIENT-LEFT:CAPS" role="macro">
<title>PANEL_APPLET_ORIENT_LEFT</title>
<indexterm zone="PANEL-APPLET-ORIENT-LEFT:CAPS"><primary>PANEL_APPLET_ORIENT_LEFT</primary></indexterm>
<programlisting>#define PANEL_APPLET_ORIENT_LEFT  GNOME_Vertigo_PANEL_ORIENT_LEFT
</programlisting>
<para>
The applet is orientated left (i.e. the panel is at the right hand side of the screen).
</para></refsect2>
<refsect2 id="PANEL-APPLET-ORIENT-RIGHT:CAPS" role="macro">
<title>PANEL_APPLET_ORIENT_RIGHT</title>
<indexterm zone="PANEL-APPLET-ORIENT-RIGHT:CAPS"><primary>PANEL_APPLET_ORIENT_RIGHT</primary></indexterm>
<programlisting>#define PANEL_APPLET_ORIENT_RIGHT GNOME_Vertigo_PANEL_ORIENT_RIGHT
</programlisting>
<para>
The applet is orientated right (i.e. the panel is at the left hand side of the screen).
</para></refsect2>
<refsect2 id="PanelAppletBackgroundType" role="enum">
<title>enum PanelAppletBackgroundType</title>
<indexterm zone="PanelAppletBackgroundType"><primary>PanelAppletBackgroundType</primary></indexterm>
<programlisting>typedef enum {
	PANEL_NO_BACKGROUND,
	PANEL_COLOR_BACKGROUND,
	PANEL_PIXMAP_BACKGROUND
} PanelAppletBackgroundType;
</programlisting>
<para>
The <link linkend="PanelAppletBackgroundType"><type>PanelAppletBackgroundType</type></link> enumerated type specifies the type of
background of a panel.
</para><variablelist role="enum">
<varlistentry id="PANEL-NO-BACKGROUND:CAPS" role="constant">
<term><literal>PANEL_NO_BACKGROUND</literal></term>
<listitem><simpara>The panel has no background, the default is used.
</simpara></listitem>
</varlistentry>
<varlistentry id="PANEL-COLOR-BACKGROUND:CAPS" role="constant">
<term><literal>PANEL_COLOR_BACKGROUND</literal></term>
<listitem><simpara>The panel has a color, i.e rgb value,
background.
</simpara></listitem>
</varlistentry>
<varlistentry id="PANEL-PIXMAP-BACKGROUND:CAPS" role="constant">
<term><literal>PANEL_PIXMAP_BACKGROUND</literal></term>
<listitem><simpara> The panel has either an image background
or is translucent.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="PanelAppletFlags" role="enum">
<title>enum PanelAppletFlags</title>
<indexterm zone="PanelAppletFlags"><primary>PanelAppletFlags</primary></indexterm>
<programlisting>typedef enum {
	PANEL_APPLET_FLAGS_NONE   = 0,
	PANEL_APPLET_EXPAND_MAJOR = 1 &lt;&lt; 0,
	PANEL_APPLET_EXPAND_MINOR = 1 &lt;&lt; 1,
	PANEL_APPLET_HAS_HANDLE   = 1 &lt;&lt; 2
} PanelAppletFlags;
</programlisting>
<para>
The <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> associated with the applet are boolean flags which
the panel may read in order to figure out how to handle the applet.
</para><variablelist role="enum">
<varlistentry id="PANEL-APPLET-FLAGS-NONE:CAPS" role="constant">
<term><literal>PANEL_APPLET_FLAGS_NONE</literal></term>
<listitem><simpara>No flags are to be associated with the applet.
</simpara></listitem>
</varlistentry>
<varlistentry id="PANEL-APPLET-EXPAND-MAJOR:CAPS" role="constant">
<term><literal>PANEL_APPLET_EXPAND_MAJOR</literal></term>
<listitem><simpara>The applet should expand horizontally on an
horizontal panel and vertically on a vertical panel - e.g. the behaviour
of the Window List applet.
</simpara></listitem>
</varlistentry>
<varlistentry id="PANEL-APPLET-EXPAND-MINOR:CAPS" role="constant">
<term><literal>PANEL_APPLET_EXPAND_MINOR</literal></term>
<listitem><simpara>The applet should expand vertically on an
horizontal panel and horizontally on a vertical panel. Most applets should
set this flag in order to utilise the full panel width and allow the applet
to be Fitt's Law compliant.
</simpara></listitem>
</varlistentry>
<varlistentry id="PANEL-APPLET-HAS-HANDLE:CAPS" role="constant">
<term><literal>PANEL_APPLET_HAS_HANDLE</literal></term>
<listitem><simpara>The panel should draw a grab handle around the
applet - e.g. the Window List and Notification Area applets both set this
flag.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="PanelAppletFactoryCallback" role="function">
<title>PanelAppletFactoryCallback ()</title>
<indexterm zone="PanelAppletFactoryCallback"><primary>PanelAppletFactoryCallback</primary></indexterm>
<programlisting><link linkend="gboolean">gboolean</link>            (*PanelAppletFactoryCallback)       (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *iid,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
This callback is invoked when the applet is loaded onto the panel. Typically
the callback will check that <parameter>iid</parameter> matches and fill the <parameter>applet</parameter> with the
widgets which make up the applet.
</para>
<para>
Prior to the callback being invoked the <link linkend="PanelApplet"><type>PanelApplet</type></link> (or an instance of the
sub-class specified by the <link linkend="GType"><type>GType</type></link> passed to the factory macros) is instantiated
and initialized.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The Bonobo IID of the applet requested.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>The data passed to the factory macros.
</simpara></listitem></varlistentry>
<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.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-new" role="function">
<title>panel_applet_new ()</title>
<indexterm zone="panel-applet-new"><primary>panel_applet_new</primary></indexterm>
<programlisting><link linkend="GtkWidget">GtkWidget</link> *         panel_applet_new                    (void);</programlisting>
<para>
Creates a new <link linkend="PanelApplet."><type>PanelApplet.</type></link> This function is typically not
useful as the applet is created before the <link linkend="PanelAppletFactoryCallback"><type>PanelAppletFactoryCallback</type></link>
is invoked.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-orient" role="function">
<title>panel_applet_get_orient ()</title>
<indexterm zone="panel-applet-get-orient"><primary>panel_applet_get_orient</primary></indexterm>
<programlisting><link linkend="PanelAppletOrient">PanelAppletOrient</link>   panel_applet_get_orient             (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Get the current orientation of the applet.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The orientation of the applet.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-size" role="function">
<title>panel_applet_get_size ()</title>
<indexterm zone="panel-applet-get-size"><primary>panel_applet_get_size</primary></indexterm>
<programlisting><link linkend="guint">guint</link>               panel_applet_get_size               (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Get the current size hint for the panel. The size hint is
not useful for most applets.
</para>
<para>
Note: The return value is <emphasis>not an integer value
specifying the pixel size of the panel.</emphasis> Do not
use this value to calculate the size of the applet. Use it
only as a hint by which to decide the applet's layout.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The panel's size hint.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-background" role="function">
<title>panel_applet_get_background ()</title>
<indexterm zone="panel-applet-get-background"><primary>panel_applet_get_background</primary></indexterm>
<programlisting><link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link>  panel_applet_get_background  (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         <link linkend="GdkColor">GdkColor</link> *color,
                                                         <link linkend="GdkPixmap">GdkPixmap</link> **pixmap);</programlisting>
<para>
Returns the current background type. If the background
type is <link linkend="PANEL-NO-BACKGROUND:CAPS"><literal>PANEL_NO_BACKGROUND</literal></link> both <parameter>color</parameter> and <parameter>pixmap</parameter> will
be unaffected. If the background type is <link linkend="PANEL-COLOR-BACKGROUND:CAPS"><literal>PANEL_COLOR_BACKGROUND</literal></link>
then <parameter>color</parameter> will contain the current panel background colour.
If the background type is <link linkend="PANEL-PIXMAP-BACKGROUND:CAPS"><literal>PANEL_PIXMAP_BACKGROUND</literal></link>, <parameter>pixmap</parameter> will
contain a pointer to a <link linkend="GdkPixmap"><type>GdkPixmap</type></link> which is a copy of the applet's
portion of the panel's background pixmap.
</para>
<!-- FIXME: give an example of how to use this --><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>color</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="GdkColor"><type>GdkColor</type></link> to be filled in.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixmap</parameter>&#160;:</term>
<listitem><simpara>Returned <link linkend="GdkPixmap."><type>GdkPixmap.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The background type.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-preferences-key" role="function">
<title>panel_applet_get_preferences_key ()</title>
<indexterm zone="panel-applet-get-preferences-key"><primary>panel_applet_get_preferences_key</primary></indexterm>
<programlisting><link linkend="gchar">gchar</link> *             panel_applet_get_preferences_key    (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Returns the GConf path to the directory containing the applet's
per-instance preference keys. Using this you may construct the
full path for the applet's preference keys. See
<xref linkend="panel-applet-Panel-Applet-GConf-Utilities" /> for
more information.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A GConf path.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-add-preferences" role="function">
<title>panel_applet_add_preferences ()</title>
<indexterm zone="panel-applet-add-preferences"><primary>panel_applet_add_preferences</primary></indexterm>
<programlisting><link linkend="void">void</link>                panel_applet_add_preferences        (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *schema_dir,
                                                         <link linkend="GError">GError</link> **opt_error);</programlisting>
<para>
Associates each schema in <parameter>schema_dir</parameter> with a key in the applet's
preferences directory (i.e. the directory returned by
<link linkend="panel-applet-get-preferences-key"><function>panel_applet_get_preferences_key()</function></link>). Each applet preference
should have an associated schema to ensure that the key has
a defined type, sane default and documentation.
</para>
<para>
If you pass <link linkend="NULL:CAPS"><literal>NULL</literal></link> for <parameter>opt_error</parameter>, this function will print
a warning message from any <link linkend="GError"><type>GError</type></link> which GConf may return.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>schema_dir</parameter>&#160;:</term>
<listitem><simpara>The GConf path where the applet's schemas are installed
e.g. /schemas/apps/my_applet
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opt_error</parameter>&#160;:</term>
<listitem><simpara>Optional <link linkend="GError."><type>GError.</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-flags" role="function">
<title>panel_applet_get_flags ()</title>
<indexterm zone="panel-applet-get-flags"><primary>panel_applet_get_flags</primary></indexterm>
<programlisting><link linkend="PanelAppletFlags">PanelAppletFlags</link>    panel_applet_get_flags              (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Retrieve the <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> associated with the applet.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The <link linkend="PanelAppletFlags."><type>PanelAppletFlags.</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-set-flags" role="function">
<title>panel_applet_set_flags ()</title>
<indexterm zone="panel-applet-set-flags"><primary>panel_applet_set_flags</primary></indexterm>
<programlisting><link linkend="void">void</link>                panel_applet_set_flags              (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         <link linkend="PanelAppletFlags">PanelAppletFlags</link> flags);</programlisting>
<para>
Set the <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> associated with the applet. See
<link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> for more details on the possible uses of
these flags.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelAppletFlags"><type>PanelAppletFlags</type></link> to associate.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-set-size-hints" role="function">
<title>panel_applet_set_size_hints ()</title>
<indexterm zone="panel-applet-set-size-hints"><primary>panel_applet_set_size_hints</primary></indexterm>
<programlisting><link linkend="void">void</link>                panel_applet_set_size_hints         (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="int">int</link> *size_hints,
                                                         <link linkend="int">int</link> n_elements,
                                                         <link linkend="int">int</link> base_size);</programlisting>
<para>
Set a list of desired size ranges for an applet with the
<link linkend="PANEL-APPLET-EXPAND-MAJOR:CAPS"><type>PANEL_APPLET_EXPAND_MAJOR</type></link> flags set. <parameter>size_hints</parameter> is an
array of (max, min) pairs where min(i) > max(i + 1).
</para>
<para>
The panel will endeavour to allocate the applet a size
in one of the (<parameter>base</parameter> + max, <parameter>base</parameter> + min) ranges.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size_hints</parameter>&#160;:</term>
<listitem><simpara>Array of size_hints.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_elements</parameter>&#160;:</term>
<listitem><simpara>Number of elements in the array. <emphasis>
Not</emphasis> the number of pairs.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>base_size</parameter>&#160;:</term>
<listitem><simpara>The base size of the applet.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-locked-down" role="function">
<title>panel_applet_get_locked_down ()</title>
<indexterm zone="panel-applet-get-locked-down"><primary>panel_applet_get_locked_down</primary></indexterm>
<programlisting><link linkend="gboolean">gboolean</link>            panel_applet_get_locked_down        (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Check if the <parameter>applet</parameter> is locked down. A locked down applet should not allow any change to its configuration.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<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.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-request-focus" role="function">
<title>panel_applet_request_focus ()</title>
<indexterm zone="panel-applet-request-focus"><primary>panel_applet_request_focus</primary></indexterm>
<programlisting><link linkend="void">void</link>                panel_applet_request_focus          (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         <link linkend="guint32">guint32</link> timestamp);</programlisting>
<para>
Set keyboard focus to <parameter>applet</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>timestamp</parameter>&#160;:</term>
<listitem><simpara>timestamp of the event triggering the window focus
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-control" role="function">
<title>panel_applet_get_control ()</title>
<indexterm zone="panel-applet-get-control"><primary>panel_applet_get_control</primary></indexterm>
<programlisting><link linkend="BonoboControl">BonoboControl</link> *     panel_applet_get_control            (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Retrieves the <link linkend="BonoboControl"><type>BonoboControl</type></link> associated with <parameter>applet</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="BonoboControl."><type>BonoboControl.</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-get-popup-component" role="function">
<title>panel_applet_get_popup_component ()</title>
<indexterm zone="panel-applet-get-popup-component"><primary>panel_applet_get_popup_component</primary></indexterm>
<programlisting><link linkend="BonoboUIComponent">BonoboUIComponent</link> * panel_applet_get_popup_component    (<link linkend="PanelApplet">PanelApplet</link> *applet);</programlisting>
<para>
Retrieves the <link linkend="BonoboUIComponent"><type>BonoboUIComponent</type></link> used for popup menus associated
with <parameter>applet</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>A <link linkend="BonoboUIComponent."><type>BonoboUIComponent.</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-setup-menu" role="function">
<title>panel_applet_setup_menu ()</title>
<indexterm zone="panel-applet-setup-menu"><primary>panel_applet_setup_menu</primary></indexterm>
<programlisting><link linkend="void">void</link>                panel_applet_setup_menu             (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *xml,
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Sets up a popup menu for <parameter>applet</parameter> described by the xml
string, <parameter>xml</parameter>. See <xref linkend="applet-writing" /> section
for a description of the format of the xml.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>xml</parameter>&#160;:</term>
<listitem><simpara>The xml character string describing the popup menu.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>verb_list</parameter>&#160;:</term>
<listitem><simpara>The list of <link linkend="BonoboUIVerbs"><type>BonoboUIVerbs</type></link> for the menu.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>The user data pointer for the menu.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-setup-menu-from-file" role="function">
<title>panel_applet_setup_menu_from_file ()</title>
<indexterm zone="panel-applet-setup-menu-from-file"><primary>panel_applet_setup_menu_from_file</primary></indexterm>
<programlisting><link linkend="void">void</link>                panel_applet_setup_menu_from_file   (<link linkend="PanelApplet">PanelApplet</link> *applet,
                                                         const <link linkend="gchar">gchar</link> *opt_datadir,
                                                         const <link linkend="gchar">gchar</link> *file,
                                                         const <link linkend="gchar">gchar</link> *opt_app_name,
                                                         const <link linkend="BonoboUIVerb">BonoboUIVerb</link> *verb_list,
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>
Sets up a popup menu for <parameter>applet</parameter> described by the xml
file, <parameter>file</parameter>. See <xref linkend="applet-writing" /> for a description of
the format of the xml.
</para><variablelist role="params">
<varlistentry><term><parameter>applet</parameter>&#160;:</term>
<listitem><simpara>A <link linkend="PanelApplet."><type>PanelApplet.</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opt_datadir</parameter>&#160;:</term>
<listitem><simpara>The data directory - i.e. ${prefix}/share (optional).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>file</parameter>&#160;:</term>
<listitem><simpara>The file's name.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>opt_app_name</parameter>&#160;:</term>
<listitem><simpara>The application's name (optional).
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>verb_list</parameter>&#160;:</term>
<listitem><simpara>The list of <link linkend="BonoboUIVerbs"><type>BonoboUIVerbs</type></link> for the menu.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>The user data pointer for the menu.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-factory-main" role="function">
<title>panel_applet_factory_main ()</title>
<indexterm zone="panel-applet-factory-main"><primary>panel_applet_factory_main</primary></indexterm>
<programlisting><link linkend="int">int</link>                 panel_applet_factory_main           (const <link linkend="gchar">gchar</link> *iid,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
A generic 'main' routine for applets. This should not normally be
used directly because it is invoked by <link linkend="PANEL-APPLET-BONOBO-FACTORY.:CAPS"><type>PANEL_APPLET_BONOBO_FACTORY.</type></link>
</para><variablelist role="params">
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The bonobo-activation iid of the factory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara>The factory callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>The factory user data pointer.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>0 on success, 1 on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-factory-main-closure" role="function">
<title>panel_applet_factory_main_closure ()</title>
<indexterm zone="panel-applet-factory-main-closure"><primary>panel_applet_factory_main_closure</primary></indexterm>
<programlisting><link linkend="int">int</link>                 panel_applet_factory_main_closure   (const <link linkend="gchar">gchar</link> *iid,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="GClosure">GClosure</link> *closure);</programlisting>
<para>
A generic 'main' routine for applets. This should not normally be
used directly because it is invoked by <link linkend="PANEL-APPLET-BONOBO-FACTORY.:CAPS"><type>PANEL_APPLET_BONOBO_FACTORY.</type></link>
</para><variablelist role="params">
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The bonobo-activation iid of the factory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara>The factory callback closure.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>0 on success, 1 on failure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="PANEL-APPLET-BONOBO-FACTORY:CAPS" role="macro">
<title>PANEL_APPLET_BONOBO_FACTORY()</title>
<indexterm zone="PANEL-APPLET-BONOBO-FACTORY:CAPS"><primary>PANEL_APPLET_BONOBO_FACTORY</primary></indexterm>
<programlisting>#define             PANEL_APPLET_BONOBO_FACTORY(iid, type, name, version, callback, data)</programlisting>
<para>
Defines a 'main' routine for the applet factory.
</para><variablelist role="params">
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The bonobo-activation iid of the factory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara>The applet ID string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>version</parameter>&#160;:</term>
<listitem><simpara>The applet version string.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara>The factory callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>The factory user data pointer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-shlib-factory" role="function">
<title>panel_applet_shlib_factory ()</title>
<indexterm zone="panel-applet-shlib-factory"><primary>panel_applet_shlib_factory</primary></indexterm>
<programlisting><link linkend="Bonobo-Unknown">Bonobo_Unknown</link>      panel_applet_shlib_factory          (const <link linkend="char">char</link> *iid,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
                                                         <link linkend="PanelAppletFactoryCallback">PanelAppletFactoryCallback</link> callback,
                                                         <link linkend="gpointer">gpointer</link> user_data,
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);</programlisting>
<para>
A generic shared library factory routine for applets. This should not
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>
</para><variablelist role="params">
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The bonobo-activation iid of the factory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>poa</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PortableServer-POA"><type>PortableServer_POA</type></link> passed to the shlib factory
callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>impl_ptr</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="gpointer"><type>gpointer</type></link> passed to the shlib factory callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara>The applet factory callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>The factory user data pointer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ev</parameter>&#160;:</term>
<listitem><simpara>The $CORBA_Environment passed to the shlib factory callback.
</simpara></listitem></varlistentry>
<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
callback.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="panel-applet-shlib-factory-closure" role="function">
<title>panel_applet_shlib_factory_closure ()</title>
<indexterm zone="panel-applet-shlib-factory-closure"><primary>panel_applet_shlib_factory_closure</primary></indexterm>
<programlisting><link linkend="Bonobo-Unknown">Bonobo_Unknown</link>      panel_applet_shlib_factory_closure  (const <link linkend="char">char</link> *iid,
                                                         <link linkend="GType">GType</link> applet_type,
                                                         <link linkend="PortableServer-POA">PortableServer_POA</link> poa,
                                                         <link linkend="gpointer">gpointer</link> impl_ptr,
                                                         <link linkend="GClosure">GClosure</link> *closure,
                                                         <link linkend="CORBA-Environment">CORBA_Environment</link> *ev);</programlisting>
<para>
A generic shared library factory routine for applets. This should not
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>
</para><variablelist role="params">
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The bonobo-activation iid of the factory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>applet_type</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>poa</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="PortableServer-POA"><type>PortableServer_POA</type></link> passed to the shlib factory
callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>impl_ptr</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="gpointer"><type>gpointer</type></link> passed to the shlib factory callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>closure</parameter>&#160;:</term>
<listitem><simpara>The applet factory closure.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ev</parameter>&#160;:</term>
<listitem><simpara>The $CORBA_Environment passed to the shlib factory callback.
</simpara></listitem></varlistentry>
<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
callback.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="PANEL-APPLET-BONOBO-SHLIB-FACTORY:CAPS" role="macro">
<title>PANEL_APPLET_BONOBO_SHLIB_FACTORY()</title>
<indexterm zone="PANEL-APPLET-BONOBO-SHLIB-FACTORY:CAPS"><primary>PANEL_APPLET_BONOBO_SHLIB_FACTORY</primary></indexterm>
<programlisting>#define             PANEL_APPLET_BONOBO_SHLIB_FACTORY(iid, type, descr, callback, data)</programlisting>
<para>
Defines a Bonobo Activation shared library plugin and associated
factory callback.
</para><variablelist role="params">
<varlistentry><term><parameter>iid</parameter>&#160;:</term>
<listitem><simpara>The bonobo-activation iid of the factory.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GType"><type>GType</type></link> to instantiate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>descr</parameter>&#160;:</term>
<listitem><simpara>A description of the applet.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>callback</parameter>&#160;:</term>
<listitem><simpara>The factory callback.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&#160;:</term>
<listitem><simpara>The factory user data pointer.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="PanelApplet.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="PanelApplet-change-background" role="signal"><title>The <literal>&quot;change-background&quot;</literal> signal</title>
<indexterm zone="PanelApplet-change-background"><primary>PanelApplet::change-background</primary></indexterm>
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link>              *panelapplet,
                                                        <link linkend="PanelAppletBackgroundType">PanelAppletBackgroundType</link> arg1,
                                                        <link linkend="GdkColor">GdkColor</link>                 *arg2,
                                                        <link linkend="GdkPixmap">GdkPixmap</link>                *arg3,
                                                        <link linkend="gpointer">gpointer</link>                  user_data)        : Run Last</programlisting>
<para>
Emitted when the background of the panel changes. Use <parameter>type</parameter> to
determine which, if any, of <parameter>color</parameter> and <parameter>pimxap</parameter> is valid.
</para><variablelist role="params">
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
<listitem><simpara>The object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg2</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg3</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="PanelApplet-change-orient" role="signal"><title>The <literal>&quot;change-orient&quot;</literal> signal</title>
<indexterm zone="PanelApplet-change-orient"><primary>PanelApplet::change-orient</primary></indexterm>
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link> *panelapplet,
                                                        <link linkend="guint">guint</link>        arg1,
                                                        <link linkend="gpointer">gpointer</link>     user_data)        : Run Last</programlisting>
<para>
Emitted when the orientation of the panel changes.
</para><variablelist role="params">
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
<listitem><simpara>The object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>orient</parameter>&#160;:</term>
<listitem><simpara>The new <link linkend="PanelAppletOrient"><type>PanelAppletOrient</type></link> of the applet.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="PanelApplet-change-size" role="signal"><title>The <literal>&quot;change-size&quot;</literal> signal</title>
<indexterm zone="PanelApplet-change-size"><primary>PanelApplet::change-size</primary></indexterm>
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link> *panelapplet,
                                                        <link linkend="gint">gint</link>         arg1,
                                                        <link linkend="gpointer">gpointer</link>     user_data)        : Run Last</programlisting>
<para>
Emitted when the size of the panel changes.
</para>
<para>
Note: this is different for size negotiation which is handled by
<link linkend="size-request"><function>size_request()</function></link> and <link linkend="size-allocate"><function>size_allocate()</function></link> as usual. This signal should
be used to determine what font size or widget layout to use
depending on the size of the panel. See <link linkend="panel-applet-get-size"><function>panel_applet_get_size()</function></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
<listitem><simpara>The object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>size</parameter>&#160;:</term>
<listitem><simpara>The size hint of the panel.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</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>
<indexterm zone="PanelApplet-move-focus-out-of-applet"><primary>PanelApplet::move-focus-out-of-applet</primary></indexterm>
<programlisting><link linkend="void">void</link>                user_function                      (<link linkend="PanelApplet">PanelApplet</link>     *panelapplet,
                                                        <link linkend="GtkDirectionType">GtkDirectionType</link> arg1,
                                                        <link linkend="gpointer">gpointer</link>         user_data)        : Run Last / Action</programlisting>
<para>
Emitted when the applet has lost focus. This signal is used internally and is not meant to be used by applets themselves.
</para><variablelist role="params">
<varlistentry><term><parameter>panelapplet</parameter>&#160;:</term>
<listitem><simpara>The object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>direction</parameter>&#160;:</term>
<listitem><simpara>The direction of focus movement.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>

</refentry>
