ide-extension-adapter: Builder SDK Reference

## ide-extension-adapter ide-extension-adapter |

## Functions

IdeExtensionAdapter * | ide_extension_adapter_new ()
PeasEngine * | ide_extension_adapter_get_engine ()
gpointer | ide_extension_adapter_get_extension ()
GType | ide_extension_adapter_get_interface_type ()
const gchar * | ide_extension_adapter_get_key ()
void | ide_extension_adapter_set_key ()
const gchar * | ide_extension_adapter_get_value ()
void | ide_extension_adapter_set_value ()

## Properties

PeasEngine * | engine | Read / Write / Construct Only
GObject * | extension | Read
GType * | interface-type | Read / Write / Construct Only
gchar * | key | Read / Write
gchar * | value | Read / Write

## Types and Values

#define | IDE_TYPE_EXTENSION_ADAPTER
| IdeExtensionAdapter

## Object Hierarchy

        GObject
        ╰── IdeObject
            ╰── IdeExtensionAdapter

## Description

## Functions

### ide_extension_adapter_new ()

    IdeExtensionAdapter *
    ide_extension_adapter_new (IdeObject *parent,
                               PeasEngine *engine,
                               GType interface_type,
                               const gchar *key,
                               const gchar *value);

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 “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 | An IdeObject or `NULL`. | [nullable]
engine | a PeasEngine or `NULL`. | [allow-none]
interface_type | The GType of the interface to be implemented. |
key | The key for matching extensions from plugin info external data. |
value | The value to use when matching keys. | [allow-none]

#### Returns

A newly created IdeExtensionAdapter.

[transfer full]

Since: 3.32

### ide_extension_adapter_get_engine ()

    PeasEngine *
    ide_extension_adapter_get_engine (IdeExtensionAdapter *self);

Gets the “engine” property.

#### Returns

a PeasEngine.

[transfer none]

Since: 3.32

### ide_extension_adapter_get_extension ()

    gpointer
    ide_extension_adapter_get_extension (IdeExtensionAdapter *self);

Gets the extension object managed by the adapter.

#### Returns

a GObject or `NULL`.

[transfer none][type GObject.Object]

Since: 3.32

### ide_extension_adapter_get_interface_type ()

    GType
    ide_extension_adapter_get_interface_type
                                   (IdeExtensionAdapter *self);

### ide_extension_adapter_get_key ()

    const gchar *
    ide_extension_adapter_get_key (IdeExtensionAdapter *self);

### ide_extension_adapter_set_key ()

    void
    ide_extension_adapter_set_key (IdeExtensionAdapter *self,
                                   const gchar *key);

### ide_extension_adapter_get_value ()

    const gchar *
    ide_extension_adapter_get_value (IdeExtensionAdapter *self);

### ide_extension_adapter_set_value ()

    void
    ide_extension_adapter_set_value (IdeExtensionAdapter *self,
                                     const gchar *value);

## Types and Values

### IDE_TYPE_EXTENSION_ADAPTER

    #define IDE_TYPE_EXTENSION_ADAPTER (ide_extension_adapter_get_type())

### IdeExtensionAdapter

    typedef struct _IdeExtensionAdapter IdeExtensionAdapter;

## Property Details

### The `“engine”` property

      “engine”                   PeasEngine *

Engine.

Owner: IdeExtensionAdapter

Flags: Read / Write / Construct Only

### The `“extension”` property

      “extension”                GObject *

The extension object.

Owner: IdeExtensionAdapter

Flags: Read

### The `“interface-type”` property

      “interface-type”           GType *

The GType of the extension interface.

Owner: IdeExtensionAdapter

Flags: Read / Write / Construct Only

Allowed values: GInterface

### The `“key”` property

      “key”                      gchar *

The external data key to match from plugin info.

Owner: IdeExtensionAdapter

Flags: Read / Write

Default value: NULL

### The `“value”` property

      “value”                    gchar *

The external data value to match from plugin info.

Owner: IdeExtensionAdapter

Flags: Read / Write

Default value: NULL