ide-extension-adapter: gnome-builder Reference Manual

## 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 (IdeContext *context,
                               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

context | An IdeContext. |
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]

### ide_extension_adapter_get_engine ()

    PeasEngine *
    ide_extension_adapter_get_engine (IdeExtensionAdapter *self);

Gets the “engine” property.

#### Returns

A PeasEngine.

[transfer none]

### 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]

### 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.

Flags: Read / Write / Construct Only

### The `“extension”` property

      “extension”                GObject *

The extension object.

Flags: Read

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

      “interface-type”           GType *

The GType of the extension interface.

Flags: Read / Write / Construct Only

Allowed values: GInterface

### The `“key”` property

      “key”                      gchar *

The external data key to match from plugin info.

Flags: Read / Write

Default value: NULL

### The `“value”` property

      “value”                    gchar *

The external data value to match from plugin info.

Flags: Read / Write

Default value: NULL