Gtk.WindowGroup


Gtk.WindowGroup — Limit the effect of grabs

Object Hierarchy:

    GObject
    ╰── Gtk.WindowGroup

Functions:

Description:

A Gtk.WindowGroup 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.

Gtk.WindowGroup objects are referenced by each window in the group, so once you have added all windows to a Gtk.WindowGroup, 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.


Function Details:

new()

new () -> Gtk.WindowGroup

Creates a new Gtk.WindowGroup object. Grabs added with`Gtk.Grab:add()only affect windows within the sameGtk.WindowGroup`.

  • Returns: a new Gtk.WindowGroup.

add_window()

add_window (self, window:Gtk.Window)

Adds a window to a Gtk.WindowGroup.


remove_window()

remove_window (self, window:Gtk.Window)

Removes a window from a Gtk.WindowGroup.


list_windows()

list_windows (self) -> list

Returns a list of the Gtk.Windows that belong to window_group.

  • Returns: Anewly-allocated list of windows inside the group.

  • Since: 2.14


get_current_grab()

get_current_grab (self) -> Gtk.Widget

Gets the current grab widget of the given group,see `Gtk.Grab:add()`.

  • Returns: the current grab widget of the group.

  • Since: 2.22


get_current_device_grab()

get_current_device_grab (self, device:Gdk.Device) -> Gtk.Widget

Returns the current grab widget for device, or None if none.

  • Returns: The grab widget, or None.

  • Since: 3.0


results matching ""

    No results matching ""