Package: gtk

Accessor gtk:application-app-menu

Lambda List

gtk:application-app-menu (object)

Syntax

(gtk:application-app-menu object) => menu
(setf (gtk:application-app-menu object) menu)

Arguments

object -- a gtk:application instance
menu -- a g:menu-model object, or nil

Details

The accessor for the app-menu slot gets or sets the application menu. This can only be done in the primary instance of the application, after it has been registered. The handler for the "startup" signal is a good place to call this.

The application menu is a single menu containing items that typically impact the application as a whole, rather than acting on a specific window or document. For example, you would expect to see "Preferences" or "Quit" in an application menu, but not "Save" or "Print". If supported, the application menu will be rendered by the desktop environment.

Use the g:action-map interface to add actions, to respond to the user selecting these menu items.
 

See also

2026-06-17