Foundry.Extension

g Foundry.Contextual Foundry.Contextual Foundry.Extension Foundry.Extension Foundry.Contextual->Foundry.Extension GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

GObject.ObjectClass (5)

class

new (context, engine, interface_type, key, value)

get_engine ()

get_extension ()

get_interface_type ()

get_key ()

get_value ()

set_key (key)

set_value (value)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

engine

Peas.Engine

r/w/co

Engine

extension

GObject.Object

r

The extension object.

interface-type

GObject.GType

r/w/co

The GObject.GType of the extension interface.

key

str

r/w

The external data key to match from plugin info.

value

str

r/w

The external data value to match from plugin info.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.Extension(**kwargs)
Bases:

Foundry.Contextual

Abstract:

No

Structure:

Foundry.ExtensionClass

Represents a single plugin extension with Foundry.Context support.

Typically Foundry uses libpeas directly. But there are cases where filtering or ordering plugins by priority is needed. Foundry.Extension provides this capability in a similar manner to PeasExtension.

classmethod new(context, engine, interface_type, key, value)
Parameters:
Returns:

A newly created Foundry.Extension.

Return type:

Foundry.Extension

Creates a new Foundry.Extension.

The Foundry.Extension object 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 the Foundry.Extension :extension property.

Additionally, it can match a specific plugin based on the value provided.

get_engine()
Returns:

a Peas.Engine.

Return type:

Peas.Engine

Gets the Foundry.Extension :engine property.

get_extension()
Returns:

a GObject.Object or None.

Return type:

GObject.Object

Gets the extension object managed by the adapter.

get_interface_type()
Return type:

GObject.GType

get_key()
Return type:

str

get_value()
Return type:

str

set_key(key)
Parameters:

key (str) –

set_value(value)
Parameters:

value (str) –

Property Details

Foundry.Extension.props.engine
Name:

engine

Type:

Peas.Engine

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Engine

Foundry.Extension.props.extension
Name:

extension

Type:

GObject.Object

Default Value:

None

Flags:

READABLE

The extension object.

Foundry.Extension.props.interface_type
Name:

interface-type

Type:

GObject.GType

Default Value:

<GType GObject>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The GObject.GType of the extension interface.

Foundry.Extension.props.key
Name:

key

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The external data key to match from plugin info.

Foundry.Extension.props.value
Name:

value

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The external data value to match from plugin info.