Class WindowGroup

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class WindowGroup extends GObject

Creates groups of windows that behave like separate applications.

It achieves this by limiting the effect of GTK grabs and modality to windows in the same group.

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.

  • Constructor Details

    • WindowGroup

      public WindowGroup(MemorySegment address)
      Create a WindowGroup instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • WindowGroup

      public WindowGroup()
      Create a new WindowGroup.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the WindowGroup class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected WindowGroup asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • addWindow

      public void addWindow(Window window)
      Adds a window to a GtkWindowGroup.
      Parameters:
      window - the GtkWindow to add
    • listWindows

      public List<Window> listWindows()
      Returns a list of the GtkWindows that belong to windowGroup.
      Returns:
      A newly-allocated list of windows inside the group.
    • removeWindow

      public void removeWindow(Window window)
      Removes a window from a GtkWindowGroup.
      Parameters:
      window - the GtkWindow to remove
    • builder

      public static WindowGroup.Builder<? extends WindowGroup.Builder> builder()
      A WindowGroup.Builder object constructs a WindowGroup with the specified properties. Use the various set...() methods to set properties, and finish construction with WindowGroup.Builder.build().
      Returns:
      the builder object