GtkWindowGroup

GtkWindowGroup — Limit the effect of grabs

Types and Values

Object Hierarchy

    GObject
    ╰── GtkWindowGroup

Includes

#include <gtk/gtk.h>

Description

A GtkWindowGroup restricts the effect of grabs to windows in the same group, thereby making window groups almost behave like separate applications.

A window can be a member in at most one window group at a time. Windows that have not been explicitly assigned to a group are implicitly treated like windows of the default window group.

GtkWindowGroup objects are referenced by each window in the group, so once you have added all windows to a GtkWindowGroup, you can drop the initial reference to the window group with g_object_unref(). If the windows in the window group are subsequently destroyed, then they will be removed from the window group and drop their references on the window group; when all window have been removed, the window group will be freed.

Functions

gtk_window_group_new ()

GtkWindowGroup *
gtk_window_group_new (void);

Creates a new GtkWindowGroup object.

Modality of windows only affects windows within the same GtkWindowGroup.

Returns

a new GtkWindowGroup.


gtk_window_group_add_window ()

void
gtk_window_group_add_window (GtkWindowGroup *window_group,
                             GtkWindow *window);

Adds a window to a GtkWindowGroup.

Parameters

window_group

a GtkWindowGroup

 

window

the GtkWindow to add

 

gtk_window_group_remove_window ()

void
gtk_window_group_remove_window (GtkWindowGroup *window_group,
                                GtkWindow *window);

Removes a window from a GtkWindowGroup.

Parameters

window_group

a GtkWindowGroup

 

window

the GtkWindow to remove

 

gtk_window_group_list_windows ()

GList *
gtk_window_group_list_windows (GtkWindowGroup *window_group);

Returns a list of the GtkWindows that belong to window_group .

Parameters

window_group

a GtkWindowGroup

 

Returns

A newly-allocated list of windows inside the group.

[element-type GtkWindow][transfer container]

Types and Values

GtkWindowGroup

typedef struct _GtkWindowGroup GtkWindowGroup;