Package: gtk

Accessor gtk-application-app-menu

Lambda List

gtk-application-app-menu (object)

Syntax

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

Arguments

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

Details

Accessor of the app-menu slot of the gtk-application class.

The gtk-application-app-menu slot access function returns the application menu model that has been set. The (setf gtk-application-app-menu) slot access function 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 base g-action-map interface to add actions, to respond to the user selecting these menu items.
 

See also

*2021-10-10