Interface WebView.QueryPermissionStateCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
WebView
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface WebView.QueryPermissionStateCallback extends FunctionPointer

Functional interface declaration of the QueryPermissionStateCallback callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable PermissionStateQuery query)

      This signal allows the User-Agent to respond to permission requests for powerful features, as specified by the Permissions W3C Specification. You can reply to the query using webkit_permission_state_query_finish().

      You can handle the query asynchronously by calling webkit_permission_state_query_ref() on query and returning true. If the last reference of query is removed and the query has not been handled, the query result will be set to WEBKIT_QUERY_PERMISSION_PROMPT.

      Since:
      2.40
    • upcall

      default int upcall(MemorySegment sourceWebView, MemorySegment query)
      The upcall method is called from native code. The parameters are marshaled and run(PermissionStateQuery) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer