gtk_menu_popup_until_mapped


Description:


[ Version ( since = "4.14" ) ]
public bool gtk_menu_popup_until_mapped (Menu menu, Widget? parent_menu_shell, Widget? parent_menu_item, MenuPositionFunc? func, uint button, uint32 activate_time)

Attempts to pop up a Menu for a short duration.

Unlike the original popup, this function will verify that the menu has been mapped or will keep trying for up to 250ms. It will also return a value indicating whether the menu was eventually mapped or not. Following is an excerpt from the GTK+ Documentation on Menu.

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 and data parameters. 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 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 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, get_current_event_time can be used instead.

Parameters:

menu

a Menu.

parent_menu_shell

the menu shell containing the triggering menu item, or null.

parent_menu_item

the menu item whose activation triggered the popup, or null.

func

a user supplied function used to position the menu, or null.

button

the mouse button which was pressed to initiate the event.

activate_time

the time at which the activation event occurred.

data

user supplied data to be passed to func.

Returns:

true if the menu could be mapped, false otherwise.


Namespace: Xfce
Package: libxfce4ui-2