Signal
WebKit2WebView::context-menu
Declaration
gboolean
context_menu (
WebKitWebView* self,
WebKitContextMenu* context_menu,
GdkEvent* event,
WebKitHitTestResult* hit_test_result,
gpointer user_data
)
Description [src]
Emitted when a context menu is about to be displayed to give the application
a chance to customize the proposed menu, prevent the menu from being displayed,
or build its own context menu.
webkit_context_menu_append()
or webkit_context_menu_insert()
to add new
WebKitContextMenuItem
s to context_menu
, webkit_context_menu_move_item()
to reorder existing items, or webkit_context_menu_remove()
to remove an
existing item. The signal handler should return FALSE
, and the menu represented
by context_menu
will be shown.
TRUE
so that the proposed menu will not be shown.
FALSE
so
that the menu will be shown. You can also ignore the proposed WebKitContextMenu
,
build your own GtkMenu
and return TRUE
to prevent the proposed menu from being shown.
The event
parameter is now deprecated. Use webkit_context_menu_get_event()
to get the
GdkEvent
that triggered the context menu.
If the signal handler returns FALSE
the context menu represented by context_menu
will be shown, if it return TRUE
the context menu will not be shown.
The proposed WebKitContextMenu
passed in context_menu
argument is only valid
during the signal emission.
Default handler: | The default handler is called after the handlers added via |
Parameters
context_menu |
WebKitContextMenu |
The proposed |
|
The data is owned by the caller of the function. | |
event |
GdkEvent |
The |
|
The data is owned by the caller of the function. | |
hit_test_result |
WebKitHitTestResult |
A |
|
The data is owned by the caller of the function. |