### Interface

# Ide WorkspaceAddin

#### Description

    interface Ide.WorkspaceAddin : GObject.Object

No description available.

#### Prerequisite

In order to implement WorkspaceAddin, your type must inherit from `GObject`.

#### Instance methods

###### ide_workspace_addin_can_close

This method is called to determine if the workspace can close. If the addin needs to prevent the workspace closing, then return `FALSE`; otherwise `TRUE`.

Available since: 3.34

###### ide_workspace_addin_load

Lods the `IdeWorkspaceAddin`.

Available since: 3.32

###### ide_workspace_addin_surface_set

This function is called to notify the addin of the current surface. It may be set to `NULL` before unloading the addin to allow addins to do surface change state handling and cleanup in one function.

Available since: 3.32

###### ide_workspace_addin_unload

Unloads the `IdeWorkspaceAddin`.

Available since: 3.32

#### Interface structure

    struct IdeWorkspaceAddinInterface {
      GTypeInterface parent_iface;
      void (* load) (
        IdeWorkspaceAddin* self,
        IdeWorkspace* workspace
      );
      void (* unload) (
        IdeWorkspaceAddin* self,
        IdeWorkspace* workspace
      );
      void (* surface_set) (
        IdeWorkspaceAddin* self,
        IdeSurface* surface
      );
      gboolean (* can_close) (
        IdeWorkspaceAddin* self
      );

    }

###### Interface members

`parent_iface` |
    GTypeInterface
| No description available.
`load` |
    void (* load) (
        IdeWorkspaceAddin* self,
        IdeWorkspace* workspace
      )
| No description available.
`unload` |
    void (* unload) (
        IdeWorkspaceAddin* self,
        IdeWorkspace* workspace
      )
| No description available.
`surface_set` |
    void (* surface_set) (
        IdeWorkspaceAddin* self,
        IdeSurface* surface
      )
| No description available.
`can_close` |
    gboolean (* can_close) (
        IdeWorkspaceAddin* self
      )
| No description available.

#### Virtual methods

###### Ide.WorkspaceAddin.can_close

This method is called to determine if the workspace can close. If the addin needs to prevent the workspace closing, then return `FALSE`; otherwise `TRUE`.

###### Ide.WorkspaceAddin.load

Lods the `IdeWorkspaceAddin`.

###### Ide.WorkspaceAddin.surface_set

This function is called to notify the addin of the current surface. It may be set to `NULL` before unloading the addin to allow addins to do surface change state handling and cleanup in one function.

###### Ide.WorkspaceAddin.unload

Unloads the `IdeWorkspaceAddin`.