Class

AdwWindow

Description [src]

class Adw.Window : Gtk.Window {
  parent_instance: GtkWindow
}

A freeform window.

window

The AdwWindow widget is a subclass of GtkWindow which has no titlebar area. Instead, AdwToolbarView can be used together with AdwHeaderBar or GtkHeaderBar as follows:

<object class="AdwWindow">
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
    </object>
  </property>
</object>

Using GtkWindow:titlebar or GtkWindow:child is not supported and will result in a crash. Use AdwWindow:content instead.

Breakpoints

AdwWindow can be used with AdwBreakpoint the same way as AdwBreakpointBin. Refer to that widget’s documentation for details.

Example:

<object class="AdwWindow">
  <property name="width-request">360</property>
  <property name="height-request">200</property>
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
      <child type="bottom">
        <object class="GtkActionBar" id="bottom_bar">
          <property name="revealed">True</property>
          <property name="visible">False</property>
        </object>
      </child>
    </object>
  </property>
  <child>
    <object class="AdwBreakpoint">
      <condition>max-width: 500px</condition>
      <setter object="bottom_bar" property="visible">True</setter>
    </object>
  </child>
</object>

Like AdwBreakpointBin, if breakpoints are used, AdwWindow doesn’t have a minimum size, and GtkWidget:width-request and GtkWidget:height-request properties must be set manually.

Ancestors

  • GtkWindow
  • GtkWidget
  • GInitiallyUnowned
  • GObject

Implements

  • GtkAccessible
  • GtkBuildable
  • GtkConstraintTarget
  • GtkNative
  • GtkRoot
  • GtkShortcutManager

Constructors

adw_window_new

Creates a new AdwWindow.

Instance methods

adw_window_add_breakpoint

Adds breakpoint to self.

Available since: 1.4

adw_window_get_content

Gets the content widget of self.

adw_window_get_current_breakpoint

Gets the current breakpoint.

Available since: 1.4

adw_window_set_content

Sets the content widget of self.

Properties

Adw.Window:content

The content widget.

Adw.Window:current-breakpoint

The current breakpoint.

Available since: 1.4

Class structure

struct AdwWindowClass {
  GtkWindowClass parent_class;
  
}
Class members
parent_class
GtkWindowClass
  No description available.