gi-webkit-6.0.2: WebKit bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit.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

Exported types

newtype PolicyDecision Source #

Memory-managed wrapper type.

Constructors

PolicyDecision (ManagedPtr PolicyDecision) 

Instances

Instances details
Eq PolicyDecision Source # 
Instance details

Defined in GI.WebKit.Objects.PolicyDecision

GObject PolicyDecision Source # 
Instance details

Defined in GI.WebKit.Objects.PolicyDecision

ManagedPtrNewtype PolicyDecision Source # 
Instance details

Defined in GI.WebKit.Objects.PolicyDecision

TypedObject PolicyDecision Source # 
Instance details

Defined in GI.WebKit.Objects.PolicyDecision

Methods

glibType :: IO GType

HasParentTypes PolicyDecision Source # 
Instance details

Defined in GI.WebKit.Objects.PolicyDecision

IsGValue (Maybe PolicyDecision) Source #

Convert PolicyDecision to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit.Objects.PolicyDecision

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe PolicyDecision -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe PolicyDecision)

type ParentTypes PolicyDecision Source # 
Instance details

Defined in GI.WebKit.Objects.PolicyDecision

type ParentTypes PolicyDecision = '[Object]

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

Instances details
(GObject o, IsDescendantOf PolicyDecision o) => IsPolicyDecision o Source # 
Instance details

Defined in GI.WebKit.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

download

policyDecisionDownload Source #

Arguments

:: (HasCallStack, MonadIO m, IsPolicyDecision a) 
=> a

decision: a PolicyDecision

-> m () 

Spawn a download from this decision.

ignore

policyDecisionIgnore Source #

Arguments

:: (HasCallStack, MonadIO m, IsPolicyDecision a) 
=> a

decision: a PolicyDecision

-> 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

policyDecisionUse Source #

Arguments

:: (HasCallStack, MonadIO m, IsPolicyDecision a) 
=> a

decision: a PolicyDecision

-> m () 

Accept the action which triggered this decision.

useWithPolicies

policyDecisionUseWithPolicies Source #

Arguments

:: (HasCallStack, MonadIO m, IsPolicyDecision a, IsWebsitePolicies b) 
=> a

decision: a PolicyDecision

-> b

policies: a WebsitePolicies

-> 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