webkit.context_menu
Module for [ContextMenu] class
Types 3
Represents the context menu in a #WebKitWebView.
#WebKitContextMenu represents a context menu containing #WebKitContextMenuItem<!-- -->s in a #WebKitWebView.
When a #WebKitWebView is about to display the context menu, it emits the #WebKitWebView::context-menu signal, which has the #WebKitContextMenu as an argument. You can modify it, adding new submenus that you can create with webkitwebprocessextension.context_menu.ContextMenu.new_, adding new #WebKitContextMenuItem<!-- -->s with webkitwebprocessextension.context_menu.ContextMenu.prepend, webkitwebprocessextension.context_menu.ContextMenu.append or webkitwebprocessextension.context_menu.ContextMenu.insert, maybe after having removed the existing ones with webkitwebprocessextension.context_menu.ContextMenu.removeAll.
ContextMenuGidBuilder builder() static nothrowGet builder for [webkit.context_menu.ContextMenu] Returns: New builder objectwebkit.context_menu.ContextMenu newWithItems(webkit.context_menu_item.ContextMenuItem[] items) static nothrowCreates a new #WebKitContextMenu object with the given items.webkit.context_menu_item.ContextMenuItem first() nothrowGets the first item in the menu. Returns: the first #WebKitContextMenuItem of menu, or null if the #WebKitContextMenu is empty.gdk.event.Event getEvent() nothrowGets the #GdkEvent that triggered the context menu. This function only returns a valid #GdkEvent when called for a #WebKitContextMenu passed to #WebKitWebView::context-menu signal; in all other cas...webkit.context_menu_item.ContextMenuItem getItemAtPosition(uint position) nothrowGets the item at the given position in the menu.webkit.context_menu_item.ContextMenuItem[] getItems() nothrowReturns the item list of menu. Returns: a #GList of #WebKitContextMenuItem<!-- -->suint getNItems() nothrowGets the length of the menu. Returns: the number of #WebKitContextMenuItem<!-- -->s in menuvoid insert(webkit.context_menu_item.ContextMenuItem item, int position) nothrowInserts item into the menu at the given position.webkit.context_menu_item.ContextMenuItem last() nothrowGets the last item in the menu. Returns: the last #WebKitContextMenuItem of menu, or null if the #WebKitContextMenu is empty.void moveItem(webkit.context_menu_item.ContextMenuItem item, int position) nothrowMoves item to the given position in the menu.void prepend(webkit.context_menu_item.ContextMenuItem item) nothrowAdds item at the beginning of the menu.Fluent builder implementation template for webkit.context_menu.ContextMenu
Fluent builder for webkit.context_menu.ContextMenu