GOffice.Plugin

g GObject.Object GObject.Object GOffice.Plugin GOffice.Plugin GObject.Object->GOffice.Plugin

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

db_activate_plugin_list (plugins)

class

db_deactivate_plugin_list (plugins, ret_error)

class

services_shutdown ()

activate (ret_error)

can_deactivate ()

db_is_plugin_marked_for_deactivation ()

db_mark_plugin_for_deactivation (mark)

deactivate (ret_error)

get_dependencies_ids ()

get_description ()

get_dir_name ()

get_id ()

get_loader ()

get_name ()

get_services ()

get_textdomain ()

get_type_module ()

init (cc)

is_active ()

is_loaded ()

load_service (service, ret_error)

shutdown (cc)

unload_service (service, ret_error)

use_ref ()

use_unref ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

can-deactivate-changed

state-changed

Fields

Inherited:

GObject.Object (1)

Class Details

class GOffice.Plugin(**kwargs)
Bases:

GObject.Object

Abstract:

No

classmethod db_activate_plugin_list(plugins)
Parameters:

plugins ([GOffice.Plugin]) – The list of plugins

Returns:

Pointer used to report errors

Return type:

ret_error: GOffice.ErrorInfo

Activates all plugins in the list. If some of the plugins cannot be activated, the function reports this via ret_error (errors don’t affect plugins activated successfully).

classmethod db_deactivate_plugin_list(plugins, ret_error)
Parameters:

Deactivates all plugins in the list. If some of the plugins cannot be deactivated, the function reports this via ret_error (errors don’t affect plugins deactivated successfully).

classmethod services_shutdown()
activate(ret_error)
Parameters:

ret_error (GOffice.ErrorInfo) – Pointer used to report errors

Activates self together with all its dependencies. In case of error the plugin won’t be activated and detailed error information will be returned using ret_error.

can_deactivate()
Returns:

True if self can be deactivated and False otherwise.

Return type:

bool

Tells if the plugin can be deactivated using GOffice.Plugin.deactivate.

db_is_plugin_marked_for_deactivation()
Return type:

bool

db_mark_plugin_for_deactivation(mark)
Parameters:

mark (bool) –

deactivate(ret_error)
Parameters:

ret_error (GOffice.ErrorInfo) – Pointer used to report errors

Dectivates self. Its dependencies will NOT be automatically deactivated. In case of error the plugin won’t be deactivated and detailed error information will be returned using ret_error.

get_dependencies_ids()
Returns:

the list of identifiers of plugins that self depends on. All these plugins will be automatically activated before activating the self itself.

Return type:

[str]

get_description()
Returns:

textual description of self or None if description is not available. Returned string stays valid during self's lifetime.

Return type:

str

get_dir_name()
Returns:

the name of the directory in which self is located. Returned string is != None and stays valid during self's lifetime.

Return type:

str

get_id()
Returns:

the ID of self (unique string used for idenfification of plugin). Returned string is != None and stays valid during self's lifetime.

Return type:

str

get_loader()
Returns:

The loader.

Return type:

GOffice.PluginLoader

get_name()
Returns:

textual name of self. If the real name is not available for some reason, automatically generated string will be returned. Returned string is != None and stays valid during self's lifetime.

Return type:

str

get_services()
Returns:

A list of services. The list must not be freed or changed.

Return type:

[GOffice.PluginService]

get_textdomain()
Returns:

plugin’s textdomain for use with textdomain(3) and d*gettext(3) functions.

Return type:

str

get_type_module()
Returns:

the GObject.TypeModule associated with the plugin creating it if necessary.

Return type:

GObject.TypeModule

init(cc)
Parameters:

cc (GOffice.CmdContext) –

is_active()
Returns:

True if self is active and False otherwise.

Return type:

bool

is_loaded()
Returns:

True if self is loaded and False otherwise.

Return type:

bool

load_service(service, ret_error)
Parameters:

Loads base part of the plugin if it is not loaded and then loads given plugin service (prepares necessary part of the plugin for direct use). This function is intended for use by GOffice.PluginService objects.

shutdown(cc)
Parameters:

cc (GOffice.CmdContext) –

unload_service(service, ret_error)
Parameters:

… This function is intended for use by GOffice.PluginService objects.

use_ref()
use_unref()

Signal Details

GOffice.Plugin.signals.can_deactivate_changed(plugin)
Signal Name:

can-deactivate-changed

Flags:

RUN_LAST

Parameters:

plugin (GOffice.Plugin) – The object which received the signal

GOffice.Plugin.signals.state_changed(plugin)
Signal Name:

state-changed

Flags:

RUN_LAST

Parameters:

plugin (GOffice.Plugin) – The object which received the signal