|
Cairo-Dock
3.4.0
|
Data Structures | |
| struct | _GldiVisitCard |
| Definition of the visit card of a module. Contains everything that is statically defined for a module. More... | |
| struct | _GldiModuleInterface |
| Definition of the interface of a module. More... | |
| struct | _GldiModule |
| Definition of an external module. More... | |
Macros | |
| #define | GLDI_OBJECT_IS_MODULE(obj) |
Typedefs | |
| typedef gboolean(* | GldiModulePreInit )(GldiVisitCard *pVisitCard, GldiModuleInterface *pInterface) |
| Pre-init function of a module. Fills the visit card and the interface of a module. | |
Enumerations | |
| enum | GldiModuleCategory |
| Categories a module can be in. | |
Functions | |
| GldiModule * | gldi_module_new (GldiVisitCard *pVisitCard, GldiModuleInterface *pInterface) |
| GldiModule * | gldi_module_new_from_so_file (const gchar *cSoFilePath) |
| void | gldi_modules_new_from_directory (const gchar *cModuleDirPath, GError **erreur) |
| gchar * | gldi_module_get_config_dir (GldiModule *pModule) |
| GldiModule * | gldi_module_get (const gchar *cModuleName) |
| void | gldi_module_activate (GldiModule *module) |
| void | gldi_module_deactivate (GldiModule *module) |
| void | gldi_module_add_instance (GldiModule *pModule) |
| should maybe be in the module-instance too... | |
This class manages the external modules of Cairo-Dock.
A module has an interface and a visit card :
Modules can be instanciated several times; each time they are, an instance _GldiModuleInstance is created. Each instance holds a set of data: the icon and its container, the config structure and its conf file, the data structure and a slot to plug datas into containers and icons. All these data are optionnal; a module that has an icon is also called an applet.
| #define GLDI_OBJECT_IS_MODULE | ( | obj | ) |
Say if an object is a Module.
| obj | the object. |
| GldiModule* gldi_module_new | ( | GldiVisitCard * | pVisitCard, |
| GldiModuleInterface * | pInterface | ||
| ) |
Create a new module. The module takes ownership of the 2 arguments, unless an error occured.
| pVisitCard | the visit card of the module |
| pInterface | the interface of the module |
| GldiModule* gldi_module_new_from_so_file | ( | const gchar * | cSoFilePath | ) |
Create a new module from a .so file.
| cSoFilePath | path to the .so file |
| void gldi_modules_new_from_directory | ( | const gchar * | cModuleDirPath, |
| GError ** | erreur | ||
| ) |
Create new modules from all the .so files contained in the given folder.
| cModuleDirPath | path to the folder |
| erreur | an error |
| gchar* gldi_module_get_config_dir | ( | GldiModule * | pModule | ) |
Get the path to the folder containing the config files of a module (one file per instance). The folder is created if needed. If the module is not configurable, or if the folder couldn't be created, NULL is returned.
| pModule | the module |
| GldiModule* gldi_module_get | ( | const gchar * | cModuleName | ) |
Get the module which has a given name.
| cModuleName | the unique name of the module. |
| void gldi_module_activate | ( | GldiModule * | module | ) |
Create and initialize all the instances of a module.
| module | the module to activate. |
| void gldi_module_deactivate | ( | GldiModule * | module | ) |
Stop and destroy all the instances of a module.
| module | the module to deactivate |