| Meego Panel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
MplPanelClutter; MplPanelClutterClass; MplPanelClient * mpl_panel_clutter_new (const gchar *name,const gchar *tooltip,const gchar *stylesheet,const gchar *button_style,gboolean with_toolbar_service); ClutterActor * mpl_panel_clutter_get_stage (MplPanelClutter *panel); void mpl_panel_clutter_track_actor_height (MplPanelClutter *panel,ClutterActor *actor); void mpl_panel_clutter_load_base_style (void); void mpl_panel_clutter_init_lib (gint *argc,gchar ***argv); void mpl_panel_clutter_init_with_gtk (gint *argc,gchar ***argv); void mpl_panel_clutter_setup_events_with_gtk (MplPanelClutter *panel); void mpl_panel_clutter_setup_events_with_gtk_for_xid (Window xid); void mpl_panel_clutter_set_child (MplPanelClutter *panel,ClutterActor *child);
MplPanelClutter is a class for all Panels that implement their UI using Clutter. A minimal Panel implementation using MplPanelClutter would look as follows:
#include <meego-panel/mpl-panel-clutter.h>
int
main (int argc, char **argv)
{
MplPanelClient *client;
ClutterActor *contents;
mpl_panel_clutter_init_lib (&argc, &argv);
client = mpl_panel_clutter_new ("mypanel",
"this is mypanel",
"somewhere/mypanel-button.css",
"mypanel-button",
FALSE);
/ * create the content actor for your panel * /
contents = make_my_panel_conents ();
mpl_panel_clutter_set_child (MPL_PANEL_CLUTTER (client), contents);
clutter_main ();
return 0;
}
typedef struct _MplPanelClutter MplPanelClutter;
Panel object for Clutter-based panels.
MplPanelClient * mpl_panel_clutter_new (const gchar *name,const gchar *tooltip,const gchar *stylesheet,const gchar *button_style,gboolean with_toolbar_service);
Constructs a new MplPanelGtk object.
|
canonical name of the panel |
|
tooltip for the associated Toolbar button |
|
stylesheet for the associated Toolbar button |
|
css style id for the button style |
|
whether the panel will be using any Toolbar services (e.g., the launching API) |
Returns : |
new MplPanelClient object. |
ClutterActor * mpl_panel_clutter_get_stage (MplPanelClutter *panel);
Returns the top-level ClutterActor of the panel.
|
MplPanelClutter |
Returns : |
ClutterActor. |
void mpl_panel_clutter_track_actor_height (MplPanelClutter *panel,ClutterActor *actor);
Sets up the panel for dynamically matching its height to that of the supplied actor (e.g., the top-level panel widget).
Passing NULL for actor on a subsequent call we terminated the height tracking.
|
MplPanelClutter |
|
ClutterActor |
void mpl_panel_clutter_load_base_style (void);
Loads the base css style for the Panel. This function is called automatically when the panel is constructed, so it is rarely necessary to call this from the panel application. Calling this function mutliple times is safe (nop).
void mpl_panel_clutter_init_lib (gint *argc,gchar ***argv);
Initialializes the libmeego-panel library when used in a Clutter-based
panel that do not use Gtk (panels that also use Gtk should use
mpl_panel_clutter_init_with_gtk() instead).
This function calls clutter_init().
|
a pointer to the number of command line arguments. [inout] |
|
a pointer to the array of command line arguments. [array length=argc][inout length=argc][allow-none length=argc] |
void mpl_panel_clutter_init_with_gtk (gint *argc,gchar ***argv);
Initialializes the libmeego-panel library when used in a Clutter-based
panel that also use Gtk (panels that only use Clutter should use
mpl_panel_clutter_init_lib() instead).
This function calls gtk_init() and clutter_init().
|
a pointer to the number of command line arguments. [inout] |
|
a pointer to the array of command line arguments. [array length=argc][inout length=argc][allow-none length=argc] |
void mpl_panel_clutter_setup_events_with_gtk
(MplPanelClutter *panel);
Sets up X event handling in panels that use both Clutter and Gtk; for such
panel the library needs to be initialized with
mpl_panel_clutter_init_with_gtk().
|
MplPanelClutter |
void mpl_panel_clutter_setup_events_with_gtk_for_xid
(Window xid);
Sets up X event handling in panels that use both Clutter and Gtk; for such
panel the library needs to be initialized with
mpl_panel_clutter_init_with_gtk().
This is a convenience function for panels that implement stanalone mode
(i.e., without mutter-meego and the associate panel machinery) for ease
of developement and testing. In normal mode, use
mpl_panel_clutter_setup_events_with_gtk() instead.
|
the stage window |
void mpl_panel_clutter_set_child (MplPanelClutter *panel,ClutterActor *child);
Sets child as the top-level ClutterActor.
|
MplPanelClutter |
|
ClutterActor |