Package org.gnome.webkit
Enum Class PolicyDecisionType
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<PolicyDecisionType>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum PolicyDecisionType
extends Enum<PolicyDecisionType>
implements Enumeration
Enum values used for determining the type of a policy decision during
WebKitWebView
::decide-policy.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThis type of policy decision is requested when WebKit is about to navigate to a new page in either the main frame or a subframe.This type of policy decision is requested when WebKit is about to create a new window.This type of decision is used when WebKit has received a response for a network resource and is about to start the load. -
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the PolicyDecisionType classint
getValue()
Get the numeric value of this enumstatic PolicyDecisionType
of
(int value) Create a new PolicyDecisionType for the provided valuestatic PolicyDecisionType
Returns the enum constant of this class with the specified name.static PolicyDecisionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NAVIGATION_ACTION
This type of policy decision is requested when WebKit is about to navigate to a new page in either the main frame or a subframe. Acceptable policy decisions are either webkit_policy_decision_use() or webkit_policy_decision_ignore(). This type of policy decision is always aWebKitNavigationPolicyDecision
. -
NEW_WINDOW_ACTION
This type of policy decision is requested when WebKit is about to create a new window. Acceptable policy decisions are either webkit_policy_decision_use() or webkit_policy_decision_ignore(). This type of policy decision is always aWebKitNavigationPolicyDecision
. These decisions are useful for implementing special actions for new windows, such as forcing the new window to open in a tab when a keyboard modifier is active or handling a special target attribute on <a> elements. -
RESPONSE
This type of decision is used when WebKit has received a response for a network resource and is about to start the load. Note that these resources include all subresources of a page such as images and stylesheets as well as main documents. Appropriate policy responses to this decision are webkit_policy_decision_use(), webkit_policy_decision_ignore(), or webkit_policy_decision_download(). This type of policy decision is always aWebKitResponsePolicyDecision
. This decision is useful for forcing some types of resources to be downloaded rather than rendered in the WebView or to block the transfer of resources entirely.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new PolicyDecisionType for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-