Enum Class PolicyDecisionType

java.lang.Object
java.lang.Enum<PolicyDecisionType>
org.webkitgtk.PolicyDecisionType
All Implemented Interfaces:
Serializable, Comparable<PolicyDecisionType>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum PolicyDecisionType extends Enum<PolicyDecisionType> implements Enumeration
Enum values used for determining the type of a policy decision during WebKitWebView::decide-policy.
  • Enum Constant Details

    • NEW_WINDOW_ACTION

      public static final PolicyDecisionType 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 a WebKitNavigationPolicyDecision. 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 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 a WebKitResponsePolicyDecision. 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

      public static PolicyDecisionType[] 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

      public static PolicyDecisionType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static PolicyDecisionType of(int value)
      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 interface Enumeration
      Returns:
      the enum value
    • of

      public static PolicyDecisionType of(MemorySegment address)
      Create a new PolicyDecisionType for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the PolicyDecisionType class.
      Returns:
      the GType