## IdeLayoutStackAddin IdeLayoutStackAddin |

## Functions

void | ide_layout_stack_addin_load ()
void | ide_layout_stack_addin_unload ()
void | ide_layout_stack_addin_set_view ()
IdeLayoutStackAddin * | ide_layout_stack_addin_find_by_module_name ()

## Types and Values

#define | IDE_TYPE_LAYOUT_STACK_ADDIN
struct | IdeLayoutStackAddinInterface
| IdeLayoutStackAddin

## Object Hierarchy

        GInterface
        ╰── IdeLayoutStackAddin

## Prerequisites

IdeLayoutStackAddin requires GObject.

## Description

## Functions

### ide_layout_stack_addin_load ()

    void
    ide_layout_stack_addin_load (IdeLayoutStackAddin *self,
                                 IdeLayoutStack *stack);

This function should be implemented by IdeLayoutStackAddin plugins in IdeLayoutStackAddinInterface.

This virtual method is called when the plugin should load itself. A new instance of the plugin is created for every IdeLayoutStack that is created in Builder.

#### Parameters

self | An IdeLayoutStackAddin |
stack | An IdeLayoutStack |

### ide_layout_stack_addin_unload ()

    void
    ide_layout_stack_addin_unload (IdeLayoutStackAddin *self,
                                   IdeLayoutStack *stack);

This function should be implemented by IdeLayoutStackAddin plugins in IdeLayoutStackAddinInterface.

This virtual method is called when the plugin should unload itself. It should revert anything performed via `ide_layout_stack_addin_load()`.

#### Parameters

self | An IdeLayoutStackAddin |
stack | An IdeLayoutStack |

### ide_layout_stack_addin_set_view ()

    void
    ide_layout_stack_addin_set_view (IdeLayoutStackAddin *self,
                                     IdeLayoutView *view);

This virtual method is called whenever the active view changes in the IdeLayoutView. Plugins may want to alter what controls are displayed on the stack based on the current view.

#### Parameters

self | an IdeLayoutStackAddin |
view | An IdeLayoutView or `NULL`. | [nullable]

### ide_layout_stack_addin_find_by_module_name ()

    IdeLayoutStackAddin *
    ide_layout_stack_addin_find_by_module_name
                                   (IdeLayoutStack *stack,
                                    const gchar *module_name);

This function will locate the IdeLayoutStackAddin that was registered by the plugin named `module_name` (which should match the "Module" field provided in the .plugin file).

If no module was found or that module does not implement the IdeLayoutStackAddinInterface, then `NULL` is returned.

#### Parameters

stack | An IdeLayoutStack |
module_name | the module name which provides the addin |

#### Returns

An IdeLayoutStackAddin or `NULL`.

[transfer none][nullable]

Since: 3.26

## Types and Values

### IDE_TYPE_LAYOUT_STACK_ADDIN

    #define IDE_TYPE_LAYOUT_STACK_ADDIN (ide_layout_stack_addin_get_type())

### struct IdeLayoutStackAddinInterface

    struct IdeLayoutStackAddinInterface {
      GTypeInterface parent_iface;

      void (*load)     (IdeLayoutStackAddin *self,
                        IdeLayoutStack      *stack);
      void (*unload)   (IdeLayoutStackAddin *self,
                        IdeLayoutStack      *stack);
      void (*set_view) (IdeLayoutStackAddin *self,
                        IdeLayoutView       *view);
    };

### IdeLayoutStackAddin

    typedef struct _IdeLayoutStackAddin IdeLayoutStackAddin;