WebKit2GTK+ Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
WebKitNavigationPolicyDecisionWebKitNavigationPolicyDecision — A policy decision for navigation actions |
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
);
"frame-name" gchar* : Read "modifiers" guint : Read "mouse-button" guint : Read "navigation-type" WebKitNavigationType : Read "request" WebKitURIRequest* : Read
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.
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.
The navigation was triggered by clicking a link. | |
The navigation was triggered by submitting a form. | |
The navigation was triggered by navigating forward or backward. | |
The navigation was triggered by reloading. | |
The navigation was triggered by resubmitting a form. | |
The navigation was triggered by some other action. |
const gchar * webkit_navigation_policy_decision_get_frame_name
(WebKitNavigationPolicyDecision *decision
);
Gets the value of the "frame-name" property.
|
a WebKitNavigationPolicyDecision |
Returns : |
The name of the new frame this navigation action targets or NULL
|
guint webkit_navigation_policy_decision_get_modifiers
(WebKitNavigationPolicyDecision *decision
);
Gets the value of the "modifiers" property.
|
a WebKitNavigationPolicyDecision |
Returns : |
The modifiers active if this decision was triggered by a mouse event |
guint webkit_navigation_policy_decision_get_mouse_button
(WebKitNavigationPolicyDecision *decision
);
Gets the value of the "mouse-button" property.
|
a WebKitNavigationPolicyDecision |
Returns : |
The mouse button used if this decision was triggered by a mouse event or 0 otherwise |
WebKitNavigationType webkit_navigation_policy_decision_get_navigation_type
(WebKitNavigationPolicyDecision *decision
);
Gets the value of the "navigation-type" property.
|
a WebKitNavigationPolicyDecision |
Returns : |
The type of navigation triggering this policy decision. |
WebKitURIRequest * webkit_navigation_policy_decision_get_request
(WebKitNavigationPolicyDecision *decision
);
Gets the value of the "request" property.
|
a WebKitNavigationPolicyDecision |
Returns : |
The URI request that is associated with this navigation. [transfer none] |
"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
"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
"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
"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
"request"
property"request" WebKitURIRequest* : Read
This property contains the WebKitURIRequest associated with this navigation.