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 |
GI.WebKit2.Objects.PolicyDecision
Description
A pending policy decision.
Often WebKit allows the client to decide the policy for certain
operations. For instance, a client may want to open a link in a new
tab, block a navigation entirely, query the user or trigger a download
instead of a navigation. In these cases WebKit will fire the
WebView::decidePolicy signal with a PolicyDecision
object. If the signal handler does nothing, WebKit will act as if
policyDecisionUse
was called as soon as signal handling
completes. To make a policy decision asynchronously, simply increment
the reference count of the PolicyDecision
object.
Synopsis
- newtype PolicyDecision = PolicyDecision (ManagedPtr PolicyDecision)
- class (GObject o, IsDescendantOf PolicyDecision o) => IsPolicyDecision o
- toPolicyDecision :: (MonadIO m, IsPolicyDecision o) => o -> m PolicyDecision
- policyDecisionDownload :: (HasCallStack, MonadIO m, IsPolicyDecision a) => a -> m ()
- policyDecisionIgnore :: (HasCallStack, MonadIO m, IsPolicyDecision a) => a -> m ()
- policyDecisionUse :: (HasCallStack, MonadIO m, IsPolicyDecision a) => a -> m ()
- policyDecisionUseWithPolicies :: (HasCallStack, MonadIO m, IsPolicyDecision a, IsWebsitePolicies b) => a -> b -> m ()
Exported types
newtype PolicyDecision Source #
Memory-managed wrapper type.
Constructors
PolicyDecision (ManagedPtr PolicyDecision) |
Instances
class (GObject o, IsDescendantOf PolicyDecision o) => IsPolicyDecision o Source #
Type class for types which can be safely cast to PolicyDecision
, for instance with toPolicyDecision
.
Instances
(GObject o, IsDescendantOf PolicyDecision o) => IsPolicyDecision o Source # | |
Defined in GI.WebKit2.Objects.PolicyDecision |
toPolicyDecision :: (MonadIO m, IsPolicyDecision o) => o -> m PolicyDecision Source #
Cast to PolicyDecision
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, download, forceFloating, freezeNotify, getv, ignore, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, use, useWithPolicies, watchClosure.
Getters
getData, getProperty, getQdata.
Setters
download
policyDecisionDownload Source #
Arguments
:: (HasCallStack, MonadIO m, IsPolicyDecision a) | |
=> a |
|
-> m () |
Spawn a download from this decision.
ignore
Arguments
:: (HasCallStack, MonadIO m, IsPolicyDecision a) | |
=> a |
|
-> m () |
ResponsePolicyDecision
, this would cancel the request.
Ignore the action which triggered this decision. For instance, for a
ResponsePolicyDecision
, this would cancel the request.
use
Arguments
:: (HasCallStack, MonadIO m, IsPolicyDecision a) | |
=> a |
|
-> m () |
Accept the action which triggered this decision.
useWithPolicies
policyDecisionUseWithPolicies Source #
Arguments
:: (HasCallStack, MonadIO m, IsPolicyDecision a, IsWebsitePolicies b) | |
=> a |
|
-> b |
|
-> m () |
Accept the navigation action and continue with provided policies
.
Accept the navigation action which triggered this decision, and
continue with policies
affecting all subsequent loads of resources
in the origin associated with the accepted navigation action.
For example, a navigation decision to a video sharing website may
be accepted under the priviso no movies are allowed to autoplay. The
autoplay policy in this case would be set in the policies
.
Since: 2.30