Menu.popupForDevice

Displays a menu and makes it available for selection. Applications can use this function to display context-sensitive menus, and will typically supply NULL for the parent_menu_shell, parent_menu_item, func, data and destroy parameters. The default menu positioning function will position the menu at the current position of device (or its corresponding pointer). 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 activate_time parameter is used to conflict-resolve initiation of concurrent requests for mouse/keyboard grab requests. To function properly, this needs to be the time stamp 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, gtk_get_current_event_time() can be used instead.

Parameters

device Device

a GdkDevice. [allow-none]

parentMenuShell Widget

the menu shell containing the triggering menu item, or NULL. [allow-none]

parentMenuItem Widget

the menu item whose activation triggered the popup, or NULL. [allow-none]

func GtkMenuPositionFunc

a user supplied function used to position the menu, or NULL. [allow-none]

data void*

user supplied data to be passed to func. [allow-none]

destroy GDestroyNotify

destroy notify for data. [allow-none]

button uint

the mouse button which was pressed to initiate the event

activateTime uint

the time at which the activation event occurred Since 3.0

Meta