Foundry.Extension¶
- Subclasses:
None
Methods¶
- Inherited:
Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
Engine |
||
r |
The extension object. |
||
r/w/co |
The |
||
r/w |
The external data key to match from plugin info. |
||
r/w |
The external data value to match from plugin info. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Foundry.Extension(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Represents a single plugin extension with
Foundry.Contextsupport.Typically Foundry uses libpeas directly. But there are cases where filtering or ordering plugins by priority is needed.
Foundry.Extensionprovides this capability in a similar manner to PeasExtension.- classmethod new(context, engine, interface_type, key, value)¶
- Parameters:
context (
Foundry.ContextorNone) – AnFoundry.ContextorNoneengine (
Peas.EngineorNone) – aPeas.EngineorNoneinterface_type (
GObject.GType) – TheGObject.GTypeof the interface to be implemented.key (
str) – The key for matching extensions from plugin info external data.
- Returns:
A newly created
Foundry.Extension.- Return type:
Creates a new
Foundry.Extension.The
Foundry.Extensionobject can be used to wrap an extension that might need to change at runtime based on various changing parameters. For example, it can watch the loading and unloading of plugins and reload theFoundry.Extension:extensionproperty.Additionally, it can match a specific plugin based on the value provided.
- get_engine()¶
- Returns:
a
Peas.Engine.- Return type:
Gets the
Foundry.Extension:engineproperty.
- get_extension()¶
- Returns:
a
GObject.ObjectorNone.- Return type:
Gets the extension object managed by the adapter.
- get_interface_type()¶
- Return type:
Property Details¶
- Foundry.Extension.props.engine¶
- Name:
engine- Type:
- Default Value:
- Flags:
Engine
- Foundry.Extension.props.extension¶
- Name:
extension- Type:
- Default Value:
- Flags:
The extension object.
- Foundry.Extension.props.interface_type¶
- Name:
interface-type- Type:
- Default Value:
<GType GObject>- Flags:
The
GObject.GTypeof the extension interface.
- Foundry.Extension.props.key¶
-
The external data key to match from plugin info.