| Top |
| gboolean | (*PanelAppletFactoryCallback) () |
| #define | PANEL_APPLET_OUT_PROCESS_FACTORY() |
| #define | PANEL_APPLET_IN_PROCESS_FACTORY() |
| int | panel_applet_factory_main () |
This API is used to create an applet factory. You need to call one and only one of these functions to get applets working in your binary.
gboolean (*PanelAppletFactoryCallback) (PanelApplet *applet,const gchar *iid,gpointer user_data);
The type used for callbacks after. The callback will usually check that iid
is a valid applet type identifier for the applet factory, and will then fill
applet
with widgets, connect to signals, etc.
applet |
a newly-created PanelApplet. |
|
iid |
identifier of the requested applet type. |
|
user_data |
user data. |
#define PANEL_APPLET_OUT_PROCESS_FACTORY(factory_id, type, callback, data)
Convenience macro providing a main() function for an out-of-process applet.
Internally, it will call panel_applet_factory_main() to create the
factory_id
applet factory.
Applet instances created by the applet factory will use applet_type
as
GType. Unless you subclass PanelApplet, you should use PANEL_TYPE_APPLET
as applet_type
.
On creation of the applet instances, callback
is called to setup the
applet. If callback
returns FALSE, the creation of the applet instance is
cancelled.
It can only be used once, and is incompatible with the use of
PANEL_APPLET_IN_PROCESS_FACTORY and panel_applet_factory_main().
factory_id |
identifier of an applet factory. |
|
type |
GType of the applet this factory creates. |
|
callback |
a |
[scope call] |
data |
callback data. |
[closure] |
#define PANEL_APPLET_IN_PROCESS_FACTORY(factory_id, type, callback, data)
Convenience macro providing the symbol needed to automatically register the
factory_id
applet factory for an in-process applet.
Applet instances created by the applet factory will use applet_type
as
GType. Unless you subclass PanelApplet, you should use PANEL_TYPE_APPLET
as applet_type
.
On creation of the applet instances, callback
is called to setup the
applet. If callback
returns FALSE, the creation of the applet instance is
cancelled.
It can only be used once, and is incompatible with the use of
PANEL_APPLET_OUT_PROCESS_FACTORY and panel_applet_factory_main().
factory_id |
identifier of an applet factory. |
|
type |
GType of the applet this factory creates. |
|
callback |
a |
[scope call] |
data |
callback data. |
[closure] |
int panel_applet_factory_main (const gchar *factory_id,GType applet_type,PanelAppletFactoryCallback callback,gpointer data);
Creates the applet factory for factory_id
, so that the factory can create
instances of the applet types it is associated with.
Applet instances created by the applet factory will use applet_type
as
GType. Unless you subclass PanelApplet, you should use PANEL_TYPE_APPLET
as applet_type
.
On creation of the applet instances, callback
is called to setup the
applet. If callback
returns FALSE, the creation of the applet instance is
cancelled.
If using C, it is recommended to use PANEL_APPLET_OUT_PROCESS_FACTORY
instead as it will create a main() function for you.
It can only be used once, and is incompatible with the use of
PANEL_APPLET_IN_PROCESS_FACTORY and PANEL_APPLET_OUT_PROCESS_FACTORY.