ide-workbench: gnome-builder Reference Manual

## ide-workbench ide-workbench |

## Functions

void | ide_workbench_open_project_async ()
gboolean | ide_workbench_open_project_finish ()
void | ide_workbench_open_uri_async ()
gboolean | ide_workbench_open_uri_finish ()
void | ide_workbench_open_files_async ()
gboolean | ide_workbench_open_files_finish ()
void | ide_workbench_save_all_async ()
gboolean | ide_workbench_save_all_finish ()
void | ide_workbench_focus ()
void | ide_workbench_close ()
IdeContext * | ide_workbench_get_context ()
void | ide_workbench_add_perspective ()
void | ide_workbench_remove_perspective ()
IdePerspective * | ide_workbench_get_perspective_by_name ()
IdePerspective * | ide_workbench_get_visible_perspective ()
void | ide_workbench_set_visible_perspective ()
const gchar * | ide_workbench_get_visible_perspective_name ()
void | ide_workbench_set_visible_perspective_name ()
gboolean | ide_workbench_get_fullscreen ()
void | ide_workbench_set_fullscreen ()
void | ide_workbench_views_foreach ()

## Properties

IdeContext * | context | Read
IdePerspective * | visible-perspective | Read / Write
gchar * | visible-perspective-name | Read / Write

## Signals

void | action | Action
void | set-perspective | Action
void | unload | Run Last

## Types and Values

#define | IDE_TYPE_WORKBENCH
| IdeWorkbench

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── GtkApplicationWindow
                                ╰── IdeWorkbench

## Implemented Interfaces

IdeWorkbench implements AtkImplementorIface, GtkBuildable, GActionGroup and GActionMap.

## Description

## Functions

### ide_workbench_open_project_async ()

    void
    ide_workbench_open_project_async (IdeWorkbench *self,
                                      GFile *file_or_directory,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

### ide_workbench_open_project_finish ()

    gboolean
    ide_workbench_open_project_finish (IdeWorkbench *self,
                                       GAsyncResult *result,
                                       GError **error);

### ide_workbench_open_uri_async ()

    void
    ide_workbench_open_uri_async (IdeWorkbench *self,
                                  IdeUri *uri,
                                  const gchar *hint,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

### ide_workbench_open_uri_finish ()

    gboolean
    ide_workbench_open_uri_finish (IdeWorkbench *self,
                                   GAsyncResult *result,
                                   GError **error);

### ide_workbench_open_files_async ()

    void
    ide_workbench_open_files_async (IdeWorkbench *self,
                                    GFile **files,
                                    guint n_files,
                                    const gchar *hint,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

### ide_workbench_open_files_finish ()

    gboolean
    ide_workbench_open_files_finish (IdeWorkbench *self,
                                     GAsyncResult *result,
                                     GError **error);

### ide_workbench_save_all_async ()

    void
    ide_workbench_save_all_async (IdeWorkbench *self,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

### ide_workbench_save_all_finish ()

    gboolean
    ide_workbench_save_all_finish (IdeWorkbench *self,
                                   GAsyncResult *result,
                                   GError **error);

### ide_workbench_focus ()

    void
    ide_workbench_focus (IdeWorkbench *self,
                         GtkWidget *widget);

### ide_workbench_close ()

    void
    ide_workbench_close (IdeWorkbench *self);

### ide_workbench_get_context ()

    IdeContext *
    ide_workbench_get_context (IdeWorkbench *self);

Gets the context associated with the workbench, or `NULL`.

#### Parameters

self | An IdeWorkbench. |

#### Returns

An IdeContext or `NULL`.

[transfer none][nullable]

### ide_workbench_add_perspective ()

    void
    ide_workbench_add_perspective (IdeWorkbench *self,
                                   IdePerspective *perspective);

### ide_workbench_remove_perspective ()

    void
    ide_workbench_remove_perspective (IdeWorkbench *self,
                                      IdePerspective *perspective);

### ide_workbench_get_perspective_by_name ()

    IdePerspective *
    ide_workbench_get_perspective_by_name (IdeWorkbench *self,
                                           const gchar *name);

Gets the perspective by it's registered name as defined in `ide_perspective_get_id()`.

#### Returns

An IdePerspective or `NULL`.

[nullable][transfer none]

### ide_workbench_get_visible_perspective ()

    IdePerspective *
    ide_workbench_get_visible_perspective (IdeWorkbench *self);

Gets the current perspective.

#### Parameters

self | An IdeWorkbench. |

#### Returns

An IdePerspective.

[transfer none]

### ide_workbench_set_visible_perspective ()

    void
    ide_workbench_set_visible_perspective (IdeWorkbench *self,
                                           IdePerspective *perspective);

### ide_workbench_get_visible_perspective_name ()

    const gchar *
    ide_workbench_get_visible_perspective_name
                                   (IdeWorkbench *self);

### ide_workbench_set_visible_perspective_name ()

    void
    ide_workbench_set_visible_perspective_name
                                   (IdeWorkbench *self,
                                    const gchar *name);

### ide_workbench_get_fullscreen ()

    gboolean
    ide_workbench_get_fullscreen (IdeWorkbench *self);

### ide_workbench_set_fullscreen ()

    void
    ide_workbench_set_fullscreen (IdeWorkbench *self,
                                  gboolean fullscreen);

### ide_workbench_views_foreach ()

    void
    ide_workbench_views_foreach (IdeWorkbench *self,
                                 GtkCallback callback,
                                 gpointer user_data);

Executes `callback` for every IdeLayoutView across all perspectives.

#### Parameters

self | An IdeWorkbench. |
callback | The callback to execute. | [scope call]
user_data | user data for `callback` . |

## Types and Values

### IDE_TYPE_WORKBENCH

    #define IDE_TYPE_WORKBENCH (ide_workbench_get_type())

### IdeWorkbench

    typedef struct _IdeWorkbench IdeWorkbench;

## Property Details

### The `“context”` property

      “context”                  IdeContext *

The “context” property contains the IdeContext for the loaded project. Loading a project consists of creating an IdeContext, so there is a 1:1 mapping between "loaded project" and an IdeContext.

The IdeContext contains many of the important components of a project. For example, it contains the IdeVcs representing the active version control system and an IdeBuildSystem representing the current build system.

The creation of IdeWorkbenchAddin addins are deferred until this property has been set.

Flags: Read

### The `“visible-perspective”` property

      “visible-perspective”      IdePerspective *

This property contains the IdePerspective that is currently selected. Connect to the "notify::visible-perspective" signal to be notified when the perspective has been changed.

Flags: Read / Write

### The `“visible-perspective-name”` property

      “visible-perspective-name” gchar *

This property is just like “visible-perspective” except that it contains the name of the perspective as a string.

Flags: Read / Write

Default value: NULL

## Signal Details

### The `“action”` signal

    void
    user_function (IdeWorkbench *ideworkbench,
                   gchar        *arg1,
                   gchar        *arg2,
                   gchar        *arg3,
                   gpointer      user_data)

Flags: Action

### The `“set-perspective”` signal

    void
    user_function (IdeWorkbench *self,
                   gchar        *name,
                   gpointer      user_data)

This signal is meant for keybindings to change the current perspective.

#### Parameters

self | An IdeWorkbench |
name | the name of the perspective |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“unload”` signal

    void
    user_function (IdeWorkbench *ideworkbench,
                   IdeContext   *arg1,
                   gpointer      user_data)

Flags: Run Last