{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.WebKit.Objects.WebPolicyDecision
    ( 

-- * Exported types
    WebPolicyDecision(..)                   ,
    WebPolicyDecisionK                      ,
    toWebPolicyDecision                     ,
    noWebPolicyDecision                     ,


 -- * Methods
-- ** webPolicyDecisionDownload
    webPolicyDecisionDownload               ,


-- ** webPolicyDecisionIgnore
    webPolicyDecisionIgnore                 ,


-- ** webPolicyDecisionUse
    webPolicyDecisionUse                    ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject

newtype WebPolicyDecision = WebPolicyDecision (ForeignPtr WebPolicyDecision)
foreign import ccall "webkit_web_policy_decision_get_type"
    c_webkit_web_policy_decision_get_type :: IO GType

type instance ParentTypes WebPolicyDecision = WebPolicyDecisionParentTypes
type WebPolicyDecisionParentTypes = '[GObject.Object]

instance GObject WebPolicyDecision where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_web_policy_decision_get_type
    

class GObject o => WebPolicyDecisionK o
instance (GObject o, IsDescendantOf WebPolicyDecision o) => WebPolicyDecisionK o

toWebPolicyDecision :: WebPolicyDecisionK o => o -> IO WebPolicyDecision
toWebPolicyDecision = unsafeCastTo WebPolicyDecision

noWebPolicyDecision :: Maybe WebPolicyDecision
noWebPolicyDecision = Nothing

type instance AttributeList WebPolicyDecision = WebPolicyDecisionAttributeList
type WebPolicyDecisionAttributeList = ('[ ] :: [(Symbol, *)])

type instance SignalList WebPolicyDecision = WebPolicyDecisionSignalList
type WebPolicyDecisionSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method WebPolicyDecision::download
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "WebPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "WebPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_policy_decision_download" webkit_web_policy_decision_download :: 
    Ptr WebPolicyDecision ->                -- _obj : TInterface "WebKit" "WebPolicyDecision"
    IO ()


webPolicyDecisionDownload ::
    (MonadIO m, WebPolicyDecisionK a) =>
    a ->                                    -- _obj
    m ()
webPolicyDecisionDownload _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_policy_decision_download _obj'
    touchManagedPtr _obj
    return ()

-- method WebPolicyDecision::ignore
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "WebPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "WebPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_policy_decision_ignore" webkit_web_policy_decision_ignore :: 
    Ptr WebPolicyDecision ->                -- _obj : TInterface "WebKit" "WebPolicyDecision"
    IO ()


webPolicyDecisionIgnore ::
    (MonadIO m, WebPolicyDecisionK a) =>
    a ->                                    -- _obj
    m ()
webPolicyDecisionIgnore _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_policy_decision_ignore _obj'
    touchManagedPtr _obj
    return ()

-- method WebPolicyDecision::use
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "WebPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "WebPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_policy_decision_use" webkit_web_policy_decision_use :: 
    Ptr WebPolicyDecision ->                -- _obj : TInterface "WebKit" "WebPolicyDecision"
    IO ()


webPolicyDecisionUse ::
    (MonadIO m, WebPolicyDecisionK a) =>
    a ->                                    -- _obj
    m ()
webPolicyDecisionUse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_policy_decision_use _obj'
    touchManagedPtr _obj
    return ()