Peas.ExtensionSet¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
w/co |
The properties to pass the extensions when creating them |
||
r/w/co |
The |
||
r/w/co |
The extension |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a new extension has been added to the |
|
Emitted when a new extension is about to be removed from the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Peas.ExtensionSet(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Peas.ExtensionSet
structure contains only private data and should only be accessed using the provided API.- classmethod new(engine, exten_type, prop_names, prop_values)¶
- Parameters:
engine (
Peas.Engine
orNone
) – APeas.Engine
, orNone
.exten_type (
GObject.GType
) – the extensionGObject.GType
.prop_names ([
str
]) – an array of property names.prop_values ([
GObject.Value
]) – an array of property values.
- Returns:
a new instance of
Peas.ExtensionSet
.- Return type:
Create a new
Peas.ExtensionSet
for the exten_type extension type.If engine is
None
, then the default engine will be used.Since libpeas 1.22, exten_type can be an Abstract [alias`GObject`.Type] and not just an Interface [alias`GObject`.Type].
See [ctor`ExtensionSet`.new] for more information.
- foreach(func, *data)¶
- Parameters:
func (
Peas.ExtensionSetForeachFunc
) – A function call for each extension.data (
object
orNone
) – Optional data to be passed to the function orNone
.
Calls func for each [alias`Extension`].
New in version 1.2.
- get_extension(info)¶
- Parameters:
info (
Peas.PluginInfo
) – aPeas.PluginInfo
- Returns:
a reference to a #PeasExtension
- Return type:
Returns the [alias`Extension`] object corresponding to info.
If the plugin doesn’t provide such an extension, it returns
None
.
- do_call(method_name, args) virtual¶
- Parameters:
method_name (
str
) –args (
GIRepository.Argument
) –
- Return type:
The VFunc for peas_extension_set_call().
- do_extension_added(info, exten) virtual¶
- Parameters:
info (
Peas.PluginInfo
) –exten (
GObject.Object
) –
Signal class handler for the
Peas.ExtensionSet
::extension-added
signal.
- do_extension_removed(info, exten) virtual¶
- Parameters:
info (
Peas.PluginInfo
) –exten (
GObject.Object
) –
Signal class handler for the
Peas.ExtensionSet
::extension-removed
signal.
Signal Details¶
- Peas.ExtensionSet.signals.extension_added(extension_set, info, exten)¶
- Signal Name:
extension-added
- Flags:
- Parameters:
extension_set (
Peas.ExtensionSet
) – The object which received the signalinfo (
Peas.PluginInfo
) – APeas.PluginInfo
.exten (
GObject.Object
) – A #PeasExtension.
Emitted when a new extension has been added to the
Peas.ExtensionSet
.It happens when a new plugin implementing the extension set’s extension type is loaded.
You should connect to this signal in order to set up the extensions when they are loaded. Note that this signal is not fired for extensions coming from plugins that were already loaded when the
Peas.ExtensionSet
instance was created. You should set those up by yourself.
- Peas.ExtensionSet.signals.extension_removed(extension_set, info, exten)¶
- Signal Name:
extension-removed
- Flags:
- Parameters:
extension_set (
Peas.ExtensionSet
) – The object which received the signalinfo (
Peas.PluginInfo
) – APeas.PluginInfo
.exten (
GObject.Object
) – A #PeasExtension.
Emitted when a new extension is about to be removed from the
Peas.ExtensionSet
.It happens when a plugin implementing the extension set’s extension type is unloaded, or when the
Peas.ExtensionSet
itself is destroyed.You should connect to this signal in order to clean up the extensions when their plugin is unload. Note that this signal is not fired for the [alias`Extension`] instances still available when the
Peas.ExtensionSet
instance is destroyed. You should clean those up by yourself.
Property Details¶
- Peas.ExtensionSet.props.construct_properties¶
- Name:
construct-properties
- Type:
- Default Value:
- Flags:
The properties to pass the extensions when creating them
- Peas.ExtensionSet.props.engine¶
- Name:
engine
- Type:
- Default Value:
- Flags:
The
Peas.Engine
this set is attached to
- Peas.ExtensionSet.props.extension_type¶
- Name:
extension-type
- Type:
- Default Value:
<GType void>
- Flags:
The extension
GObject.GType
managed by this set