## WebKitNavigationPolicyDecision WebKitNavigationPolicyDecision — A policy decision for navigation actions |

## Synopsis

    struct              WebKitNavigationPolicyDecision;
    enum                WebKitNavigationType;
    const gchar *       webkit_navigation_policy_decision_get_frame_name
                                                            (WebKitNavigationPolicyDecision *decision);
    guint               webkit_navigation_policy_decision_get_modifiers
                                                            (WebKitNavigationPolicyDecision *decision);
    guint               webkit_navigation_policy_decision_get_mouse_button
                                                            (WebKitNavigationPolicyDecision *decision);
    WebKitNavigationType webkit_navigation_policy_decision_get_navigation_type
                                                            (WebKitNavigationPolicyDecision *decision);
    WebKitURIRequest *  webkit_navigation_policy_decision_get_request
                                                            (WebKitNavigationPolicyDecision *decision);

## Object Hierarchy

      GObject
       +----WebKitPolicyDecision
             +----WebKitNavigationPolicyDecision

## Properties

      "frame-name"               gchar*                : Read
      "modifiers"                guint                 : Read
      "mouse-button"             guint                 : Read
      "navigation-type"          WebKitNavigationType  : Read
      "request"                  WebKitURIRequest*     : Read

## Description

WebKitNavigationPolicyDecision represents a policy decision for events associated with navigations. If the value of WebKitNavigationPolicyDecision:mouse-button is not 0, then the navigation was triggered by a mouse event.

## Details

### struct WebKitNavigationPolicyDecision

    struct WebKitNavigationPolicyDecision;

### enum WebKitNavigationType

    typedef enum {
        WEBKIT_NAVIGATION_TYPE_LINK_CLICKED,
        WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED,
        WEBKIT_NAVIGATION_TYPE_BACK_FORWARD,
        WEBKIT_NAVIGATION_TYPE_RELOAD,
        WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED,
        WEBKIT_NAVIGATION_TYPE_OTHER,
    } WebKitNavigationType;

Enum values used to denote the various navigation types.

`WEBKIT_NAVIGATION_TYPE_LINK_CLICKED` | The navigation was triggered by clicking a link.
`WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED` | The navigation was triggered by submitting a form.
`WEBKIT_NAVIGATION_TYPE_BACK_FORWARD` | The navigation was triggered by navigating forward or backward.
`WEBKIT_NAVIGATION_TYPE_RELOAD` | The navigation was triggered by reloading.
`WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED` | The navigation was triggered by resubmitting a form.
`WEBKIT_NAVIGATION_TYPE_OTHER` | The navigation was triggered by some other action.

### webkit_navigation_policy_decision_get_frame_name ()

    const gchar *       webkit_navigation_policy_decision_get_frame_name
                                                            (WebKitNavigationPolicyDecision *decision);

Gets the value of the "frame-name" property.

`decision` : | a WebKitNavigationPolicyDecision
Returns : | The name of the new frame this navigation action targets or `NULL`

### webkit_navigation_policy_decision_get_modifiers ()

    guint               webkit_navigation_policy_decision_get_modifiers
                                                            (WebKitNavigationPolicyDecision *decision);

Gets the value of the "modifiers" property.

`decision` : | a WebKitNavigationPolicyDecision
Returns : | The modifiers active if this decision was triggered by a mouse event

### webkit_navigation_policy_decision_get_mouse_button ()

    guint               webkit_navigation_policy_decision_get_mouse_button
                                                            (WebKitNavigationPolicyDecision *decision);

Gets the value of the "mouse-button" property.

`decision` : | a WebKitNavigationPolicyDecision
Returns : | The mouse button used if this decision was triggered by a mouse event or 0 otherwise

### webkit_navigation_policy_decision_get_navigation_type ()

    WebKitNavigationType webkit_navigation_policy_decision_get_navigation_type
                                                            (WebKitNavigationPolicyDecision *decision);

Gets the value of the "navigation-type" property.

`decision` : | a WebKitNavigationPolicyDecision
Returns : | The type of navigation triggering this policy decision.

### webkit_navigation_policy_decision_get_request ()

    WebKitURIRequest *  webkit_navigation_policy_decision_get_request
                                                            (WebKitNavigationPolicyDecision *decision);

Gets the value of the "request" property.

`decision` : | a WebKitNavigationPolicyDecision
Returns : | The URI request that is associated with this navigation. [transfer none]

## Property Details

### The `"frame-name"` property

      "frame-name"               gchar*                : Read

If this navigation request targets a new frame, this property contains the name of that frame. For example if the decision was triggered by clicking a link with a target attribute equal to "_blank", this property will contain the value of that attribute. In all other cases, this value will be `NULL`.

Default value: NULL

### The `"modifiers"` property

      "modifiers"                guint                 : Read

If the navigation associated with this policy decision was originally triggered by a mouse event, this property contains a bitmask of various GdkModifierType values describing the modifiers used for that click. If the navigation was not triggered by a mouse event or no modifiers were active, the value of this property will be zero.

Default value: 0

### The `"mouse-button"` property

      "mouse-button"             guint                 : Read

If the navigation associated with this policy decision was originally triggered by a mouse event, this property contains non-zero button number of the button triggering that event. The button numbers match those from GDK. If the navigation was not triggered by a mouse event, the value of this property will be 0.

Default value: 0

### The `"navigation-type"` property

      "navigation-type"          WebKitNavigationType  : Read

The type of navigation that triggered this policy decision. This is useful for enacting different policies depending on what type of user action caused the navigation.

Default value: WEBKIT_NAVIGATION_TYPE_LINK_CLICKED

### The `"request"` property

      "request"                  WebKitURIRequest*     : Read

This property contains the WebKitURIRequest associated with this navigation.

## See Also

WebKitPolicyDecision, WebKitWebView