WebKitNavigationPolicyDecision: WebKit2GTK+ Reference Manual

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

## Functions

WebKitNavigationAction * | webkit_navigation_policy_decision_get_navigation_action ()
const gchar * | webkit_navigation_policy_decision_get_frame_name ()
guint | webkit_navigation_policy_decision_get_modifiers ()
guint | webkit_navigation_policy_decision_get_mouse_button ()
WebKitNavigationType | webkit_navigation_policy_decision_get_navigation_type ()
WebKitURIRequest * | webkit_navigation_policy_decision_get_request ()

## Properties

gchar * | frame-name | Read
guint | modifiers | Read
guint | mouse-button | Read
WebKitNavigationAction * | navigation-action | Read
WebKitNavigationType | navigation-type | Read
WebKitURIRequest * | request | Read

## Types and Values

struct | WebKitNavigationPolicyDecision
enum | WebKitNavigationType

## Object Hierarchy

        GEnum
        ╰── WebKitNavigationType
        GObject
        ╰── WebKitPolicyDecision
            ╰── WebKitNavigationPolicyDecision

## Description

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

## Functions

### webkit_navigation_policy_decision_get_navigation_action ()

    WebKitNavigationAction *
    webkit_navigation_policy_decision_get_navigation_action
                                   (WebKitNavigationPolicyDecision *decision);

Gets the value of the “navigation-action” property.

#### Parameters

decision | a WebKitNavigationPolicyDecision |

#### Returns

The WebKitNavigationAction triggering this policy decision.

[transfer none]

Since: 2.6

### 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.

#### Parameters

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);

`webkit_navigation_policy_decision_get_modifiers` has been deprecated since version 2.6 and should not be used in newly-written code.

Use `webkit_navigation_policy_decision_get_navigation_action()` instead.

Gets the value of the “modifiers” property.

#### Parameters

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);

`webkit_navigation_policy_decision_get_mouse_button` has been deprecated since version 2.6 and should not be used in newly-written code.

Use `webkit_navigation_policy_decision_get_navigation_action()` instead.

Gets the value of the “mouse-button” property.

#### Parameters

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);

`webkit_navigation_policy_decision_get_navigation_type` has been deprecated since version 2.6 and should not be used in newly-written code.

Use `webkit_navigation_policy_decision_get_navigation_action()` instead.

Gets the value of the “navigation-type” property.

#### Parameters

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);

`webkit_navigation_policy_decision_get_request` has been deprecated since version 2.6 and should not be used in newly-written code.

Use `webkit_navigation_policy_decision_get_navigation_action()` instead.

Gets the value of the “request” property.

#### Parameters

decision | a WebKitNavigationPolicyDecision |

#### Returns

The URI request that is associated with this navigation.

[transfer none]

## Types and Values

### struct WebKitNavigationPolicyDecision

    struct WebKitNavigationPolicyDecision;

### enum WebKitNavigationType

Enum values used to denote the various navigation types.

#### Members

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. |

## Property Details

### The `“frame-name”` property

      “frame-name”               gchar *

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`.

Flags: Read

Default value: NULL

### The `“modifiers”` property

      “modifiers”                guint

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.

`WebKitNavigationPolicyDecision:modifiers` has been deprecated since version 2.6 and should not be used in newly-written code.

Use “navigation-action” instead

Flags: Read

Default value: 0

### The `“mouse-button”` property

      “mouse-button”             guint

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.

`WebKitNavigationPolicyDecision:mouse-button` has been deprecated since version 2.6 and should not be used in newly-written code.

Use “navigation-action” instead

Flags: Read

Default value: 0

### The `“navigation-action”` property

      “navigation-action”        WebKitNavigationAction *

The WebKitNavigationAction that triggered this policy decision.

Flags: Read

Since: 2.6

### The `“navigation-type”` property

      “navigation-type”          WebKitNavigationType

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.

`WebKitNavigationPolicyDecision:navigation-type` has been deprecated since version 2.6 and should not be used in newly-written code.

Use “navigation-action” instead

Flags: Read

Default value: WEBKIT_NAVIGATION_TYPE_LINK_CLICKED

### The `“request”` property

      “request”                  WebKitURIRequest *

This property contains the WebKitURIRequest associated with this navigation.

`WebKitNavigationPolicyDecision:request` has been deprecated since version 2.6 and should not be used in newly-written code.

Use “navigation-action” instead

Flags: Read

## See Also

WebKitPolicyDecision, WebKitWebView