Peas.Engine
Description: Reference for Peas.Engine

### Class

# PeasEngine

since: 2

#### Description [src]

    final class Peas.Engine : GObject.Object
      implements Gio.ListModel {
      /* No available fields */
    }

The `PeasEngine` 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.

Available since: 2

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- GListModel

#### Constructors

###### peas_engine_new

Return a new instance of `PeasEngine`.

since: 2

###### peas_engine_new_with_nonglobal_loaders

Return a new instance of `PeasEngine` which will use non-global plugin loaders instead of the default global ones.

since: 2

#### Functions

###### peas_engine_get_default

Return the existing instance of `PeasEngine` or a subclass of it.

since: 2

#### Instance methods

###### peas_engine_add_search_path

Appends a search path to the list of paths where to look for plugins.

since: 2

###### peas_engine_create_extension

If the plugin identified by `info` implements the `extension_type`, then this function will return a new instance of this implementation.

since: 2

###### peas_engine_create_extension_valist

If the plugin identified by `info` implements the `extension_type`, then this function will return a new instance of this implementation.

since: 2

###### peas_engine_create_extension_with_properties

If the plugin identified by `info` implements the `extension_type`, then this function will return a new instance of this implementation.

since: 2

###### peas_engine_dup_loaded_plugins

Returns the list of the names of all the loaded plugins.

since: 2

###### peas_engine_enable_loader

Enable a loader, enables a loader for plugins.

since: 2

###### peas_engine_garbage_collect

Triggers garbage collection on all the loaders currently owned by the `PeasEngine`.

since: 2

###### peas_engine_get_plugin_info

Gets the `PeasPluginInfo` corresponding with `plugin_name`, or `NULL` if `plugin_name` was not found.

since: 2

###### peas_engine_load_plugin

Loads the plugin corresponding to `info` if it’s not currently loaded.

since: 2

###### peas_engine_provides_extension

Returns if `info` provides an extension for `extension_type`.

since: 2

###### peas_engine_rescan_plugins

Rescan all the registered directories to find new or updated plugins.

since: 2

###### peas_engine_set_loaded_plugins

Sets the list of loaded plugins for `engine`.

since: 2

###### peas_engine_unload_plugin

Unloads the plugin corresponding to `info`.

since: 2

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GListModel (5)

###### g_list_model_get_item

Get the item at `position`.

unstable since: 2.44

###### g_list_model_get_item_type

Gets the type of the items in `list`.

unstable since: 2.44

###### g_list_model_get_n_items

Gets the number of items in `list`.

unstable since: 2.44

###### g_list_model_get_object

Get the item at `position`.

unstable since: 2.44

###### g_list_model_items_changed

Emits the `GListModel::items-changed` signal on `list`.

unstable since: 2.44

#### Properties

###### Peas.Engine:loaded-plugins

The list of loaded plugins.

since: 2

###### Peas.Engine:nonglobal-loaders

If non-global plugin loaders should be used.

since: 2

#### Signals

###### Peas.Engine::load-plugin

The load-plugin signal is emitted when a plugin is being loaded.

since: 2

###### Peas.Engine::unload-plugin

The unload-plugin signal is emitted when a plugin is being unloaded.

since: 2

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

since: 2.0

##### Signals inherited from GListModel (1)

###### GListModel::items-changed

This signal is emitted whenever items were added to or removed from `list`. At `position`, `removed` items were removed and `added` items were added in their place.

unstable since: 2.44

#### Class structure

    struct PeasEngineClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.