Basics
Guides
API Reference
Basics
Guides
API Reference
[412:14] static extends: object
Generated metadata helpers for ApplicationWindow class surfaces.
properties ()
Returns property metadata for
ApplicationWindow.
A list.signals ()
Returns signal metadata for
ApplicationWindow.
A list.[47:7] extends: object
A GtkWindow subclass that integrates with GtkApplication. Notably,
GtkApplicationWindow can handle an application menubar. This class
implements the [iface@Gio.ActionGroup] and [iface@Gio.ActionMap] interfaces,
to let you add window-specific actions that will be exported by the
associated [class@Gtk.Application], together with its application-wide
actions. Window-specific actions are prefixed with the “win.” prefix and
application-wide actions are prefixed with the “app.” prefix. Actions must be
addressed with the prefixed name when referring to them from a menu model.
Note that widgets that are placed inside a GtkApplicationWindow can also
activate these actions, if they implement the [iface@Gtk.Actionable]
interface. The settings [property@Gtk.Settings:gtk-shell-shows-app-menu] and
[property@Gtk.Settings:gtk-shell-shows-menubar] tell GTK whether the desktop
environment is showing the application menu and menubar models outside the
application as part of the desktop shell. For instance, on OS X, both menus
will be displayed remotely; on Windows neither will be. If the desktop
environment does not display the menubar, it can be shown in the
GtkApplicationWindow by setting the
[property@Gtk.ApplicationWindow:show-menubar] property to true. If the
desktop environment does not display the application menu, then it will
automatically be included in the menubar or in the window’s client-side
decorations. See [class@Gtk.PopoverMenu] for information about the XML
language used by GtkBuilder for menu models. See also:
[method@Gtk.Application.set_menubar]. ## A GtkApplicationWindow with a
menubar The code sample below shows how to set up a GtkApplicationWindow
with a menu bar defined on the [class@Gtk.Application]: c GtkApplication *app = gtk_application_new ("org.gtk.test", 0); GtkBuilder *builder = gtk_builder_new_from_string ( "<interface>" " <menu id='menubar'>" " <submenu>" " <attribute name='label' translatable='yes'>_Edit</attribute>" " <item>" " <attribute name='label' translatable='yes'>_Copy</attribute>" " <attribute name='action'>win.copy</attribute>" " </item>" " <item>" " <attribute name='label' translatable='yes'>_Paste</attribute>" " <attribute name='action'>win.paste</attribute>" " </item>" " </submenu>" " </menu>" "</interface>", -1); GMenuModel *menubar = G_MENU_MODEL (gtk_builder_get_object (builder, "menubar")); gtk_application_set_menubar (GTK_APPLICATION (app), menubar); g_object_unref (builder); // ... GtkWidget *window = gtk_application_window_new (app);
ApplicationWindow (application = null)
Creates a new
GtkApplicationWindow.
application is an application.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWindow ()
Wraps this handle as
Window.
A Window object.asActionGroup ()
Wraps this handle as
ActionGroup.
A ActionGroup object.asActionMap ()
Wraps this handle as
ActionMap.
A ActionMap object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.asNative ()
Wraps this handle as
Native.
A Native object.asRoot ()
Wraps this handle as
Root.
A Root object.asShortcutManager ()
Wraps this handle as
ShortcutManager.
A ShortcutManager object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnSavestate (callback Fn, UserData = null)
The handler for this signal should persist any application-specific state of @window into @dict. Note that window management state such as maximized, fullscreen, or window size should not be saved as part of this, they are handled by GTK. You must be careful to be robust in the face of app upgrades and downgrades: the @state might have been created by a previous or occasionally even a future version of your app. Do not assume that a given key exists in the state. Apps must try to restore state saved by a previous version, but are free to discard state if it was written by a future version. See [signal@Gtk.Application::restore-window].
Fn is the Aussom callback.Fn is called with (ApplicationWindow Self, VariantDict Dict).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setShowmenubar (bool Value)
If this property is true, the window will display a menubar unless it is shown by the desktop shell. See [method@Gtk.Application.set_menubar]. If false, the window will not display a menubar, regardless of whether the desktop shell is showing it or not.
Value is the new property value.None.get_help_overlay ()
Gets the
GtkShortcutsWindowthat is associated with @window. See [method@Gtk.ApplicationWindow.set_help_overlay].
get_id ()
Returns the unique ID of the window. If the window has not yet been added to a
GtkApplication, returns0.
get_show_menubar ()
Returns whether the window will display a menubar for the app menu and menubar as needed.
set_help_overlay (object help_overlay)
Associates a shortcuts window with the application window. Additionally, sets up an action with the name
win.show-help-overlayto present it. The window takes responsibility for destroying the help overlay.
help_overlay is a shortcuts window.None.set_show_menubar (bool show_menubar)
Sets whether the window will display a menubar for the app menu and menubar as needed.
show_menubar is whether to show a menubar when needed.None.[341:7] extends: object
Generated low-level callback wrapper for GIR callback save-state.
ApplicationWindowSavestateCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, dict, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.