Package org.gnome.webkit
Class PermissionStateQuery
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.webkit.PermissionStateQuery
- All Implemented Interfaces:
Proxy
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](https://w3c.github.io/permissions/).
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 Summary
ConstructorDescriptionPermissionStateQuery
(MemorySegment address) Create a PermissionStateQuery proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
finish
(PermissionState state) Notify the web-engine of the selected permission state for the given query.getName()
Get the permission name for which access is being queried.Get the permission origin for which access is being queried.static Type
getType()
Get the GType of the PermissionStateQuery classref()
Atomically increments the reference count of this PermissionStateQuery by one.void
unref()
Atomically decrements the reference count of this PermissionStateQuery by one.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
PermissionStateQuery
Create a PermissionStateQuery proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
finish
Notify the web-engine of the selected permission state for the given query. This function should only be called as a response to theWebKitWebView::query-permission-state
signal.- Parameters:
state
- aWebKitPermissionState
-
getName
Get the permission name for which access is being queried.- Returns:
- the permission name for this PermissionStateQuery
-
getSecurityOrigin
Get the permission origin for which access is being queried.- Returns:
- A
WebKitSecurityOrigin
representing the origin from which the this PermissionStateQuery was emitted.
-
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
-
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.
-