![]() |
![]() |
![]() |
Peas Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct PeasObjectModule; struct PeasObjectModuleClass; GObject * (*PeasFactoryFunc) (guint n_parameters
,GParameter *parameters
,gpointer user_data
); void peas_object_module_register_extension_factory (PeasObjectModule *module
,GType iface_type
,PeasFactoryFunc factory_func
,gpointer user_data
,GDestroyNotify destroy_func
); void peas_object_module_register_extension_type (PeasObjectModule *module
,GType iface_type
,GType extension_type
);
"module-name" gchar* : Read / Write / Construct Only "path" gchar* : Read / Write / Construct Only "resident" gboolean : Read / Write / Construct Only
PeasObjectModule is a subclass of GTypeModule which allows registration of extensions. It will be used by C extensions implementors to register extension implementations from within the peas_register_types module function.
struct PeasObjectModule;
The PeasObjectModule structure contains only private data and should only be accessed using the provided API.
struct PeasObjectModuleClass { GTypeModuleClass parent_class; };
The class structure for PeasObjectModule.
GObject * (*PeasFactoryFunc) (guint n_parameters
,GParameter *parameters
,gpointer user_data
);
A PeasFactoryFunc is a factory function which will instanciate a new
extension of a given type. g_object_newv()
is such a function.
It is used with peas_object_module_register_extension_factory()
.
|
The number of paramteters. |
|
The parameters. [array length=n_parameters] |
|
Optional data to be passed to the function, or NULL . |
Returns : |
The created object. [transfer full] |
void peas_object_module_register_extension_factory (PeasObjectModule *module
,GType iface_type
,PeasFactoryFunc factory_func
,gpointer user_data
,GDestroyNotify destroy_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
g_object_new()
. For other uses, you will usually prefer relying on
peas_object_module_register_extension_type()
.
|
Your plugin's PeasObjectModule. |
|
The GType of the extension interface you implement. |
|
The PeasFactoryFunc that will create the iface_type
instance when requested. |
|
Data to pass to func calls. |
|
A GDestroyNotify for user_data . |
void peas_object_module_register_extension_type (PeasObjectModule *module
,GType iface_type
,GType extension_type
);
Register an extension type which implements the extension interface
iface_type
.
|
Your plugin's PeasObjectModule. |
|
The GType of the extension interface you implement. |
|
The GType of your implementation of iface_type . |