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.

Available since:3.32

Parameters

parent IdeObject
 

An IdeObject or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
engine PeasEngine
 

A PeasEngine or NULL.

 The argument can be NULL.
 The data is owned by the caller of the function.
interface_type GType
 

The GType of the interface to be implemented.

key 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 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

Returns: IdeExtensionAdapter
 

A newly created IdeExtensionAdapter.

 The caller of the function takes ownership of the data, and is responsible for freeing it.