Package org.gnome.webkit
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 Summary
Modifier and TypeMethodDescriptionboolean
run
(PermissionStateQuery query) This signal allows the User-Agent to respond to permission requests for powerful features, as specified by the Permissions W3C Specification.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceWebView, MemorySegment query) Theupcall
method is called from native code.
-
Method Details
-
run
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 returningtrue
. If the last reference ofquery
is removed and the query has not been handled, the query result will be set toWEBKIT_QUERY_PERMISSION_PROMPT
. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.PermissionStateQuery)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-