## WebKitWebNavigationAction WebKitWebNavigationAction — Object used to report details of navigation actions |

## Synopsis

    struct              WebKitWebNavigationAction;
    enum                WebKitWebNavigationReason;
    gint                webkit_web_navigation_action_get_button
                                                            (WebKitWebNavigationAction *navigationAction);
    gint                webkit_web_navigation_action_get_modifier_state
                                                            (WebKitWebNavigationAction *navigationAction);
    const gchar *       webkit_web_navigation_action_get_original_uri
                                                            (WebKitWebNavigationAction *navigationAction);
    WebKitWebNavigationReason webkit_web_navigation_action_get_reason
                                                            (WebKitWebNavigationAction *navigationAction);
    const gchar *       webkit_web_navigation_action_get_target_frame
                                                            (WebKitWebNavigationAction *navigationAction);
    void                webkit_web_navigation_action_set_original_uri
                                                            (WebKitWebNavigationAction *navigationAction,
                                                             const gchar *originalUri);
    void                webkit_web_navigation_action_set_reason
                                                            (WebKitWebNavigationAction *navigationAction,
                                                             WebKitWebNavigationReason reason);

## Object Hierarchy

      GObject
       +----WebKitWebNavigationAction

## Properties

      "button"                   gint                  : Read / Write / Construct Only
      "modifier-state"           gint                  : Read / Write / Construct Only
      "original-uri"             gchar*                : Read / Write / Construct
      "reason"                   WebKitWebNavigationReason  : Read / Write / Construct
      "target-frame"             gchar*                : Read / Write / Construct Only

## Description

WebKitWebNavigationAction is used in signals to provide details about what led the navigation to happen. This includes, for instance, if the user clicked a link to start that navigation, and what mouse button was used.

## Details

### struct WebKitWebNavigationAction

    struct WebKitWebNavigationAction;

### enum WebKitWebNavigationReason

    typedef enum {
        WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED,
        WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED,
        WEBKIT_WEB_NAVIGATION_REASON_BACK_FORWARD,
        WEBKIT_WEB_NAVIGATION_REASON_RELOAD,
        WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED,
        WEBKIT_WEB_NAVIGATION_REASON_OTHER,
    } WebKitWebNavigationReason;

Enum values used to denote the various navigation reasons.

`WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED` | The navigation was triggered by clicking a link.
`WEBKIT_WEB_NAVIGATION_REASON_FORM_SUBMITTED` | The navigation was triggered by submitting a form.
`WEBKIT_WEB_NAVIGATION_REASON_BACK_FORWARD` | The navigation was triggered by navigating forward or backward.
`WEBKIT_WEB_NAVIGATION_REASON_RELOAD` | The navigation was triggered by reloading.
`WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED` | The navigation was triggered by resubmitting a form.
`WEBKIT_WEB_NAVIGATION_REASON_OTHER` | The navigation was triggered by some other action.

### webkit_web_navigation_action_get_button ()

    gint                webkit_web_navigation_action_get_button
                                                            (WebKitWebNavigationAction *navigationAction);

The GTK+ identifier for the mouse button used to click. Notice that GTK+ button values are 1, 2 and 3 for left, middle and right buttons, so they are DOM button values +1. If the action was not initiated by a mouse click the value will be -1.

`navigationAction` : | a WebKitWebNavigationAction
Returns : | the mouse button used to click

Since 1.0.3

### webkit_web_navigation_action_get_modifier_state ()

    gint                webkit_web_navigation_action_get_modifier_state
                                                            (WebKitWebNavigationAction *navigationAction);

Returns a bitmask with the the state of the modifier keys.

`navigationAction` : | a WebKitWebNavigationAction
Returns : | a bitmask with the state of the modifier keys

Since 1.0.3

### webkit_web_navigation_action_get_original_uri ()

    const gchar *       webkit_web_navigation_action_get_original_uri
                                                            (WebKitWebNavigationAction *navigationAction);

Returns the URI that was originally requested. This may differ from the navigation target, for instance because of a redirect.

`navigationAction` : | a WebKitWebNavigationAction
Returns : | the originally requested URI

Since 1.0.3

### webkit_web_navigation_action_get_reason ()

    WebKitWebNavigationReason webkit_web_navigation_action_get_reason
                                                            (WebKitWebNavigationAction *navigationAction);

Returns the reason why WebKit is requesting a navigation.

`navigationAction` : | a WebKitWebNavigationAction
Returns : | a WebKitWebNavigationReason

Since 1.0.3

### webkit_web_navigation_action_get_target_frame ()

    const gchar *       webkit_web_navigation_action_get_target_frame
                                                            (WebKitWebNavigationAction *navigationAction);

Returns the target frame of the action.

`navigationAction` : | a WebKitWebNavigationAction
Returns : | the target frame of the action or NULL if there is no target.

Since 1.1.13

### webkit_web_navigation_action_set_original_uri ()

    void                webkit_web_navigation_action_set_original_uri
                                                            (WebKitWebNavigationAction *navigationAction,
                                                             const gchar *originalUri);

Sets the URI that was originally requested. This may differ from the navigation target, for instance because of a redirect.

`navigationAction` : | a WebKitWebNavigationAction
`originalUri` : | a URI

Since 1.0.3

### webkit_web_navigation_action_set_reason ()

    void                webkit_web_navigation_action_set_reason
                                                            (WebKitWebNavigationAction *navigationAction,
                                                             WebKitWebNavigationReason reason);

Sets the reason why WebKit is requesting a navigation.

`navigationAction` : | a WebKitWebNavigationAction
`reason` : | a WebKitWebNavigationReason

Since 1.0.3

## Property Details

### The `"button"` property

      "button"                   gint                  : Read / Write / Construct Only

The GTK+ identifier for the mouse button used to click. Notice that GTK+ button values are 1, 2 and 3 for left, middle and right buttons, so they are DOM button values +1. If the action was not initiated by a mouse click the value will be -1.

Allowed values: >= G_MAXULONG

Default value: -1

Since 1.0.3

### The `"modifier-state"` property

      "modifier-state"           gint                  : Read / Write / Construct Only

The state of the modifier keys when the action was requested.

Allowed values: >= 0

Default value: 0

Since 1.0.3

### The `"original-uri"` property

      "original-uri"             gchar*                : Read / Write / Construct

The URI that was requested as the target for the navigation.

Default value: ""

Since 1.0.3

### The `"reason"` property

      "reason"                   WebKitWebNavigationReason  : Read / Write / Construct

The reason why this navigation is occuring.

Default value: WEBKIT_WEB_NAVIGATION_REASON_OTHER

Since 1.0.3

### The `"target-frame"` property

      "target-frame"             gchar*                : Read / Write / Construct Only

The target frame for the navigation.

Default value: NULL

Since 1.1.13