Package: gtk

Function gtk-menu-popup

Lambda List

gtk-menu-popup (menu &key shell item func button time)

Arguments

menu -- a gtk-menu widget
shell -- a gtk-menu-shell widget containing the triggering menu item, or nil
item -- a gtk-menu-item widget whose activation triggered the popup, or nil
func -- a user supplied gtk-menu-position-func callback function used to position the menu, or nil
button -- an unsigned integer with the mouse button which was pressed to initiate the event
time -- an unsigned integer with the time at which the activation event occurred

Details

Displays a menu and makes it available for selection. Applications can use this function to display context-sensitive menus, and will typically supply nil for the shell, item, and func parameter. The default menu positioning function will position the menu at the current mouse cursor position.

The button parameter should be the mouse button pressed to initiate the menu popup. If the menu popup was initiated by something other than a mouse button press, such as a mouse button release or a keypress, button should be 0.

The time parameter is used to conflict-resolve initiation of concurrent requests for mouse/keyboard grab requests. To function properly, this needs to be the timestamp of the user event, such as a mouse click or key press, that caused the initiation of the popup. Only if no such event is available, the gtk-current-event-time function can be used instead.

Warning

The gtk-menu-popup function has been deprecated since version 3.22 and should not be used in newly written code. Please use the gtk-menu-popup-at-widget, gtk-menu-popup-at-pointer, or gtk-menu-popup-at-rect functions instead.
 

See also

2021-11-14