### Method

# WebKit ContextMenu get_event

since: 2.40

#### Declaration [src]

    GdkEvent*
    webkit_context_menu_get_event (
      WebKitContextMenu* menu
    )

#### Description [src]

Gets 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 cases, `NULL` is returned.

The returned `GdkEvent` is expected to be one of the following types: a `GdkEventButton` of type `GDK_BUTTON_PRESS` when the context menu was triggered with mouse. a `GdkEventKey` of type `GDK_KEY_PRESS` if the keyboard was used to show the menu. a generic `GdkEvent` of type `GDK_NOTHING` when the `GtkWidget::popup-menu` signal was used to show the context menu. .

Available since: 2.40

#### Return value

Type: `GdkEvent`

The menu event or `NULL`.

The returned data is owned by the instance.