1.7 <AdwApplicationWindow>

Class: <AdwApplicationWindow>

It derives from <GtkApplicationWindow>.

A freeform application window.

<AdwApplicationWindow> is a <GtkApplicationWindow> subclass providing the same features as Window.

See Window for details.

Example of an <AdwApplicationWindow> UI definition:

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

Using application:menubar is not supported and may result in visual glitches.

Fields

parent-instance

Properties

Property: application-window:adaptive-preview self

Whether 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! (application-window:adaptive-preview self) value).

Property: application-window:content self

The content widget.

This property should always be used instead of window:child.

Its value is a <GtkWidget>, or #f.

Set it with (set! (application-window:content self) value).

Property: application-window:current-breakpoint self

The current breakpoint.

Its value is a <AdwBreakpoint>, or #f.

It is read only.

Property: application-window:dialogs self

The open dialogs.

Its value is a <GListModel>, or #f.

It is read only.

Property: application-window:visible-dialog self

The currently visible dialog

Its value is a <AdwDialog>, or #f.

It is read only.

Procedures

Method: application-window:add-breakpoint self breakpoint
Method: add-breakpoint self breakpoint

Adds breakpoint to self.

self

Passed: a <AdwApplicationWindow>.

an application window

breakpoint

Passed: a <AdwBreakpoint>.

the breakpoint to add

Method: application-window:get-adaptive-preview? self ⇒ %return
Method: get-adaptive-preview? self ⇒ %return

Gets whether adaptive preview for self is currently open.

self

Passed: a <AdwApplicationWindow>.

an application window

%return

Returned: a boolean.

whether adaptive preview is open.

Method: application-window:get-content self ⇒ %return
Method: get-content self ⇒ %return

Gets the content widget of self.

This method should always be used instead of window:get-child.

self

Passed: a <AdwApplicationWindow>.

an application window

%return

Returned: a <GtkWidget>, or #f.

the content widget of self

Method: application-window:get-current-breakpoint self ⇒ %return
Method: get-current-breakpoint self ⇒ %return

Gets the current breakpoint.

self

Passed: a <AdwApplicationWindow>.

an application window

%return

Returned: a <AdwBreakpoint>, or #f.

the current breakpoint

Method: application-window:get-dialogs self ⇒ %return
Method: get-dialogs self ⇒ %return

Returns a <GListModel> that contains the open dialogs of self.

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

self

Passed: a <AdwApplicationWindow>.

an application window

%return

Returned: a <GListModel>.

a list model for the dialogs of self

Method: application-window:get-visible-dialog self ⇒ %return
Method: get-visible-dialog self ⇒ %return

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

self

Passed: a <AdwApplicationWindow>.

an application window

%return

Returned: a <AdwDialog>, or #f.

the visible dialog

Procedure: application-window:new app ⇒ %return

Creates a new <AdwApplicationWindow> for app.

app

Passed: a <GtkApplication>.

an application instance

%return

Returned: a <GtkWidget>.

the newly created <AdwApplicationWindow>

Method: application-window:set-adaptive-preview self adaptive-preview
Method: set-adaptive-preview self adaptive-preview

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.

self

Passed: a <AdwApplicationWindow>.

an application window

adaptive-preview

Passed: a boolean.

whether to open adaptive preview

Method: application-window:set-content self [content]
Method: set-content self [content]

Sets the content widget of self.

This method should always be used instead of window:set-child.

self

Passed: a <AdwApplicationWindow>.

an application window

content

Passed, or left out: a <GtkWidget>, or #f.

the content widget