GpAppletInfo

GpAppletInfo — the applet info

Types and Values

Includes

#include <libngome-panel/gp-module.h>

Description

GpAppletInfo is used to provide full info about applet.

Functions

GpGetAppletTypeFunc ()

GType
(*GpGetAppletTypeFunc) (void);

Function for getting GType of applet.

Returns

the GType of applet.


GpInitialSetupDialogFunc ()

void
(*GpInitialSetupDialogFunc) (GpInitialSetupDialog *dialog);

Function for setting up initial setup dialog.

Parameters

dialog

a GtkAboutDialog

 

GpAboutDialogFunc ()

void
(*GpAboutDialogFunc) (GtkAboutDialog *dialog);

Function for setting up about dialog.

The dialog will be already filled in with following information - version program name, comments and logo icon name.

Version will be same that was set with gp_module_set_version(). Other three fields are information from gp_applet_info_new().

Parameters

dialog

a GtkAboutDialog

 

GpIsDisabledFunc ()

gboolean
(*GpIsDisabledFunc) (GpLockdownFlags flags,
                     char **reason);

This function must return TRUE if applet must be fully disabled (applet will not be loaded nor user will be able to add it to panel). Function also should return reason why applet is disabled.

If applet is usable with some active lockdowns it should return FALSE and use “lockdows” property to adjust behaviour/functionality.

Parameters

flags

a GpLockdownFlags with active lockdowns

 

reason

return location for reason.

[out][transfer full]

Returns

TRUE if applet should be disabled.


gp_applet_info_new ()

GpAppletInfo *
gp_applet_info_new (GpGetAppletTypeFunc func,
                    const gchar *name,
                    const gchar *description,
                    const gchar *icon_name);

Creates a new GpAppletInfo.

Parameters

func

the function to call to get GType of this applet

 

name

the name of this applet

 

description

the description of this applet

 

icon_name

the icon name for this applet

 

Returns

a newly created GpAppletInfo.

[transfer full]


gp_applet_info_set_initial_setup_dialog ()

void
gp_applet_info_set_initial_setup_dialog
                               (GpAppletInfo *info,
                                GpInitialSetupDialogFunc func);

Specifies a function to be used to setup initial setup dialog.

Parameters

info

a GpAppletInfo

 

func

the function to call to setup initial setup dialog

 

gp_applet_info_set_help_uri ()

void
gp_applet_info_set_help_uri (GpAppletInfo *info,
                             const gchar *help_uri);

Sets the help uri. Must be in help:<document> format. Optional page identifier with options and anchor can be passed to gp_applet_show_help().

Parameters

info

a GpAppletInfo

 

help_uri

the help uri

 

gp_applet_info_set_about_dialog ()

void
gp_applet_info_set_about_dialog (GpAppletInfo *info,
                                 GpAboutDialogFunc func);

Specifies a function to be used to setup about dialog.

Parameters

info

a GpAppletInfo

 

func

the function to call to setup about dialog

 

gp_applet_info_set_backends ()

void
gp_applet_info_set_backends (GpAppletInfo *info,
                             const gchar *backends);

Sets a list of backends that this applet supports.

Parameters

info

a GpAppletInfo

 

backends

a comma-separated list of backends.

[nullable]

gp_applet_info_set_is_disabled ()

void
gp_applet_info_set_is_disabled (GpAppletInfo *info,
                                GpIsDisabledFunc func);

Specifies a function to be used to check if applet should be disabled.

Parameters

info

a GpAppletInfo

 

func

the function to call to check if applet should be disabled

 

Types and Values

GpAppletInfo

typedef struct _GpAppletInfo GpAppletInfo;

The GpAppletInfo struct is an opaque data structure.