Class PermissionStateQuery

java.lang.Object
org.javagi.base.ProxyInstance
org.webkitgtk.PermissionStateQuery
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class PermissionStateQuery extends ProxyInstance

This query represents a user's choice to allow or deny access to "powerful features" of the platform, as specified in the Permissions W3C Specification.

When signalled by the WebKitWebView through the query-permission-state signal, the application has to eventually respond, via webkit_permission_state_query_finish(), whether it grants, denies or requests a dedicated permission prompt for the given query.

When a WebKitPermissionStateQuery is not handled by the user, the user-agent is instructed to prompt the user for the given permission.

  • Constructor Details

    • PermissionStateQuery

      public PermissionStateQuery(MemorySegment address)
      Create a PermissionStateQuery proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getType

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

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • finish

      public void finish(PermissionState state)
      Notify the web-engine of the selected permission state for the given query. This function should only be called as a response to the WebKitWebView::query-permission-state signal.
      Parameters:
      state - a WebKitPermissionState
      Since:
      2.40
    • getName

      public String getName()
      Get the permission name for which access is being queried.
      Returns:
      the permission name for this PermissionStateQuery
      Since:
      2.40
    • getSecurityOrigin

      public SecurityOrigin getSecurityOrigin()
      Get the permission origin for which access is being queried.
      Returns:
      A WebKitSecurityOrigin representing the origin from which the this PermissionStateQuery was emitted.
      Since:
      2.40
    • ref

      public PermissionStateQuery ref()

      Atomically increments the reference count of this PermissionStateQuery by one.

      This function is MT-safe and may be called from any thread.

      Returns:
      The passed WebKitPermissionStateQuery
      Since:
      2.40
    • unref

      public void unref()

      Atomically decrements the reference count of this PermissionStateQuery by one.

      If the reference count drops to 0, all memory allocated by WebKitPermissionStateQuery is released. This function is MT-safe and may be called from any thread.

      Since:
      2.40