Class Window

All Implemented Interfaces:
PointerInterface
Direct Known Subclasses:
AboutWindow, PreferencesWindow

public class Window extends Window
A freeform window.

<picture>
<source srcset="window-dark.png" media="(prefers-color-scheme: dark)">
<img src="window.png" alt="window">
</picture>

The `AdwWindow` widget is a subclass of [class@Gtk.Window] which has no
titlebar area. It means [class@Gtk.HeaderBar] can be used as follows:

```xml
<object class="AdwWindow">
<property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkHeaderBar"/>
</child>
<child>
<!-- ... -->
</child>
</object>
</property>
</object>
```

Using [property@Gtk.Window:titlebar] or [property@Gtk.Window:child]
is not supported and will result in a crash. Use [property@Window:content]
instead.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Window.html

  • Constructor Details

    • Window

      public Window(PointerContainer pointer)
    • Window

      public Window()
      Creates a new `AdwWindow`.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getContent

      public Widget getContent()
      Gets the content widget of @self.

      This method should always be used instead of [method@Gtk.Window.get_child].
      Returns:
      the content widget of @self
    • setContent

      public void setContent(@Nullable Widget content)
      Sets the content widget of @self.

      This method should always be used instead of [method@Gtk.Window.set_child].
      Parameters:
      content - the content widget
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Window
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Window
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Window
      Returns:
      ConstraintTarget
    • asNative

      public Native asNative()
      Implements interface Native. Call this to get access to interface functions.
      Overrides:
      asNative in class Window
      Returns:
      Native
    • asRoot

      public Root asRoot()
      Implements interface Root. Call this to get access to interface functions.
      Overrides:
      asRoot in class Window
      Returns:
      Root
    • asShortcutManager

      public ShortcutManager asShortcutManager()
      Implements interface ShortcutManager. Call this to get access to interface functions.
      Overrides:
      asShortcutManager in class Window
      Returns:
      ShortcutManager
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()