MplPanelClient

MplPanelClient — Base abstract class for all panels.

Synopsis

                    MplPanelClient;
                    MplPanelClientClass;
void                mpl_panel_client_show               (MplPanelClient *panel);
void                mpl_panel_client_hide               (MplPanelClient *panel);
void                mpl_panel_client_set_height_request (MplPanelClient *panel,
                                                         guint height);
guint               mpl_panel_client_get_height_request (MplPanelClient *panel);
void                mpl_panel_client_request_focus      (MplPanelClient *panel);
void                mpl_panel_client_request_button_style
                                                        (MplPanelClient *panel,
                                                         const gchar *style);
void                mpl_panel_client_request_tooltip    (MplPanelClient *panel,
                                                         const gchar *tooltip);
void                mpl_panel_client_request_button_state
                                                        (MplPanelClient *panel,
                                                         MnbButtonState state);
void                mpl_panel_client_request_modality   (MplPanelClient *panel,
                                                         gboolean modal);
void                mpl_panel_client_unload             (MplPanelClient *panel);
gboolean            mpl_panel_client_launch_application (MplPanelClient *panel,
                                                         const gchar *commandline);
gboolean            mpl_panel_client_launch_application_from_desktop_file
                                                        (MplPanelClient *panel,
                                                         const gchar *desktop,
                                                         GList *files);
gboolean            mpl_panel_client_launch_default_application_for_uri
                                                        (MplPanelClient *panel,
                                                         const gchar *uri);
Window              mpl_panel_client_get_xid            (MplPanelClient *panel);
void                mpl_panel_client_ready              (MplPanelClient *panel);
gboolean            mpl_panel_client_set_delayed_ready  (MplPanelClient *panel,
                                                         gboolean delayed);
gboolean            mpl_panel_client_is_windowless      (MplPanelClient *panel);
enum                MnbButtonState;
#define             MPL_PANEL_DBUS_NAME_PREFIX
#define             MPL_PANEL_DBUS_PATH_PREFIX
#define             MPL_PANEL_DBUS_INTERFACE
#define             MPL_TOOLBAR_DBUS_PATH
#define             MPL_TOOLBAR_DBUS_NAME
#define             MPL_TOOLBAR_DBUS_INTERFACE
#define             MPL_PANEL_MYZONE
#define             MPL_PANEL_STATUS
#define             MPL_PANEL_ZONES
#define             MPL_PANEL_INTERNET
#define             MPL_PANEL_MEDIA
#define             MPL_PANEL_APPLICATIONS
#define             MPL_PANEL_PEOPLE
#define             MPL_PANEL_PASTEBOARD
#define             MPL_PANEL_NETWORK
#define             MPL_PANEL_BLUETOOTH
#define             MPL_PANEL_POWER
#define             MPL_PANEL_TEST

Object Hierarchy

  GObject
   +----MplPanelClient
         +----MplPanelClutter
         +----MplPanelGtk
         +----MplPanelWindowless

Properties

  "button-style"             gchar*                : Read / Write / Construct
  "delayed-ready"            gboolean              : Read / Write / Construct
  "name"                     gchar*                : Read / Write / Construct Only
  "stylesheet"               gchar*                : Read / Write / Construct Only
  "toolbar-service"          gboolean              : Read / Write / Construct Only
  "tooltip"                  gchar*                : Read / Write / Construct
  "windowless"               gboolean              : Read / Write / Construct
  "xid"                      guint                 : Read / Write / Construct

Signals

  "hide"                                           : Run Last
  "hide-begin"                                     : Run Last
  "hide-end"                                       : Run Last
  "ready"                                          : Run Last
  "request-button-state"                           : Run Last
  "request-button-style"                           : Run Last
  "request-focus"                                  : Run Last
  "request-modality"                               : Run Last
  "request-tooltip"                                : Run Last
  "set-position"                                   : Run First
  "set-size"                                       : Run First
  "show"                                           : Run Last
  "show-begin"                                     : Run Last
  "show-end"                                       : Run Last
  "unload"                                         : Run Last

Description

MplPanelClient is a base abstract class for all Panels.

Details

MplPanelClient

typedef struct _MplPanelClient MplPanelClient;

Base class for panels.


MplPanelClientClass

typedef struct {
  /*
   * Public signal closures.
   */
  void     (*unload)         (MplPanelClient *panel);
  void     (*set_size)       (MplPanelClient *panel, guint width, guint height);
  void     (*set_position)   (MplPanelClient *panel, gint x, gint y);
  void     (*show)           (MplPanelClient *panel);
  void     (*show_begin)     (MplPanelClient *panel);
  void     (*show_end)       (MplPanelClient *panel);
  void     (*hide)           (MplPanelClient *panel);
  void     (*hide_begin)     (MplPanelClient *panel);
  void     (*hide_end)       (MplPanelClient *panel);
} MplPanelClientClass;

Base class for panels.

unload ()

signal closure for the "unload" signal

set_size ()

signal closure for the "set-size" signal

set_position ()

signal closure for the "set-position" signal

show ()

signal closure for the "show" signal

show_begin ()

signal closure for the "show_begin" signal

show_end ()

signal closure for the "show_end" signal

hide ()

signal closure for the "hide" signal

hide_begin ()

signal closure for the "hide_begin" signal

hide_end ()

signal closure for the "hide_end" signal

mpl_panel_client_show ()

void                mpl_panel_client_show               (MplPanelClient *panel);

Shows the given panel.

panel :

MplPanelClient

mpl_panel_client_hide ()

void                mpl_panel_client_hide               (MplPanelClient *panel);

Hides the given panel.

panel :

MplPanelClient

mpl_panel_client_set_height_request ()

void                mpl_panel_client_set_height_request (MplPanelClient *panel,
                                                         guint height);

Sets the height request for given panel; this is the size the panel wishes to be. This is a request only, i.e., the panel can be smaller if the request cannot be honored due to screen size, etc.

panel :

MplPanelClient

height :

height request

mpl_panel_client_get_height_request ()

guint               mpl_panel_client_get_height_request (MplPanelClient *panel);

Returns the height request previously set with mpl_panel_client_set_height_request().

panel :

MplPanelClient

Returns :

requested height in pixels.

mpl_panel_client_request_focus ()

void                mpl_panel_client_request_focus      (MplPanelClient *panel);

Requests that the given panel be given keyboard focus.

panel :

MplPanelClient

mpl_panel_client_request_button_style ()

void                mpl_panel_client_request_button_style
                                                        (MplPanelClient *panel,
                                                         const gchar *style);

Requests that the supplied style is applied to the Toolbar button associated with the given panel.

panel :

MplPanelClient

style :

css id of the style.

mpl_panel_client_request_tooltip ()

void                mpl_panel_client_request_tooltip    (MplPanelClient *panel,
                                                         const gchar *tooltip);

Requests that the string is used as the tooltip for the Toolbar button associated with the given panel.

panel :

MplPanelClient

tooltip :

tooltip

mpl_panel_client_request_button_state ()

void                mpl_panel_client_request_button_state
                                                        (MplPanelClient *panel,
                                                         MnbButtonState state);

Requests that the Toolbar button associated with the given panel is turned into the supplied state.

panel :

MplPanelClient

state :

MnbButtonState

mpl_panel_client_request_modality ()

void                mpl_panel_client_request_modality   (MplPanelClient *panel,
                                                         gboolean modal);

Requests that the given panel is put into a modal state; while a panel is in modal state, the user will not be able to close it.

panel :

MplPanelClient

modal :

gboolean indicating whether panel should be modal

mpl_panel_client_unload ()

void                mpl_panel_client_unload             (MplPanelClient *panel);

Unloads the given panel.

panel :

MplPanelClient

mpl_panel_client_launch_application ()

gboolean            mpl_panel_client_launch_application (MplPanelClient *panel,
                                                         const gchar *commandline);

Launches the program specified by commandline with startup notification support.

panel :

MplPanelClient

commandline :

commandline

Returns :

TRUE if there was no error.

mpl_panel_client_launch_application_from_desktop_file ()

gboolean            mpl_panel_client_launch_application_from_desktop_file
                                                        (MplPanelClient *panel,
                                                         const gchar *desktop,
                                                         GList *files);

Launches the program specified by desktop file.

panel :

MplPanelClient

desktop :

path to desktop file

files :

GList of files to be passed as arugments, or NULL

Returns :

TRUE if there was no error.

mpl_panel_client_launch_default_application_for_uri ()

gboolean            mpl_panel_client_launch_default_application_for_uri
                                                        (MplPanelClient *panel,
                                                         const gchar *uri);

Launches the default program handling the given uri type.

panel :

MplPanelClient

uri :

path to desktop file

Returns :

TRUE if there was no error.

mpl_panel_client_get_xid ()

Window              mpl_panel_client_get_xid            (MplPanelClient *panel);

Returns the xid of the asociated window.

panel :

MplPanelClient

Returns :

associated window xid.

mpl_panel_client_ready ()

void                mpl_panel_client_ready              (MplPanelClient *panel);

Calling this function indicates to the Toolbar object that the panel is ready to be shown. This function should be used in conjunction with mpl_panel_client_set_delayed_ready().

panel :

MplPanelClient

mpl_panel_client_set_delayed_ready ()

gboolean            mpl_panel_client_set_delayed_ready  (MplPanelClient *panel,
                                                         gboolean delayed);

Sets the value of the delayed-ready property. When this property is set to TRUE the "ready" signal will not be emitted until the panel application calls mpl_panel_client_ready().

Note: The delayed-ready property can only be set before the main loop is started; calling this function once the main loop has been started will result in a critical warning.

panel :

a MplPanelClient

delayed :

boolean value for the delayed-ready property.

Returns :

TRUE if the call was successful.

mpl_panel_client_is_windowless ()

gboolean            mpl_panel_client_is_windowless      (MplPanelClient *panel);

Returns TRUE if the associate panel is windowless (windowless panels have a non-interactive button on the Toolbar).

panel :

MplPanelClient

Returns :

TRUE if the panel does not have a panel associated with it.

enum MnbButtonState

typedef enum
{
  MNB_BUTTON_NORMAL      = 0,
  MNB_BUTTON_HIDDEN      = 0x1,
  MNB_BUTTON_INSENSITIVE = 0x2
} MnbButtonState;

State of the Toolbar button; values are or-able.

MNB_BUTTON_NORMAL

normal (visible, interactive) button state

MNB_BUTTON_HIDDEN

button should not be visible to user

MNB_BUTTON_INSENSITIVE

button should be insensitive to user actions

MPL_PANEL_DBUS_NAME_PREFIX

#define MPL_PANEL_DBUS_NAME_PREFIX "com.meego.UX.Shell.Panels."

Common prefix used by Panel dbus service names. For example, service for panel 'foo' will have the name MPL_PANEL_DBUS_NAME_PREFIX + 'foo'.


MPL_PANEL_DBUS_PATH_PREFIX

#define MPL_PANEL_DBUS_PATH_PREFIX "/com/meego/UX/Shell/Panels/"

Common prefix used by Panel dbus object paths. For example, the dbus object for panel 'foo' will be found at MPL_PANEL_DBUS_PATH_PREFIX + 'foo'.


MPL_PANEL_DBUS_INTERFACE

#define MPL_PANEL_DBUS_INTERFACE   "com.meego.UX.Shell.Panel"

Dbus interface for Panel functionality.


MPL_TOOLBAR_DBUS_PATH

#define MPL_TOOLBAR_DBUS_PATH      "/com/meego/UX/Shell/Toolbar"

Path for the Toolbar dbus object.


MPL_TOOLBAR_DBUS_NAME

#define MPL_TOOLBAR_DBUS_NAME      "com.meego.UX.Shell.Toolbar"

Name of the dbus Toolbar service.


MPL_TOOLBAR_DBUS_INTERFACE

#define MPL_TOOLBAR_DBUS_INTERFACE "com.meego.UX.Shell.Toolbar"

Dbus interface for Toolbar functionality.


MPL_PANEL_MYZONE

#define MPL_PANEL_MYZONE       "myzone"

Canonical name of the myzone panel.


MPL_PANEL_STATUS

#define MPL_PANEL_STATUS       "status"

Canonical name of the status panel.


MPL_PANEL_ZONES

#define MPL_PANEL_ZONES        "zones"

Canonical name of the zones panel.


MPL_PANEL_INTERNET

#define MPL_PANEL_INTERNET     "internet"

Canonical name of the internet panel.


MPL_PANEL_MEDIA

#define MPL_PANEL_MEDIA        "media"

Canonical name of the media panel.


MPL_PANEL_APPLICATIONS

#define MPL_PANEL_APPLICATIONS "applications"

Canonical name of the applications panel.


MPL_PANEL_PEOPLE

#define MPL_PANEL_PEOPLE       "people"

Canonical name of the people panel.


MPL_PANEL_PASTEBOARD

#define MPL_PANEL_PASTEBOARD   "pasteboard"

Canonical name of the pasteboard panel.


MPL_PANEL_NETWORK

#define MPL_PANEL_NETWORK      "network"

Canonical name of the network panel.


MPL_PANEL_BLUETOOTH

#define MPL_PANEL_BLUETOOTH    "bluetooth"

Canonical name of the bluetooth panel.


MPL_PANEL_POWER

#define MPL_PANEL_POWER        "power"

Canonical name of the power icon.


MPL_PANEL_TEST

#define MPL_PANEL_TEST         "test"

Canonical name for a test panel.

Property Details

The "button-style" property

  "button-style"             gchar*                : Read / Write / Construct

Button style.

Default value: NULL


The "delayed-ready" property

  "delayed-ready"            gboolean              : Read / Write / Construct

Whether emission of 'ready' signal should be delayed until later.

Default value: FALSE


The "name" property

  "name"                     gchar*                : Read / Write / Construct Only

Name.

Default value: NULL


The "stylesheet" property

  "stylesheet"               gchar*                : Read / Write / Construct Only

Stylesheet.

Default value: NULL


The "toolbar-service" property

  "toolbar-service"          gboolean              : Read / Write / Construct Only

Whether toobar service should be enabled.

Default value: FALSE


The "tooltip" property

  "tooltip"                  gchar*                : Read / Write / Construct

Tooltip.

Default value: NULL


The "windowless" property

  "windowless"               gboolean              : Read / Write / Construct

Panel without window.

Default value: FALSE


The "xid" property

  "xid"                      guint                 : Read / Write / Construct

XID.

Default value: 0

Signal Details

The "hide" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::show signal is emitted when the panel is about to be hidden; the actual hiding is implemented by the signal closure.

panel :

panel that received the signal

user_data :

user data set when the signal handler was connected.

The "hide-begin" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::hide-begin signal is emitted when the Toolbar is about to start the panel hide animation.

panel :

panel that received the signal

user_data :

user data set when the signal handler was connected.

The "hide-end" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::hide-end signal is emitted when the panel hide animation has finished.

panel :

panel that received the signal

user_data :

user data set when the signal handler was connected.

The "ready" signal

void                user_function                      (MplPanelClient *mplpanelclient,
                                                        gpointer        user_data)           : Run Last

mplpanelclient :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "request-button-state" signal

void                user_function                      (MplPanelClient *mplpanelclient,
                                                        gint            arg1,
                                                        gpointer        user_data)           : Run Last

mplpanelclient :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "request-button-style" signal

void                user_function                      (MplPanelClient *mplpanelclient,
                                                        gchar          *arg1,
                                                        gpointer        user_data)           : Run Last

mplpanelclient :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "request-focus" signal

void                user_function                      (MplPanelClient *mplpanelclient,
                                                        gpointer        user_data)           : Run Last

mplpanelclient :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "request-modality" signal

void                user_function                      (MplPanelClient *mplpanelclient,
                                                        gboolean        arg1,
                                                        gpointer        user_data)           : Run Last

mplpanelclient :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "request-tooltip" signal

void                user_function                      (MplPanelClient *mplpanelclient,
                                                        gchar          *arg1,
                                                        gpointer        user_data)           : Run Last

mplpanelclient :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "set-position" signal

void                user_function                      (MplPanelClient *panel,
                                                        gint            x,
                                                        gint            y,
                                                        gpointer        user_data)      : Run First

The ::set-position signal is emitted when the panel is being moved; the actual moving of the panel is implemented by the signal closure.

panel :

panel that received the signal

x :

new x coordinate of the panel

y :

new y coordinate of the panel

user_data :

user data set when the signal handler was connected.

The "set-size" signal

void                user_function                      (MplPanelClient *panel,
                                                        guint           width,
                                                        guint           height,
                                                        gpointer        user_data)      : Run First

The ::set-size signal is emitted when the panel is being resized; the actual resizing is implemented by the signal closure.

panel :

panel that received the signal

width :

new width of the panel

height :

new height of the panel

user_data :

user data set when the signal handler was connected.

The "show" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::show signal is emitted when the panel is about to be shown; the actual showing is implemented by the signal closure.

panel :

panel that received the signal

user_data :

user data set when the signal handler was connected.

The "show-begin" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::show-begin signal is emitted when the Toolbar is about to start the panel show animation.

panel :

panel that received the signal

user_data :

user data set when the signal handler was connected.

The "show-end" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::show-end signal is emitted when the panel show animation has finished.

panel :

panel that received the signal

user_data :

user data set when the signal handler was connected.

The "unload" signal

void                user_function                      (MplPanelClient *panel,
                                                        gpointer        user_data)      : Run Last

The ::unload signal is emitted when the panel is being unloaded from memory; the actual unloading is done by the signal closure.

panel :

panel that received the signal.

user_data :

user data set when the signal handler was connected.