Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This query represents a user's choice to allow or deny access to "powerful features" of the platform, as specified in the <https://w3c.github.io/permissions/ Permissions W3C Specification>.
When signalled by the WebView
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 PermissionStateQuery
is not handled by the user, the user-agent is instructed to
prompt
the user for the given permission.
Synopsis
- newtype PermissionStateQuery = PermissionStateQuery (ManagedPtr PermissionStateQuery)
- permissionStateQueryFinish :: (HasCallStack, MonadIO m) => PermissionStateQuery -> PermissionState -> m ()
- permissionStateQueryGetName :: (HasCallStack, MonadIO m) => PermissionStateQuery -> m Text
- permissionStateQueryGetSecurityOrigin :: (HasCallStack, MonadIO m) => PermissionStateQuery -> m SecurityOrigin
- permissionStateQueryRef :: (HasCallStack, MonadIO m) => PermissionStateQuery -> m PermissionStateQuery
- permissionStateQueryUnref :: (HasCallStack, MonadIO m) => PermissionStateQuery -> m ()
Exported types
newtype PermissionStateQuery Source #
Memory-managed wrapper type.
PermissionStateQuery (ManagedPtr PermissionStateQuery) |
Instances
Methods
Click to display all available methods, including inherited ones
finish
permissionStateQueryFinish Source #
:: (HasCallStack, MonadIO m) | |
=> PermissionStateQuery |
|
-> PermissionState |
|
-> m () |
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.
Since: 2.40
getName
permissionStateQueryGetName Source #
:: (HasCallStack, MonadIO m) | |
=> PermissionStateQuery |
|
-> m Text | Returns: the permission name for |
Get the permission name for which access is being queried.
Since: 2.40
getSecurityOrigin
permissionStateQueryGetSecurityOrigin Source #
:: (HasCallStack, MonadIO m) | |
=> PermissionStateQuery |
|
-> m SecurityOrigin | Returns: A |
Get the permission origin for which access is being queried.
Since: 2.40
ref
permissionStateQueryRef Source #
:: (HasCallStack, MonadIO m) | |
=> PermissionStateQuery |
|
-> m PermissionStateQuery | Returns: The passed |
Atomically increments the reference count of query
by one.
This function is MT-safe and may be called from any thread.
Since: 2.40
unref
permissionStateQueryUnref Source #
:: (HasCallStack, MonadIO m) | |
=> PermissionStateQuery |
|
-> m () |
Atomically decrements the reference count of query
by one.
If the reference count drops to 0, all memory allocated by PermissionStateQuery
is
released. This function is MT-safe and may be called from any thread.
Since: 2.40