register_extension_factory


Description:

public void register_extension_factory (Type exten_type, owned FactoryFunc factory_func)

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 [ ctor@GObject.Object.new]. For other uses, you will usually prefer relying on register_extension_type.

Since libpeas 1.22, exten_type can be an Abstract [alias@GObject.Type] and not just an Interface [alias@GObject.Type].

Parameters:

this

Your plugin's ObjectModule.

exten_type

The Type of the extension you implement.

factory_func

The FactoryFunc that will create the exten_type instance when requested.

destroy_func

A DestroyNotify for user_data.

user_data

Data to pass to func calls.