IdeBufferAddin

IdeBufferAddin — addins for IdeBuffer

Functions

Types and Values

Object Hierarchy

    GInterface
    ╰── IdeBufferAddin

Prerequisites

IdeBufferAddin requires GObject.

Description

The IdeBufferAddin allows a plugin to register an object that will be created with every IdeBuffer. It can register extra features with the buffer or extend it as necessary.

Once use of IdeBufferAddin is to add a spellchecker to the buffer that may be used by views to show the misspelled words. This is preferrable to adding a spellchecker in each view because it allows for multiple views to share one spellcheker on the underlying buffer.

Functions

ide_buffer_addin_load ()

void
ide_buffer_addin_load (IdeBufferAddin *self,
                       IdeBuffer *buffer);

This calls the load virtual function of IdeBufferAddin to request that the addin load itself.

Parameters

self

an IdeBufferAddin

 

buffer

an IdeBuffer

 

Since: 3.26


ide_buffer_addin_unload ()

void
ide_buffer_addin_unload (IdeBufferAddin *self,
                         IdeBuffer *buffer);

This calls the unload virtual function of IdeBufferAddin to request that the addin unload itself.

The addin should cancel any in-flight operations and attempt to drop references to the buffer or any other machinery as soon as possible.

Parameters

self

an IdeBufferAddin

 

buffer

an IdeBuffer

 

Since: 3.26


ide_buffer_addin_find_by_module_name ()

IdeBufferAddin *
ide_buffer_addin_find_by_module_name (IdeBuffer *buffer,
                                      const gchar *module_name);

Locates an addin attached to the IdeBuffer by the name of the module that provides the addin.

Parameters

buffer

an IdeBuffer

 

module_name

the module name of the addin

 

Returns

An IdeBufferAddin or NULL.

[transfer none][nullable]

Since: 3.26

Types and Values

IDE_TYPE_BUFFER_ADDIN

#define IDE_TYPE_BUFFER_ADDIN (ide_buffer_addin_get_type())

struct IdeBufferAddinInterface

struct IdeBufferAddinInterface {
  GTypeInterface parent_iface;

  void (*load)   (IdeBufferAddin    *self,
                  IdeBuffer         *buffer);
  void (*unload) (IdeBufferAddin    *self,
                  IdeBuffer         *buffer);
};

IdeBufferAddin

typedef struct _IdeBufferAddin IdeBufferAddin;