GdaBrowser hacking manual: BrowserWindow

## BrowserWindow BrowserWindow — A top level browser window |

## Stability Level

Stable, unless otherwise indicated

## Functions

BrowserWindow * | browser_window_new ()
BrowserConnection * | browser_window_get_connection ()
guint | browser_window_push_status ()
void | browser_window_pop_status ()
void | browser_window_show_notice ()
void | browser_window_show_notice_printf ()
void | browser_window_customize_perspective_ui ()
BrowserPerspective * | browser_window_change_perspective ()
gboolean | browser_window_is_fullscreen ()
void | browser_window_set_fullscreen ()

## Signals

void | fullscreen-changed | Run Last

## Types and Values

| BrowserWindowPrivate
| BrowserWindow

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── BrowserWindow

## Implemented Interfaces

BrowserWindow implements AtkImplementorIface and GtkBuildable.

## Description

Each top level browser window is represented by a BrowserWindow object, and uses a single BrowserConnection connection object.

## Functions

### browser_window_new ()

    BrowserWindow *
    browser_window_new (BrowserConnection *bcnc,
                        BrowserPerspectiveFactory *factory);

Creates a new BrowserWindow window for the `bcnc` connection, and displays it. If `factory` is not `NULL`, then the new window will show the perspective corresponding to `factory` . If it's `NULL`, then the default BrowserPerspectiveFactory will be used, see `browser_core_get_default_factory()`.

Don't forget to call `browser_core_take_window()` to have the new window correctly managed by the browser. Similarly, to close the window, use `browser_core_close_window()` and not simply `gtk_widget_destroy()`.

#### Parameters

bcnc | a BrowserConnection |
factory | a BrowserPerspectiveFactory, may be `NULL` |

#### Returns

the new object

### browser_window_get_connection ()

    BrowserConnection *
    browser_window_get_connection (BrowserWindow *bwin);

#### Parameters

bwin | a BrowserWindow |

#### Returns

the BrowserConnection used in `bwin`

### browser_window_push_status ()

    guint
    browser_window_push_status (BrowserWindow *bwin,
                                const gchar *context,
                                const gchar *text,
                                gboolean auto_clear);

Pushes a new message onto `bwin` 's statusbar's stack.

#### Parameters

bwin | a BrowserWindow |
context | textual description of what context the new message is being used in |
text | textual message |
auto_clear | `TRUE` if the message has to disappear after a while |

#### Returns

the message ID, see `gtk_statusbar_push()`, or `0` if `auto_clear` is `TRUE`

### browser_window_pop_status ()

    void
    browser_window_pop_status (BrowserWindow *bwin,
                               const gchar *context);

Removes the first message in the `bwin` 's statusbar's stack with the given context.

#### Parameters

bwin | a BrowserWindow |
context | textual description of what context the message is being used in |

### browser_window_show_notice ()

    void
    browser_window_show_notice (BrowserWindow *bwin,
                                GtkMessageType type,
                                const gchar *context,
                                const gchar *text);

Makes `bwin` display a notice

#### Parameters

bwin | a BrowserWindow |
context | textual description of what context the message is being used in |
text | the information's text |

### browser_window_show_notice_printf ()

    void
    browser_window_show_notice_printf (BrowserWindow *bwin,
                                       GtkMessageType type,
                                       const gchar *context,
                                       const gchar *format,
                                       ...);

Make `bwin` display a notice

#### Parameters

bwin | a BrowserWindow |
context | textual description of what context the message is being used in |
format | the text to display |

### browser_window_customize_perspective_ui ()

    void
    browser_window_customize_perspective_ui
                                   (BrowserWindow *bwin,
                                    BrowserPerspective *bpers,
                                    GtkActionGroup *actions_group,
                                    const gchar *ui_info);

Customizes a UI specific to the `bpers` perspective. Any previous customization is removed, replaced by the new requested one.

If `actions_group` is `NULL` then any it simply removes the customization.

#### Parameters

bwin | a BrowserWindow |
bpers | the BrowserPerspective concerned |
actions_group | a GtkActionGroup object, or `NULL`. | [allow-none]
ui_info | a merge UI string, or `NULL`. See `gtk_ui_manager_add_ui_from_string()`. | [allow-none]

### browser_window_change_perspective ()

    BrowserPerspective *
    browser_window_change_perspective (BrowserWindow *bwin,
                                       const gchar *perspective);

Make `bwin` switch to the perspective named `perspective`

#### Parameters

bwin | a BrowserWindow |
perspective | the name of the perspective to change to |

#### Returns

a pointer to the BrowserPerspective, or `NULL` if not found

### browser_window_is_fullscreen ()

    gboolean
    browser_window_is_fullscreen (BrowserWindow *bwin);

#### Parameters

bwin | a BrowserWindow |

#### Returns

`TRUE` if `bwin` is fullscreen

### browser_window_set_fullscreen ()

    void
    browser_window_set_fullscreen (BrowserWindow *bwin,
                                   gboolean fullscreen);

Requires `bwin` to be fullscreen if `fullscreen` is `TRUE`

#### Parameters

bwin | a BrowserWindow |

## Types and Values

### BrowserWindowPrivate

    typedef struct _BrowserWindowPrivate BrowserWindowPrivate;

### BrowserWindow

    typedef struct _BrowserWindow BrowserWindow;

## Signal Details

### The `“fullscreen-changed”` signal

    void
    user_function (BrowserWindow *browserwindow,
                   gboolean       arg1,
                   gpointer       user_data)

Flags: Run Last