MplPanelClutter

MplPanelClutter — Class for panels using Clutter

Synopsis

                    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);

Object Hierarchy

  GObject
   +----MplPanelClient
         +----MplPanelClutter

Description

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;
  }

Details

MplPanelClutter

typedef struct _MplPanelClutter MplPanelClutter;

Panel object for Clutter-based panels.


MplPanelClutterClass

typedef struct {
} MplPanelClutterClass;

Class struct for MplPanelClutter.


mpl_panel_clutter_new ()

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.

name :

canonical name of the panel

tooltip :

tooltip for the associated Toolbar button

stylesheet :

stylesheet for the associated Toolbar button

button_style :

css style id for the button style

with_toolbar_service :

whether the panel will be using any Toolbar services (e.g., the launching API)

Returns :

new MplPanelClient object.

mpl_panel_clutter_get_stage ()

ClutterActor *      mpl_panel_clutter_get_stage         (MplPanelClutter *panel);

Returns the top-level ClutterActor of the panel.

panel :

MplPanelClutter

Returns :

ClutterActor.

mpl_panel_clutter_track_actor_height ()

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.

panel :

MplPanelClutter

actor :

ClutterActor

mpl_panel_clutter_load_base_style ()

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).


mpl_panel_clutter_init_lib ()

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().

argc :

a pointer to the number of command line arguments. [inout]

argv :

a pointer to the array of command line arguments. [array length=argc][inout length=argc][allow-none length=argc]

mpl_panel_clutter_init_with_gtk ()

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().

argc :

a pointer to the number of command line arguments. [inout]

argv :

a pointer to the array of command line arguments. [array length=argc][inout length=argc][allow-none length=argc]

mpl_panel_clutter_setup_events_with_gtk ()

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().

panel :

MplPanelClutter

mpl_panel_clutter_setup_events_with_gtk_for_xid ()

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.

xid :

the stage window

mpl_panel_clutter_set_child ()

void                mpl_panel_clutter_set_child         (MplPanelClutter *panel,
                                                         ClutterActor *child);

Sets child as the top-level ClutterActor.

panel :

MplPanelClutter

child :

ClutterActor