Adw.ApplicationWindow

g Adw.ApplicationWindow Adw.ApplicationWindow GObject.GInterface GObject.GInterface Gio.ActionGroup Gio.ActionGroup GObject.GInterface->Gio.ActionGroup Gio.ActionMap Gio.ActionMap GObject.GInterface->Gio.ActionMap Gtk.Accessible Gtk.Accessible GObject.GInterface->Gtk.Accessible Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.ConstraintTarget Gtk.ConstraintTarget GObject.GInterface->Gtk.ConstraintTarget Gtk.Native Gtk.Native GObject.GInterface->Gtk.Native Gtk.Root Gtk.Root GObject.GInterface->Gtk.Root Gtk.ShortcutManager Gtk.ShortcutManager GObject.GInterface->Gtk.ShortcutManager GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.Widget Gtk.Widget GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.ApplicationWindow Gtk.ApplicationWindow Gio.ActionGroup->Gtk.ApplicationWindow Gio.ActionMap->Gtk.ApplicationWindow Gtk.Accessible->Gtk.Widget Gtk.ApplicationWindow->Adw.ApplicationWindow Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget->Gtk.Widget Gtk.Window Gtk.Window Gtk.Native->Gtk.Window Gtk.Root->Gtk.Window Gtk.ShortcutManager->Gtk.Window Gtk.Widget->Gtk.Window Gtk.Window->Gtk.ApplicationWindow

Subclasses:

None

Methods

Inherited:

Gtk.ApplicationWindow (6), Gtk.Window (62), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Native (6), Gtk.Root (3), Gio.ActionGroup (14), Gio.ActionMap (5)

Structs:

Gtk.WidgetClass (18), GObject.ObjectClass (5)

class

new (app)

add_breakpoint (breakpoint)

get_content ()

get_current_breakpoint ()

get_dialogs ()

get_visible_dialog ()

set_content (content)

Virtual Methods

Inherited:

Gtk.Window (5), Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9), Gtk.ShortcutManager (2), Gio.ActionGroup (14), Gio.ActionMap (3)

Properties

Inherited:

Gtk.ApplicationWindow (1), Gtk.Window (25), Gtk.Widget (34), Gtk.Accessible (1)

Name

Type

Flags

Short Description

content

Gtk.Widget

r/w/en

current-breakpoint

Adw.Breakpoint

r

dialogs

Gio.ListModel

r

visible-dialog

Adw.Dialog

r

Signals

Inherited:

Gtk.Window (5), Gtk.Widget (13), GObject.Object (1), Gio.ActionGroup (4)

Fields

Inherited:

Gtk.Window (5), Gtk.Widget (13), GObject.Object (1), Gio.ActionGroup (4)

Name

Type

Access

Description

parent_instance

Gtk.ApplicationWindow

r

Class Details

class Adw.ApplicationWindow(*args, **kwargs)
Bases:

Gtk.ApplicationWindow

Abstract:

No

Structure:

Adw.ApplicationWindowClass

A freeform application window.

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

AdwApplicationWindow is a [class`Gtk`.ApplicationWindow] subclass providing the same features as [class`Window`].

See [class`Window`] for details.

Example of an AdwApplicationWindow UI definition:

``xml <object class=”AdwApplicationWindow”>

<property name=”content”>
<object class=”AdwToolbarView”>
<child type=”top”>

<object class=”AdwHeaderBar”/>

</child> <property name=”content”>

<!– … –>

</property>

</object>

</property>

</object> ``

Using [property`Gtk`.Application:menubar] is not supported and may result in visual glitches.

classmethod new(app)
Parameters:

app (Gtk.Application) – an application instance

Returns:

the newly created AdwApplicationWindow

Return type:

Gtk.Widget

Creates a new AdwApplicationWindow for app.

add_breakpoint(breakpoint)
Parameters:

breakpoint (Adw.Breakpoint) – the breakpoint to add

Adds breakpoint to self.

New in version 1.4.

get_content()
Returns:

the content widget of self

Return type:

Gtk.Widget or None

Gets the content widget of self.

This method should always be used instead of [method`Gtk`.Window.get_child].

get_current_breakpoint()
Returns:

the current breakpoint

Return type:

Adw.Breakpoint or None

Gets the current breakpoint.

New in version 1.4.

get_dialogs()
Returns:

a list model for the dialogs of self

Return type:

Gio.ListModel

Returns a [iface`Gio`.ListModel] that contains the open dialogs of self.

This can be used to keep an up-to-date view.

New in version 1.5.

get_visible_dialog()
Returns:

the visible dialog

Return type:

Adw.Dialog or None

Returns the currently visible dialog in self, if there’s one.

New in version 1.5.

set_content(content)
Parameters:

content (Gtk.Widget or None) – the content widget

Sets the content widget of self.

This method should always be used instead of [method`Gtk`.Window.set_child].

Property Details

Adw.ApplicationWindow.props.content
Name:

content

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The content widget.

This property should always be used instead of [property`Gtk`.Window:child].

Adw.ApplicationWindow.props.current_breakpoint
Name:

current-breakpoint

Type:

Adw.Breakpoint

Default Value:

None

Flags:

READABLE

The current breakpoint.

New in version 1.4.

Adw.ApplicationWindow.props.dialogs
Name:

dialogs

Type:

Gio.ListModel

Default Value:

None

Flags:

READABLE

The open dialogs.

New in version 1.5.

Adw.ApplicationWindow.props.visible_dialog
Name:

visible-dialog

Type:

Adw.Dialog

Default Value:

None

Flags:

READABLE

The currently visible dialog

New in version 1.5.