Engine
Object Hierarchy:
Description:
The Engine structure contains only private data and should only be accessed using the provided API.
Namespace: Peas
Package: libpeas-1.0
Content:
Properties:
- public string[] loaded_plugins { owned get; set; }
The list of loaded plugins.
- public bool nonglobal_loaders { get; construct; }
If non-global plugin loaders should be used.
- public void* plugin_list { get; }
The list of found plugins.
Static methods:
- public static unowned Engine get_default ()
Return the existing instance of Engine or a subclass of it.
Creation methods:
- public Engine ()
Return a new instance of Engine.
- public Engine.with_nonglobal_loaders ()
Return a new instance of Engine which will use non-global plugin loaders instead of the default global ones.
Methods:
- public void add_search_path (string module_dir, string? data_dir)
Appends a search path to the list of paths where to look for plugins.
- public Extension create_extension (PluginInfo info, Type extension_type, ...)
If the plugin identified by
info
implements theextension_type
, then this function will return a new instance of this implementation, wrapped in a new [alias@Extension] instance. - public Extension create_extension_with_properties (PluginInfo info, Type extension_type, string[] prop_names, Value[] prop_values)
If the plugin identified by
info
implements theextension_type
, then this function will return a new instance of this implementation, wrapped in a new [alias@Extension] instance. - public Extension create_extensionv (PluginInfo info, Type extension_type, Parameter[]? parameters)
If the plugin identified by
info
implements theextension_type
, then this function will return a new instance of this implementation, wrapped in a new [alias@Extension] instance. - public void enable_loader (string loader_name)
Enable a loader, enables a loader for plugins.
- public void garbage_collect ()
Triggers garbage collection on all the loaders currently owned by the Engine.
- public string[] get_loaded_plugins ()
Returns the list of the names of all the loaded plugins.
- public unowned PluginInfo get_plugin_info (string plugin_name)
Gets the [struct@PluginInfo] corresponding with
plugin_name
, or null ifplugin_name
was not found. - public unowned List<PluginInfo> get_plugin_list ()
Returns the list of [struct@PluginInfo] known to the engine.
- public void prepend_search_path (string module_dir, string? data_dir)
Prepends a search path to the list of paths where to look for plugins.
- public bool provides_extension (PluginInfo info, Type extension_type)
Returns if
info
provides an extension forextension_type
. - public void rescan_plugins ()
Rescan all the registered directories to find new or updated plugins.
- public void set_loaded_plugins (string[]? plugin_names)
Sets the list of loaded plugins for this.
- public bool try_load_plugin (PluginInfo info)
- public bool try_unload_plugin (PluginInfo info)
Signals:
- public virtual signal void load_plugin (PluginInfo info)
The load-plugin signal is emitted when a plugin is being loaded.
- public virtual signal void unload_plugin (PluginInfo info)
The unload-plugin signal is emitted when a plugin is being unloaded.
Inherited Members:
All known members inherited from class GLib.Object