Constructor
IdeExtensionAdapternew
Declaration
IdeExtensionAdapter*
ide_extension_adapter_new (
IdeObject* parent,
PeasEngine* engine,
GType interface_type,
const gchar* key,
const gchar* value
)
Description
Creates a new IdeExtensionAdapter
.
The IdeExtensionAdapter
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
IdeExtensionAdapter:extension
property.
Additionally, it can match a specific plugin based on the value
provided.
This uses IdeExtensionPoint
to create the extension implementation, which
means that extension points that are disabled (such as from the plugins
GSettings) will be ignored. As such, if one plugin that is higher priority
than another, but is disabled, will be ignored and the secondary plugin will
be used.
Parameters
parent
-
Type:
IdeObject
An
IdeObject
orNULL
.The argument can be NULL
.The data is owned by the caller of the function. engine
-
Type:
PeasEngine
A
PeasEngine
orNULL
.The argument can be NULL
.The data is owned by the caller of the function. interface_type
-
Type:
GType
The
GType
of the interface to be implemented. key
-
Type:
const gchar*
The key for matching extensions from plugin info external data.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. value
-
Type:
const gchar*
The value to use when matching keys.
The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
Return value
Type: IdeExtensionAdapter
A newly created IdeExtensionAdapter
.
The caller of the function takes ownership of the data, and is responsible for freeing it. |