ContextMenuItem.from_stock_action


Description:

[ CCode ( has_construct_function = false ) ]
public ContextMenuItem.from_stock_action (ContextMenuAction action)

Creates a new ContextMenuItem for the given stock action.

Stock actions are handled automatically by WebKit so that, for example, when a menu item created with a webkit_context_menu_action_stop is activated the action associated will be handled by WebKit and the current load operation will be stopped. You can get the Action of a ContextMenuItem created with a ContextMenuAction with get_gaction and connect to the activate signal to be notified when the item is activated, but you can't prevent the associated action from being performed.

Parameters:

action

a ContextMenuAction stock action

Returns:

the newly created ContextMenuItem object.




2022 vala-language.org