It derives from <GtkWindow>.
A freeform window.
The <AdwWindow> widget is a subclass of
<GtkWindow> which has no titlebar area.
Instead, ToolbarView can be used together with HeaderBar
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 window:titlebar or
window:child is not supported
and will result in a crash. Use Window:content instead.
<AdwWindow> can contain Dialog. Use
Dialog.present with the window or a widget within a window to
show a dialog.
<AdwWindow> can be used with Breakpoint the
same way as BreakpointBin. Refer to that widget’s documentation
for details.
Example:
<object class="AdwWindow">
<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>
When breakpoints are used, the minimum size must be larger than the
smallest UI state. <AdwWindow> defaults to the
minimum size of 360×200 px. If that’s too small, set the
widget:width-request and
widget:height-request
properties manually.
<AdwWindow> has a debug tool called adaptive
preview. It can be opened from GTK Inspector or by pressing
Ctrl+Shift+M, and controlled via the
Window:adaptive-preview property.
parent-instanceWhether adaptive preview is currently open.
Adaptive preview is a debugging tool used for testing the window contents at specific screen sizes, simulating mobile environment.
Adaptive preview can always be accessed from inspector. This function allows applications to open it manually.
Most applications should not use this property.
Its value is a boolean.
Set it with (set! (window:adaptive-preview self) value).
The content widget.
This property should always be used instead of window:child.
Its value is a <GtkWidget>, or #f.
Set it with (set! (window:content self) value).
The current breakpoint.
Its value is a <AdwBreakpoint>, or #f.
It is read only.
The open dialogs.
Its value is a <GListModel>, or #f.
It is read only.
The currently visible dialog
Its value is a <AdwDialog>, or #f.
It is read only.
Adds breakpoint to self.
Passed: a <AdwWindow>.
a window
Passed: a <AdwBreakpoint>.
the breakpoint to add
Gets whether adaptive preview for self is currently open.
Passed: a <AdwWindow>.
a window
Returned: a boolean.
whether adaptive preview is open.
Gets the content widget of self.
This method should always be used instead of window:get-child.
Passed: a <AdwWindow>.
a window
Returned: a <GtkWidget>, or #f.
the content widget of self
Gets the current breakpoint.
Passed: a <AdwWindow>.
a window
Returned: a <AdwBreakpoint>, or #f.
the current breakpoint
Returns a <GListModel> that contains the
open dialogs of self.
This can be used to keep an up-to-date view.
Passed: a <AdwWindow>.
a window
Returned: a <GListModel>.
a list model for the dialogs of self
Returns the currently visible dialog in self, if there’s one.
Passed: a <AdwWindow>.
a window
Returned: a <AdwDialog>, or #f.
the visible dialog
Creates a new <AdwWindow>.
Returned: a <GtkWidget>.
the newly created <AdwWindow>
Sets whether adaptive preview for self is currently open.
Adaptive preview is a debugging tool used for testing the window contents at specific screen sizes, simulating mobile environment.
Adaptive preview can always be accessed from inspector. This function allows applications to open it manually.
Most applications should not use this function.
Passed: a <AdwWindow>.
a window
Passed: a boolean.
whether to open adaptive preview
Sets the content widget of self.
This method should always be used instead of window:set-child.
Passed: a <AdwWindow>.
a window
Passed, or left out: a <GtkWidget>, or
#f.
the content widget