### Method

# Peas Engine create_extension

#### Declaration [src]

    GObject*
    peas_engine_create_extension (
      PeasEngine* engine,
      PeasPluginInfo* info,
      GType extension_type,
      const char* first_property,
      ...
    )

#### Description [src]

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

When creating the new instance of the `extension_type` subtype, the provided construct properties will be passed to the extension construction handler (exactly like if you had called `g_object_new()` yourself).

This method is not directly available to language bindings.

The implementation of this method is provided by `peas_engine_create_extension_with_properties()` in language bindings.

#### Parameters

`info`

  Type: `PeasPluginInfo`

  A loaded `PeasPluginInfo`.

  The data is owned by the caller of the method.

`extension_type`

  Type: `GType`

  The implemented extension `GType`.

`first_property`

  Type: `const char*`

  The name of the first property.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`...`

  Type: ``

  The value of the first property, followed optionally by more name/value pairs, followed by `NULL`.

#### Return value

Type: `GObject`

A new `GObject` that implements `extension_type`; or `NULL`.

The returned data is owned by the instance.