## GeditWindow GeditWindow |

## Functions

GeditTab * | gedit_window_create_tab ()
void | gedit_window_close_tab ()
void | gedit_window_close_all_tabs ()
void | gedit_window_close_tabs ()
GeditTab * | gedit_window_get_active_tab ()
void | gedit_window_set_active_tab ()
GeditView * | gedit_window_get_active_view ()
GeditDocument * | gedit_window_get_active_document ()
GList * | gedit_window_get_documents ()
GList * | gedit_window_get_unsaved_documents ()
GList * | gedit_window_get_views ()
GtkWindowGroup * | gedit_window_get_group ()
TeplPanel * | gedit_window_get_side_panel ()
GtkWidget * | gedit_window_get_bottom_panel ()
GtkWidget * | gedit_window_get_statusbar ()
GeditWindowState | gedit_window_get_state ()
GeditTab * | gedit_window_get_tab_from_location ()
GeditMessageBus * | gedit_window_get_message_bus ()

## Properties

GeditWindowState | state | Read

## Signals

void | active-tab-changed | Run First
void | active-tab-state-changed | Run First
void | tab-added | Run First
void | tab-removed | Run First
void | tabs-reordered | Run First

## Types and Values

struct | GeditWindow
enum | GeditWindowState

## Object Hierarchy

        GFlags
        ╰── GeditWindowState
        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── GtkApplicationWindow
                                ╰── GeditWindow

## Implemented Interfaces

GeditWindow implements AtkImplementorIface, GtkBuildable, GActionGroup and GActionMap.

## Description

## Functions

### gedit_window_create_tab ()

    GeditTab *
    gedit_window_create_tab (GeditWindow *window,
                             gboolean jump_to);

Creates a new GeditTab and adds it to the GtkNotebook.

#### Parameters

window | a GeditWindow. |
jump_to | if `TRUE`, the GtkNotebook switches to the new GeditTab. |

#### Returns

the new GeditTab.

[transfer none]

### gedit_window_close_tab ()

    void
    gedit_window_close_tab (GeditWindow *window,
                            GeditTab *tab);

Closes the `tab` .

#### Parameters

window | a GeditWindow |
tab | the GeditTab to close |

### gedit_window_close_all_tabs ()

    void
    gedit_window_close_all_tabs (GeditWindow *window);

Closes all opened tabs.

#### Parameters

window | a GeditWindow |

### gedit_window_close_tabs ()

    void
    gedit_window_close_tabs (GeditWindow *window,
                             const GList *tabs);

Closes all tabs specified by `tabs` .

#### Parameters

window | a GeditWindow |
tabs | a list of GeditTab. | [element-type Gedit.Tab]

### gedit_window_get_active_tab ()

    GeditTab *
    gedit_window_get_active_tab (GeditWindow *window);

Gets the active GeditTab in the `window` .

#### Parameters

window | a GeditWindow |

#### Returns

the active GeditTab in the `window` .

[transfer none]

### gedit_window_set_active_tab ()

    void
    gedit_window_set_active_tab (GeditWindow *window,
                                 GeditTab *tab);

Switches to the tab that matches with `tab` .

#### Parameters

window | a GeditWindow |
tab | a GeditTab |

### gedit_window_get_active_view ()

    GeditView *
    gedit_window_get_active_view (GeditWindow *window);

#### Parameters

window | a GeditWindow. |

#### Returns

the active GeditView.

[transfer none]

### gedit_window_get_active_document ()

    GeditDocument *
    gedit_window_get_active_document (GeditWindow *window);

#### Parameters

window | a GeditWindow. |

#### Returns

the active GeditDocument.

[transfer none]

### gedit_window_get_documents ()

    GList *
    gedit_window_get_documents (GeditWindow *window);

Gets a newly allocated list with all the documents in the window. This list must be freed.

#### Parameters

window | a GeditWindow |

#### Returns

a newly allocated list with all the documents in the window.

[element-type Gedit.Document][transfer container]

### gedit_window_get_unsaved_documents ()

    GList *
    gedit_window_get_unsaved_documents (GeditWindow *window);

Gets the list of documents that need to be saved before closing the window.

#### Parameters

window | a GeditWindow |

#### Returns

a list of GeditDocument that need to be saved before closing the window.

[element-type Gedit.Document][transfer container]

### gedit_window_get_views ()

    GList *
    gedit_window_get_views (GeditWindow *window);

Gets a list with all the views in the window. This list must be freed.

#### Parameters

window | a GeditWindow |

#### Returns

a newly allocated list with all the views in the window.

[element-type Gedit.View][transfer container]

### gedit_window_get_group ()

    GtkWindowGroup *
    gedit_window_get_group (GeditWindow *window);

Gets the GtkWindowGroup in which `window` resides.

#### Parameters

window | a GeditWindow |

#### Returns

the GtkWindowGroup.

[transfer none]

### gedit_window_get_side_panel ()

    TeplPanel *
    gedit_window_get_side_panel (GeditWindow *window);

#### Parameters

window | a GeditWindow |

#### Returns

the side panel.

[transfer none]

Since: 46

### gedit_window_get_bottom_panel ()

    GtkWidget *
    gedit_window_get_bottom_panel (GeditWindow *window);

Gets the bottom panel of the `window` .

#### Parameters

window | a GeditWindow |

#### Returns

the bottom panel's GtkStack.

[transfer none]

### gedit_window_get_statusbar ()

    GtkWidget *
    gedit_window_get_statusbar (GeditWindow *window);

Gets the GeditStatusbar of the `window` .

#### Parameters

window | a GeditWindow |

#### Returns

the GeditStatusbar of the `window` .

[transfer none]

### gedit_window_get_state ()

    GeditWindowState
    gedit_window_get_state (GeditWindow *window);

Retrieves the state of the `window` .

#### Parameters

window | a GeditWindow |

#### Returns

the current GeditWindowState of the `window` .

### gedit_window_get_tab_from_location ()

    GeditTab *
    gedit_window_get_tab_from_location (GeditWindow *window,
                                        GFile *location);

Gets the GeditTab that matches with the given `location` .

#### Parameters

window | a GeditWindow |
location | a GFile |

#### Returns

the GeditTab that matches with the given `location` .

[transfer none]

### gedit_window_get_message_bus ()

    GeditMessageBus *
    gedit_window_get_message_bus (GeditWindow *window);

Gets the GeditMessageBus associated with `window` . The returned reference is owned by the window and should not be unreffed.

#### Parameters

window | a GeditWindow |

#### Returns

the GeditMessageBus associated with `window` .

[transfer none]

## Types and Values

### struct GeditWindow

    struct GeditWindow;

### enum GeditWindowState

#### Members

GEDIT_WINDOW_STATE_NORMAL |  |
GEDIT_WINDOW_STATE_SAVING |  |
GEDIT_WINDOW_STATE_PRINTING |  |
GEDIT_WINDOW_STATE_LOADING |  |
GEDIT_WINDOW_STATE_ERROR |  |

## Property Details

### The `“state”` property

      “state”                    GeditWindowState

The state of the GeditWindow.

Owner: GeditWindow

Flags: Read

## Signal Details

### The `“active-tab-changed”` signal

    void
    user_function (GeditWindow *geditwindow,
                   GeditTab    *arg1,
                   gpointer     user_data)

Flags: Run First

### The `“active-tab-state-changed”` signal

    void
    user_function (GeditWindow *geditwindow,
                   gpointer     user_data)

Flags: Run First

### The `“tab-added”` signal

    void
    user_function (GeditWindow *geditwindow,
                   GeditTab    *arg1,
                   gpointer     user_data)

Flags: Run First

### The `“tab-removed”` signal

    void
    user_function (GeditWindow *geditwindow,
                   GeditTab    *arg1,
                   gpointer     user_data)

Flags: Run First

### The `“tabs-reordered”` signal

    void
    user_function (GeditWindow *geditwindow,
                   gpointer     user_data)

Flags: Run First