Engine
Object Hierarchy:
Description:
[
CCode ( type_id =
"peas_engine_get_type ()" ) ]
public class Engine :
Object
The Engine is the object which manages the plugins.
Its role is twofold:
- it will fetch all the information about the available plugins from all the registered plugin directories;
- it will provide you an API to load, control and unload your plugins and their extensions from within your application.
Content:
Properties:
Static methods:
Creation methods:
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 the
extension_type, then this function will return a new instance of this implementation.
- public Extension create_extension_with_properties (PluginInfo info, Type extension_type, string[] prop_names, Value[] prop_values)
If the plugin identified by info implements the
extension_type, then this function will return a new instance of this implementation.
- public Extension create_extensionv (PluginInfo info, Type extension_type, Parameter[]? parameters)
If the plugin identified by info implements the
extension_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 [class@PluginInfo] corresponding with plugin_name
, or null if plugin_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 for
extension_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:
Inherited Members:
All known members inherited from class GLib.Object