CcShell

CcShell — Abstract class representing the Control Center shell

Synopsis

                    CcShell;
                    CcShellClass;
CcPanel*            cc_shell_get_active_panel           (CcShell *shell);
void                cc_shell_set_active_panel           (CcShell *shell,
                                                         CcPanel *panel);
gboolean            cc_shell_set_active_panel_from_id   (CcShell *shell,
                                                         const gchar *id,
                                                         GError **error);

Description

CcShell is an abstract class that represents an instance of a control center shell. It provides access to some of the properties of the shell that panels will need to read or change. When a panel is created it has an instance of CcShell available that represents the current shell.

Details

CcShell

typedef struct {
} CcShell;

The contents of this struct are private should not be accessed directly.


CcShellClass

typedef struct {
  /* vfuncs */
  gboolean (*set_active_panel_from_id) (CcShell      *shell,
                                        const gchar  *id,
                                        GError      **error);
} CcShellClass;

set_active_panel_from_id ()

virtual function to set the active panel from an id string

cc_shell_get_active_panel ()

CcPanel*            cc_shell_get_active_panel           (CcShell *shell);

Get the current active panel

shell :

A CcShell

Returns :

a CcPanel or NULL if no panel is active

cc_shell_set_active_panel ()

void                cc_shell_set_active_panel           (CcShell *shell,
                                                         CcPanel *panel);

Set the current active panel. If panel is NULL, then the shell is returned to a state where no panel is being displayed (for example, the list of panels may be shown instead).

shell :

A CcShell

panel :

A CcPanel

cc_shell_set_active_panel_from_id ()

gboolean            cc_shell_set_active_panel_from_id   (CcShell *shell,
                                                         const gchar *id,
                                                         GError **error);

Find a panel corresponding to the specified id and set it as active.

shell :

A CcShell

id :

the ID of the panel to set as active

error :

A GError

Returns :

TRUE if the panel was found and set as the active panel