Peas.ObjectModule.register_extension_factory

### Method

# Peas ObjectModuleregister_extension_factory

#### Declaration [src]

    void
    peas_object_module_register_extension_factory (
      PeasObjectModule* module,
      GType exten_type,
      PeasFactoryFunc factory_func,
      gpointer user_data,
      GDestroyNotify destroy_func
    )

#### Description [src]

Register an implementation for an extension type through a factory function `factory_func` which will instantiate the extension when requested.

This method is primarily meant to be used by native bindings (like gtkmm), creating native types which cannot be instantiated correctly using `g_object_new()`. For other uses, you will usually prefer relying on peas_object_module_register_extension_type().

Since libpeas 1.22, `exten_type` can be an Abstract `GType` and not just an Interface `GType`.

#### Parameters

`exten_type` | `GType`
| The `GType` of the extension you implement.
`factory_func` | `PeasFactoryFunc`
| The `PeasFactoryFunc` that will create the `exten_type` instance when requested.
`user_data` | `gpointer`
| Data to pass to `func` calls.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`destroy_func` | `GDestroyNotify`
| A `GDestroyNotify` for `user_data`.