packages feed

gi-webkit2-0.2.8.11: GI/WebKit2.hs

-- Generated code.

{-# OPTIONS_GHC -fno-warn-unused-imports #-}

{-# LANGUAGE ForeignFunctionInterface, ConstraintKinds,
    TypeFamilies, MultiParamTypeClasses, KindSignatures,
    FlexibleInstances, UndecidableInstances, DataKinds,
    OverloadedStrings, NegativeLiterals, FlexibleContexts #-}

module GI.WebKit2 where

import Prelude ()
import Data.GI.Base.ShortPrelude
import Data.Char
import Data.Int
import Data.Word
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Char8 (ByteString)
import qualified Data.Map as Map
import Foreign.C
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
import Foreign.Storable (peek, poke, sizeOf)
import Control.Applicative ((<$>))
import Control.Exception (onException)
import Control.Monad.IO.Class
import qualified Data.Text as T

import Data.GI.Base.Attributes hiding (get, set)
import Data.GI.Base.BasicTypes
import Data.GI.Base.BasicConversions
import Data.GI.Base.Closure
import Data.GI.Base.GError
import Data.GI.Base.GHashTable
import Data.GI.Base.GParamSpec
import Data.GI.Base.GVariant
import Data.GI.Base.GValue
import Data.GI.Base.ManagedPtr
import Data.GI.Base.Overloading
import Data.GI.Base.Properties hiding (new)
import Data.GI.Base.Signals (SignalConnectMode(..), connectSignalFunPtr, SignalHandlerId)
import Data.GI.Base.Utils

import qualified GI.Atk as Atk
import qualified GI.AtkAttributes as AtkA
import qualified GI.GLib as GLib
import qualified GI.GLibAttributes as GLibA
import qualified GI.GObject as GObject
import qualified GI.GObjectAttributes as GObjectA
import qualified GI.Gdk as Gdk
import qualified GI.GdkAttributes as GdkA
import qualified GI.Gio as Gio
import qualified GI.GioAttributes as GioA
import qualified GI.Gtk as Gtk
import qualified GI.GtkAttributes as GtkA
import qualified GI.JavaScriptCore as JavaScriptCore
import qualified GI.JavaScriptCoreAttributes as JavaScriptCoreA
import qualified GI.Soup as Soup
import qualified GI.SoupAttributes as SoupA
import qualified GI.Cairo as Cairo
import qualified GI.CairoAttributes as CairoA

-- object AuthenticationRequest 
newtype AuthenticationRequest = AuthenticationRequest (ForeignPtr AuthenticationRequest)
noAuthenticationRequest :: Maybe AuthenticationRequest
noAuthenticationRequest = Nothing

foreign import ccall "webkit_authentication_request_get_type"
    c_webkit_authentication_request_get_type :: IO GType

type instance ParentTypes AuthenticationRequest = '[GObject.Object]

instance GObject AuthenticationRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_authentication_request_get_type
    

class GObject o => AuthenticationRequestK o
instance (GObject o, IsDescendantOf AuthenticationRequest o) => AuthenticationRequestK o

toAuthenticationRequest :: AuthenticationRequestK o => o -> IO AuthenticationRequest
toAuthenticationRequest = unsafeCastTo AuthenticationRequest

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

foreign import ccall "webkit_authentication_request_authenticate" webkit_authentication_request_authenticate :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    Ptr Credential ->                       -- credential : TInterface "WebKit2" "Credential"
    IO ()


authenticationRequestAuthenticate ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    Maybe (Credential) ->                   -- credential
    m ()
authenticationRequestAuthenticate _obj credential = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCredential <- case credential of
        Nothing -> return nullPtr
        Just jCredential -> do
            let jCredential' = unsafeManagedPtrGetPtr jCredential
            return jCredential'
    webkit_authentication_request_authenticate _obj' maybeCredential
    touchManagedPtr _obj
    whenJust credential touchManagedPtr
    return ()

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

foreign import ccall "webkit_authentication_request_can_save_credentials" webkit_authentication_request_can_save_credentials :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO CInt


authenticationRequestCanSaveCredentials ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m Bool
authenticationRequestCanSaveCredentials _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_can_save_credentials _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_authentication_request_cancel" webkit_authentication_request_cancel :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO ()


authenticationRequestCancel ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m ()
authenticationRequestCancel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_authentication_request_cancel _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_authentication_request_get_host" webkit_authentication_request_get_host :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO CString


authenticationRequestGetHost ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m T.Text
authenticationRequestGetHost _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_get_host _obj'
    checkUnexpectedReturnNULL "webkit_authentication_request_get_host" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_authentication_request_get_port" webkit_authentication_request_get_port :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO Word32


authenticationRequestGetPort ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m Word32
authenticationRequestGetPort _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_get_port _obj'
    touchManagedPtr _obj
    return result

-- method AuthenticationRequest::get_proposed_credential
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "AuthenticationRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "AuthenticationRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "Credential"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_authentication_request_get_proposed_credential" webkit_authentication_request_get_proposed_credential :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO (Ptr Credential)


authenticationRequestGetProposedCredential ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m Credential
authenticationRequestGetProposedCredential _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_get_proposed_credential _obj'
    checkUnexpectedReturnNULL "webkit_authentication_request_get_proposed_credential" result
    result' <- (wrapBoxed Credential) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_authentication_request_get_realm" webkit_authentication_request_get_realm :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO CString


authenticationRequestGetRealm ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m T.Text
authenticationRequestGetRealm _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_get_realm _obj'
    checkUnexpectedReturnNULL "webkit_authentication_request_get_realm" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method AuthenticationRequest::get_scheme
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "AuthenticationRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "AuthenticationRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "AuthenticationScheme"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_authentication_request_get_scheme" webkit_authentication_request_get_scheme :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO CUInt


authenticationRequestGetScheme ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m AuthenticationScheme
authenticationRequestGetScheme _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_get_scheme _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_authentication_request_is_for_proxy" webkit_authentication_request_is_for_proxy :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO CInt


authenticationRequestIsForProxy ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m Bool
authenticationRequestIsForProxy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_is_for_proxy _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_authentication_request_is_retry" webkit_authentication_request_is_retry :: 
    Ptr AuthenticationRequest ->            -- _obj : TInterface "WebKit2" "AuthenticationRequest"
    IO CInt


authenticationRequestIsRetry ::
    (MonadIO m, AuthenticationRequestK a) =>
    a ->                                    -- _obj
    m Bool
authenticationRequestIsRetry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_authentication_request_is_retry _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- signal AuthenticationRequest::cancelled
type AuthenticationRequestCancelledCallback =
    IO ()

noAuthenticationRequestCancelledCallback :: Maybe AuthenticationRequestCancelledCallback
noAuthenticationRequestCancelledCallback = Nothing

type AuthenticationRequestCancelledCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkAuthenticationRequestCancelledCallback :: AuthenticationRequestCancelledCallbackC -> IO (FunPtr AuthenticationRequestCancelledCallbackC)

authenticationRequestCancelledClosure :: AuthenticationRequestCancelledCallback -> IO Closure
authenticationRequestCancelledClosure cb = newCClosure =<< mkAuthenticationRequestCancelledCallback wrapped
    where wrapped = authenticationRequestCancelledCallbackWrapper cb

authenticationRequestCancelledCallbackWrapper ::
    AuthenticationRequestCancelledCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
authenticationRequestCancelledCallbackWrapper _cb _ _ = do
    _cb 

onAuthenticationRequestCancelled :: (GObject a, MonadIO m) => a -> AuthenticationRequestCancelledCallback -> m SignalHandlerId
onAuthenticationRequestCancelled obj cb = liftIO $ connectAuthenticationRequestCancelled obj cb SignalConnectBefore
afterAuthenticationRequestCancelled :: (GObject a, MonadIO m) => a -> AuthenticationRequestCancelledCallback -> m SignalHandlerId
afterAuthenticationRequestCancelled obj cb = connectAuthenticationRequestCancelled obj cb SignalConnectAfter

connectAuthenticationRequestCancelled :: (GObject a, MonadIO m) =>
                                         a -> AuthenticationRequestCancelledCallback -> SignalConnectMode -> m SignalHandlerId
connectAuthenticationRequestCancelled obj cb after = liftIO $ do
    cb' <- mkAuthenticationRequestCancelledCallback (authenticationRequestCancelledCallbackWrapper cb)
    connectSignalFunPtr obj "cancelled" cb' after

-- Enum AuthenticationScheme

data AuthenticationScheme = 
      AuthenticationSchemeDefault
    | AuthenticationSchemeHttpBasic
    | AuthenticationSchemeHttpDigest
    | AuthenticationSchemeHtmlForm
    | AuthenticationSchemeNtlm
    | AuthenticationSchemeNegotiate
    | AuthenticationSchemeClientCertificateRequested
    | AuthenticationSchemeServerTrustEvaluationRequested
    | AuthenticationSchemeUnknown
    | AnotherAuthenticationScheme Int
    deriving (Show, Eq)

instance Enum AuthenticationScheme where
    fromEnum AuthenticationSchemeDefault = 1
    fromEnum AuthenticationSchemeHttpBasic = 2
    fromEnum AuthenticationSchemeHttpDigest = 3
    fromEnum AuthenticationSchemeHtmlForm = 4
    fromEnum AuthenticationSchemeNtlm = 5
    fromEnum AuthenticationSchemeNegotiate = 6
    fromEnum AuthenticationSchemeClientCertificateRequested = 7
    fromEnum AuthenticationSchemeServerTrustEvaluationRequested = 8
    fromEnum AuthenticationSchemeUnknown = 100
    fromEnum (AnotherAuthenticationScheme k) = k

    toEnum 1 = AuthenticationSchemeDefault
    toEnum 2 = AuthenticationSchemeHttpBasic
    toEnum 3 = AuthenticationSchemeHttpDigest
    toEnum 4 = AuthenticationSchemeHtmlForm
    toEnum 5 = AuthenticationSchemeNtlm
    toEnum 6 = AuthenticationSchemeNegotiate
    toEnum 7 = AuthenticationSchemeClientCertificateRequested
    toEnum 8 = AuthenticationSchemeServerTrustEvaluationRequested
    toEnum 100 = AuthenticationSchemeUnknown
    toEnum k = AnotherAuthenticationScheme k

foreign import ccall "webkit_authentication_scheme_get_type" c_webkit_authentication_scheme_get_type :: 
    IO GType

instance BoxedEnum AuthenticationScheme where
    boxedEnumType _ = c_webkit_authentication_scheme_get_type

-- object BackForwardList 
newtype BackForwardList = BackForwardList (ForeignPtr BackForwardList)
noBackForwardList :: Maybe BackForwardList
noBackForwardList = Nothing

foreign import ccall "webkit_back_forward_list_get_type"
    c_webkit_back_forward_list_get_type :: IO GType

type instance ParentTypes BackForwardList = '[GObject.Object]

instance GObject BackForwardList where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_back_forward_list_get_type
    

class GObject o => BackForwardListK o
instance (GObject o, IsDescendantOf BackForwardList o) => BackForwardListK o

toBackForwardList :: BackForwardListK o => o -> IO BackForwardList
toBackForwardList = unsafeCastTo BackForwardList

-- method BackForwardList::get_back_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "BackForwardListItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_back_item" webkit_back_forward_list_get_back_item :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    IO (Ptr BackForwardListItem)


backForwardListGetBackItem ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    m BackForwardListItem
backForwardListGetBackItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_back_item _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_back_item" result
    result' <- (newObject BackForwardListItem) result
    touchManagedPtr _obj
    return result'

-- method BackForwardList::get_back_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "BackForwardListItem")
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_back_list" webkit_back_forward_list_get_back_list :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    IO (Ptr (GList (Ptr BackForwardListItem)))


backForwardListGetBackList ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    m [BackForwardListItem]
backForwardListGetBackList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_back_list _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_back_list" result
    result' <- unpackGList result
    result'' <- mapM (newObject BackForwardListItem) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method BackForwardList::get_back_list_with_limit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "BackForwardListItem")
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_back_list_with_limit" webkit_back_forward_list_get_back_list_with_limit :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    Word32 ->                               -- limit : TBasicType TUInt32
    IO (Ptr (GList (Ptr BackForwardListItem)))


backForwardListGetBackListWithLimit ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- limit
    m [BackForwardListItem]
backForwardListGetBackListWithLimit _obj limit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_back_list_with_limit _obj' limit
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_back_list_with_limit" result
    result' <- unpackGList result
    result'' <- mapM (newObject BackForwardListItem) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method BackForwardList::get_current_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "BackForwardListItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_current_item" webkit_back_forward_list_get_current_item :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    IO (Ptr BackForwardListItem)


backForwardListGetCurrentItem ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    m BackForwardListItem
backForwardListGetCurrentItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_current_item _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_current_item" result
    result' <- (newObject BackForwardListItem) result
    touchManagedPtr _obj
    return result'

-- method BackForwardList::get_forward_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "BackForwardListItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_forward_item" webkit_back_forward_list_get_forward_item :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    IO (Ptr BackForwardListItem)


backForwardListGetForwardItem ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    m BackForwardListItem
backForwardListGetForwardItem _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_forward_item _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_forward_item" result
    result' <- (newObject BackForwardListItem) result
    touchManagedPtr _obj
    return result'

-- method BackForwardList::get_forward_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "BackForwardListItem")
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_forward_list" webkit_back_forward_list_get_forward_list :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    IO (Ptr (GList (Ptr BackForwardListItem)))


backForwardListGetForwardList ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    m [BackForwardListItem]
backForwardListGetForwardList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_forward_list _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_forward_list" result
    result' <- unpackGList result
    result'' <- mapM (newObject BackForwardListItem) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

-- method BackForwardList::get_forward_list_with_limit
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "limit", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "BackForwardListItem")
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_forward_list_with_limit" webkit_back_forward_list_get_forward_list_with_limit :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    Word32 ->                               -- limit : TBasicType TUInt32
    IO (Ptr (GList (Ptr BackForwardListItem)))


backForwardListGetForwardListWithLimit ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- limit
    m [BackForwardListItem]
backForwardListGetForwardListWithLimit _obj limit = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_forward_list_with_limit _obj' limit
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_forward_list_with_limit" result
    result' <- unpackGList result
    result'' <- mapM (newObject BackForwardListItem) result'
    g_list_free result
    touchManagedPtr _obj
    return result''

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

foreign import ccall "webkit_back_forward_list_get_length" webkit_back_forward_list_get_length :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    IO Word32


backForwardListGetLength ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    m Word32
backForwardListGetLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_length _obj'
    touchManagedPtr _obj
    return result

-- method BackForwardList::get_nth_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "BackForwardList", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "BackForwardListItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_back_forward_list_get_nth_item" webkit_back_forward_list_get_nth_item :: 
    Ptr BackForwardList ->                  -- _obj : TInterface "WebKit2" "BackForwardList"
    Int32 ->                                -- index : TBasicType TInt32
    IO (Ptr BackForwardListItem)


backForwardListGetNthItem ::
    (MonadIO m, BackForwardListK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- index
    m BackForwardListItem
backForwardListGetNthItem _obj index = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_get_nth_item _obj' index
    checkUnexpectedReturnNULL "webkit_back_forward_list_get_nth_item" result
    result' <- (newObject BackForwardListItem) result
    touchManagedPtr _obj
    return result'

-- signal BackForwardList::changed
type BackForwardListChangedCallback =
    Maybe BackForwardListItem ->
    Ptr () ->
    IO ()

noBackForwardListChangedCallback :: Maybe BackForwardListChangedCallback
noBackForwardListChangedCallback = Nothing

type BackForwardListChangedCallbackC =
    Ptr () ->                               -- object
    Ptr BackForwardListItem ->
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkBackForwardListChangedCallback :: BackForwardListChangedCallbackC -> IO (FunPtr BackForwardListChangedCallbackC)

backForwardListChangedClosure :: BackForwardListChangedCallback -> IO Closure
backForwardListChangedClosure cb = newCClosure =<< mkBackForwardListChangedCallback wrapped
    where wrapped = backForwardListChangedCallbackWrapper cb

backForwardListChangedCallbackWrapper ::
    BackForwardListChangedCallback ->
    Ptr () ->
    Ptr BackForwardListItem ->
    Ptr () ->
    Ptr () ->
    IO ()
backForwardListChangedCallbackWrapper _cb _ item_added items_removed _ = do
    maybeItem_added <-
        if item_added == nullPtr
        then return Nothing
        else do
            item_added' <- (newObject BackForwardListItem) item_added
            return $ Just item_added'
    _cb  maybeItem_added items_removed

onBackForwardListChanged :: (GObject a, MonadIO m) => a -> BackForwardListChangedCallback -> m SignalHandlerId
onBackForwardListChanged obj cb = liftIO $ connectBackForwardListChanged obj cb SignalConnectBefore
afterBackForwardListChanged :: (GObject a, MonadIO m) => a -> BackForwardListChangedCallback -> m SignalHandlerId
afterBackForwardListChanged obj cb = connectBackForwardListChanged obj cb SignalConnectAfter

connectBackForwardListChanged :: (GObject a, MonadIO m) =>
                                 a -> BackForwardListChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectBackForwardListChanged obj cb after = liftIO $ do
    cb' <- mkBackForwardListChangedCallback (backForwardListChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- object BackForwardListItem 
newtype BackForwardListItem = BackForwardListItem (ForeignPtr BackForwardListItem)
noBackForwardListItem :: Maybe BackForwardListItem
noBackForwardListItem = Nothing

foreign import ccall "webkit_back_forward_list_item_get_type"
    c_webkit_back_forward_list_item_get_type :: IO GType

type instance ParentTypes BackForwardListItem = '[GObject.Object]

instance GObject BackForwardListItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_webkit_back_forward_list_item_get_type
    

class GObject o => BackForwardListItemK o
instance (GObject o, IsDescendantOf BackForwardListItem o) => BackForwardListItemK o

toBackForwardListItem :: BackForwardListItemK o => o -> IO BackForwardListItem
toBackForwardListItem = unsafeCastTo BackForwardListItem

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

foreign import ccall "webkit_back_forward_list_item_get_original_uri" webkit_back_forward_list_item_get_original_uri :: 
    Ptr BackForwardListItem ->              -- _obj : TInterface "WebKit2" "BackForwardListItem"
    IO CString


backForwardListItemGetOriginalUri ::
    (MonadIO m, BackForwardListItemK a) =>
    a ->                                    -- _obj
    m T.Text
backForwardListItemGetOriginalUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_item_get_original_uri _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_item_get_original_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_back_forward_list_item_get_title" webkit_back_forward_list_item_get_title :: 
    Ptr BackForwardListItem ->              -- _obj : TInterface "WebKit2" "BackForwardListItem"
    IO CString


backForwardListItemGetTitle ::
    (MonadIO m, BackForwardListItemK a) =>
    a ->                                    -- _obj
    m T.Text
backForwardListItemGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_item_get_title _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_item_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_back_forward_list_item_get_uri" webkit_back_forward_list_item_get_uri :: 
    Ptr BackForwardListItem ->              -- _obj : TInterface "WebKit2" "BackForwardListItem"
    IO CString


backForwardListItemGetUri ::
    (MonadIO m, BackForwardListItemK a) =>
    a ->                                    -- _obj
    m T.Text
backForwardListItemGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_back_forward_list_item_get_uri _obj'
    checkUnexpectedReturnNULL "webkit_back_forward_list_item_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- Enum CacheModel

data CacheModel = 
      CacheModelDocumentViewer
    | CacheModelWebBrowser
    | CacheModelDocumentBrowser
    | AnotherCacheModel Int
    deriving (Show, Eq)

instance Enum CacheModel where
    fromEnum CacheModelDocumentViewer = 0
    fromEnum CacheModelWebBrowser = 1
    fromEnum CacheModelDocumentBrowser = 2
    fromEnum (AnotherCacheModel k) = k

    toEnum 0 = CacheModelDocumentViewer
    toEnum 1 = CacheModelWebBrowser
    toEnum 2 = CacheModelDocumentBrowser
    toEnum k = AnotherCacheModel k

foreign import ccall "webkit_cache_model_get_type" c_webkit_cache_model_get_type :: 
    IO GType

instance BoxedEnum CacheModel where
    boxedEnumType _ = c_webkit_cache_model_get_type

-- object ColorChooserRequest 
newtype ColorChooserRequest = ColorChooserRequest (ForeignPtr ColorChooserRequest)
noColorChooserRequest :: Maybe ColorChooserRequest
noColorChooserRequest = Nothing

foreign import ccall "webkit_color_chooser_request_get_type"
    c_webkit_color_chooser_request_get_type :: IO GType

type instance ParentTypes ColorChooserRequest = '[GObject.Object]

instance GObject ColorChooserRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_color_chooser_request_get_type
    

class GObject o => ColorChooserRequestK o
instance (GObject o, IsDescendantOf ColorChooserRequest o) => ColorChooserRequestK o

toColorChooserRequest :: ColorChooserRequestK o => o -> IO ColorChooserRequest
toColorChooserRequest = unsafeCastTo ColorChooserRequest

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

foreign import ccall "webkit_color_chooser_request_cancel" webkit_color_chooser_request_cancel :: 
    Ptr ColorChooserRequest ->              -- _obj : TInterface "WebKit2" "ColorChooserRequest"
    IO ()


colorChooserRequestCancel ::
    (MonadIO m, ColorChooserRequestK a) =>
    a ->                                    -- _obj
    m ()
colorChooserRequestCancel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_color_chooser_request_cancel _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_color_chooser_request_finish" webkit_color_chooser_request_finish :: 
    Ptr ColorChooserRequest ->              -- _obj : TInterface "WebKit2" "ColorChooserRequest"
    IO ()


colorChooserRequestFinish ::
    (MonadIO m, ColorChooserRequestK a) =>
    a ->                                    -- _obj
    m ()
colorChooserRequestFinish _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_color_chooser_request_finish _obj'
    touchManagedPtr _obj
    return ()

-- method ColorChooserRequest::get_element_rectangle
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ColorChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rect", argType = TInterface "cairo" "RectangleInt", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ColorChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_color_chooser_request_get_element_rectangle" webkit_color_chooser_request_get_element_rectangle :: 
    Ptr ColorChooserRequest ->              -- _obj : TInterface "WebKit2" "ColorChooserRequest"
    Ptr Cairo.RectangleInt ->               -- rect : TInterface "cairo" "RectangleInt"
    IO ()


colorChooserRequestGetElementRectangle ::
    (MonadIO m, ColorChooserRequestK a) =>
    a ->                                    -- _obj
    m (Cairo.RectangleInt)
colorChooserRequestGetElementRectangle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rect <- callocBoxedBytes 16 :: IO (Ptr Cairo.RectangleInt)
    webkit_color_chooser_request_get_element_rectangle _obj' rect
    rect' <- (wrapBoxed Cairo.RectangleInt) rect
    touchManagedPtr _obj
    return rect'

-- method ColorChooserRequest::get_rgba
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ColorChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ColorChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_color_chooser_request_get_rgba" webkit_color_chooser_request_get_rgba :: 
    Ptr ColorChooserRequest ->              -- _obj : TInterface "WebKit2" "ColorChooserRequest"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


colorChooserRequestGetRgba ::
    (MonadIO m, ColorChooserRequestK a) =>
    a ->                                    -- _obj
    m (Gdk.RGBA)
colorChooserRequestGetRgba _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rgba <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    webkit_color_chooser_request_get_rgba _obj' rgba
    rgba' <- (wrapBoxed Gdk.RGBA) rgba
    touchManagedPtr _obj
    return rgba'

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

foreign import ccall "webkit_color_chooser_request_set_rgba" webkit_color_chooser_request_set_rgba :: 
    Ptr ColorChooserRequest ->              -- _obj : TInterface "WebKit2" "ColorChooserRequest"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


colorChooserRequestSetRgba ::
    (MonadIO m, ColorChooserRequestK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- rgba
    m ()
colorChooserRequestSetRgba _obj rgba = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rgba' = unsafeManagedPtrGetPtr rgba
    webkit_color_chooser_request_set_rgba _obj' rgba'
    touchManagedPtr _obj
    touchManagedPtr rgba
    return ()

-- signal ColorChooserRequest::finished
type ColorChooserRequestFinishedCallback =
    IO ()

noColorChooserRequestFinishedCallback :: Maybe ColorChooserRequestFinishedCallback
noColorChooserRequestFinishedCallback = Nothing

type ColorChooserRequestFinishedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkColorChooserRequestFinishedCallback :: ColorChooserRequestFinishedCallbackC -> IO (FunPtr ColorChooserRequestFinishedCallbackC)

colorChooserRequestFinishedClosure :: ColorChooserRequestFinishedCallback -> IO Closure
colorChooserRequestFinishedClosure cb = newCClosure =<< mkColorChooserRequestFinishedCallback wrapped
    where wrapped = colorChooserRequestFinishedCallbackWrapper cb

colorChooserRequestFinishedCallbackWrapper ::
    ColorChooserRequestFinishedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
colorChooserRequestFinishedCallbackWrapper _cb _ _ = do
    _cb 

onColorChooserRequestFinished :: (GObject a, MonadIO m) => a -> ColorChooserRequestFinishedCallback -> m SignalHandlerId
onColorChooserRequestFinished obj cb = liftIO $ connectColorChooserRequestFinished obj cb SignalConnectBefore
afterColorChooserRequestFinished :: (GObject a, MonadIO m) => a -> ColorChooserRequestFinishedCallback -> m SignalHandlerId
afterColorChooserRequestFinished obj cb = connectColorChooserRequestFinished obj cb SignalConnectAfter

connectColorChooserRequestFinished :: (GObject a, MonadIO m) =>
                                      a -> ColorChooserRequestFinishedCallback -> SignalConnectMode -> m SignalHandlerId
connectColorChooserRequestFinished obj cb after = liftIO $ do
    cb' <- mkColorChooserRequestFinishedCallback (colorChooserRequestFinishedCallbackWrapper cb)
    connectSignalFunPtr obj "finished" cb' after

-- object ContextMenu 
newtype ContextMenu = ContextMenu (ForeignPtr ContextMenu)
noContextMenu :: Maybe ContextMenu
noContextMenu = Nothing

foreign import ccall "webkit_context_menu_get_type"
    c_webkit_context_menu_get_type :: IO GType

type instance ParentTypes ContextMenu = '[GObject.Object]

instance GObject ContextMenu where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_context_menu_get_type
    

class GObject o => ContextMenuK o
instance (GObject o, IsDescendantOf ContextMenu o) => ContextMenuK o

toContextMenu :: ContextMenuK o => o -> IO ContextMenu
toContextMenu = unsafeCastTo ContextMenu

-- method ContextMenu::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "ContextMenu"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_new" webkit_context_menu_new :: 
    IO (Ptr ContextMenu)


contextMenuNew ::
    (MonadIO m) =>
    m ContextMenu
contextMenuNew  = liftIO $ do
    result <- webkit_context_menu_new
    checkUnexpectedReturnNULL "webkit_context_menu_new" result
    result' <- (wrapObject ContextMenu) result
    return result'

-- method ContextMenu::new_with_items
-- method type : Constructor
-- Args : [Arg {argName = "items", argType = TGList (TInterface "WebKit2" "ContextMenuItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "items", argType = TGList (TInterface "WebKit2" "ContextMenuItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenu"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_new_with_items" webkit_context_menu_new_with_items :: 
    Ptr (GList (Ptr ContextMenuItem)) ->    -- items : TGList (TInterface "WebKit2" "ContextMenuItem")
    IO (Ptr ContextMenu)


contextMenuNewWithItems ::
    (MonadIO m, ContextMenuItemK a) =>
    [a] ->                                  -- items
    m ContextMenu
contextMenuNewWithItems items = liftIO $ do
    let items' = map unsafeManagedPtrCastPtr items
    items'' <- packGList items'
    result <- webkit_context_menu_new_with_items items''
    checkUnexpectedReturnNULL "webkit_context_menu_new_with_items" result
    result' <- (wrapObject ContextMenu) result
    mapM_ touchManagedPtr items
    g_list_free items''
    return result'

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

foreign import ccall "webkit_context_menu_append" webkit_context_menu_append :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Ptr ContextMenuItem ->                  -- item : TInterface "WebKit2" "ContextMenuItem"
    IO ()


contextMenuAppend ::
    (MonadIO m, ContextMenuK a, ContextMenuItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    m ()
contextMenuAppend _obj item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    webkit_context_menu_append _obj' item'
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

-- method ContextMenu::first
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_first" webkit_context_menu_first :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    IO (Ptr ContextMenuItem)


contextMenuFirst ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    m ContextMenuItem
contextMenuFirst _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_first _obj'
    checkUnexpectedReturnNULL "webkit_context_menu_first" result
    result' <- (newObject ContextMenuItem) result
    touchManagedPtr _obj
    return result'

-- method ContextMenu::get_item_at_position
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_get_item_at_position" webkit_context_menu_get_item_at_position :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Word32 ->                               -- position : TBasicType TUInt32
    IO (Ptr ContextMenuItem)


contextMenuGetItemAtPosition ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- position
    m ContextMenuItem
contextMenuGetItemAtPosition _obj position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_get_item_at_position _obj' position
    checkUnexpectedReturnNULL "webkit_context_menu_get_item_at_position" result
    result' <- (newObject ContextMenuItem) result
    touchManagedPtr _obj
    return result'

-- method ContextMenu::get_items
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "ContextMenuItem")
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_get_items" webkit_context_menu_get_items :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    IO (Ptr (GList (Ptr ContextMenuItem)))


contextMenuGetItems ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    m [ContextMenuItem]
contextMenuGetItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_get_items _obj'
    checkUnexpectedReturnNULL "webkit_context_menu_get_items" result
    result' <- unpackGList result
    result'' <- mapM (newObject ContextMenuItem) result'
    touchManagedPtr _obj
    return result''

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

foreign import ccall "webkit_context_menu_get_n_items" webkit_context_menu_get_n_items :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    IO Word32


contextMenuGetNItems ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    m Word32
contextMenuGetNItems _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_get_n_items _obj'
    touchManagedPtr _obj
    return result

-- method ContextMenu::get_user_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TVariant
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_get_user_data" webkit_context_menu_get_user_data :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    IO (Ptr GVariant)


contextMenuGetUserData ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    m GVariant
contextMenuGetUserData _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_get_user_data _obj'
    checkUnexpectedReturnNULL "webkit_context_menu_get_user_data" result
    result' <- newGVariantFromPtr result
    touchManagedPtr _obj
    return result'

-- method ContextMenu::insert
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_insert" webkit_context_menu_insert :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Ptr ContextMenuItem ->                  -- item : TInterface "WebKit2" "ContextMenuItem"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


contextMenuInsert ::
    (MonadIO m, ContextMenuK a, ContextMenuItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    Int32 ->                                -- position
    m ()
contextMenuInsert _obj item position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    webkit_context_menu_insert _obj' item' position
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

-- method ContextMenu::last
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_last" webkit_context_menu_last :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    IO (Ptr ContextMenuItem)


contextMenuLast ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    m ContextMenuItem
contextMenuLast _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_last _obj'
    checkUnexpectedReturnNULL "webkit_context_menu_last" result
    result' <- (newObject ContextMenuItem) result
    touchManagedPtr _obj
    return result'

-- method ContextMenu::move_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_move_item" webkit_context_menu_move_item :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Ptr ContextMenuItem ->                  -- item : TInterface "WebKit2" "ContextMenuItem"
    Int32 ->                                -- position : TBasicType TInt32
    IO ()


contextMenuMoveItem ::
    (MonadIO m, ContextMenuK a, ContextMenuItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    Int32 ->                                -- position
    m ()
contextMenuMoveItem _obj item position = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    webkit_context_menu_move_item _obj' item' position
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

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

foreign import ccall "webkit_context_menu_prepend" webkit_context_menu_prepend :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Ptr ContextMenuItem ->                  -- item : TInterface "WebKit2" "ContextMenuItem"
    IO ()


contextMenuPrepend ::
    (MonadIO m, ContextMenuK a, ContextMenuItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    m ()
contextMenuPrepend _obj item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    webkit_context_menu_prepend _obj' item'
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

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

foreign import ccall "webkit_context_menu_remove" webkit_context_menu_remove :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Ptr ContextMenuItem ->                  -- item : TInterface "WebKit2" "ContextMenuItem"
    IO ()


contextMenuRemove ::
    (MonadIO m, ContextMenuK a, ContextMenuItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- item
    m ()
contextMenuRemove _obj item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let item' = unsafeManagedPtrCastPtr item
    webkit_context_menu_remove _obj' item'
    touchManagedPtr _obj
    touchManagedPtr item
    return ()

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

foreign import ccall "webkit_context_menu_remove_all" webkit_context_menu_remove_all :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    IO ()


contextMenuRemoveAll ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    m ()
contextMenuRemoveAll _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_context_menu_remove_all _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_context_menu_set_user_data" webkit_context_menu_set_user_data :: 
    Ptr ContextMenu ->                      -- _obj : TInterface "WebKit2" "ContextMenu"
    Ptr GVariant ->                         -- user_data : TVariant
    IO ()


contextMenuSetUserData ::
    (MonadIO m, ContextMenuK a) =>
    a ->                                    -- _obj
    GVariant ->                             -- user_data
    m ()
contextMenuSetUserData _obj user_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let user_data' = unsafeManagedPtrGetPtr user_data
    webkit_context_menu_set_user_data _obj' user_data'
    touchManagedPtr _obj
    return ()

-- Enum ContextMenuAction

data ContextMenuAction = 
      ContextMenuActionNoAction
    | ContextMenuActionOpenLink
    | ContextMenuActionOpenLinkInNewWindow
    | ContextMenuActionDownloadLinkToDisk
    | ContextMenuActionCopyLinkToClipboard
    | ContextMenuActionOpenImageInNewWindow
    | ContextMenuActionDownloadImageToDisk
    | ContextMenuActionCopyImageToClipboard
    | ContextMenuActionCopyImageUrlToClipboard
    | ContextMenuActionOpenFrameInNewWindow
    | ContextMenuActionGoBack
    | ContextMenuActionGoForward
    | ContextMenuActionStop
    | ContextMenuActionReload
    | ContextMenuActionCopy
    | ContextMenuActionCut
    | ContextMenuActionPaste
    | ContextMenuActionDelete
    | ContextMenuActionSelectAll
    | ContextMenuActionInputMethods
    | ContextMenuActionUnicode
    | ContextMenuActionSpellingGuess
    | ContextMenuActionNoGuessesFound
    | ContextMenuActionIgnoreSpelling
    | ContextMenuActionLearnSpelling
    | ContextMenuActionIgnoreGrammar
    | ContextMenuActionFontMenu
    | ContextMenuActionBold
    | ContextMenuActionItalic
    | ContextMenuActionUnderline
    | ContextMenuActionOutline
    | ContextMenuActionInspectElement
    | ContextMenuActionOpenVideoInNewWindow
    | ContextMenuActionOpenAudioInNewWindow
    | ContextMenuActionCopyVideoLinkToClipboard
    | ContextMenuActionCopyAudioLinkToClipboard
    | ContextMenuActionToggleMediaControls
    | ContextMenuActionToggleMediaLoop
    | ContextMenuActionEnterVideoFullscreen
    | ContextMenuActionMediaPlay
    | ContextMenuActionMediaPause
    | ContextMenuActionMediaMute
    | ContextMenuActionDownloadVideoToDisk
    | ContextMenuActionDownloadAudioToDisk
    | ContextMenuActionCustom
    | AnotherContextMenuAction Int
    deriving (Show, Eq)

instance Enum ContextMenuAction where
    fromEnum ContextMenuActionNoAction = 0
    fromEnum ContextMenuActionOpenLink = 1
    fromEnum ContextMenuActionOpenLinkInNewWindow = 2
    fromEnum ContextMenuActionDownloadLinkToDisk = 3
    fromEnum ContextMenuActionCopyLinkToClipboard = 4
    fromEnum ContextMenuActionOpenImageInNewWindow = 5
    fromEnum ContextMenuActionDownloadImageToDisk = 6
    fromEnum ContextMenuActionCopyImageToClipboard = 7
    fromEnum ContextMenuActionCopyImageUrlToClipboard = 8
    fromEnum ContextMenuActionOpenFrameInNewWindow = 9
    fromEnum ContextMenuActionGoBack = 10
    fromEnum ContextMenuActionGoForward = 11
    fromEnum ContextMenuActionStop = 12
    fromEnum ContextMenuActionReload = 13
    fromEnum ContextMenuActionCopy = 14
    fromEnum ContextMenuActionCut = 15
    fromEnum ContextMenuActionPaste = 16
    fromEnum ContextMenuActionDelete = 17
    fromEnum ContextMenuActionSelectAll = 18
    fromEnum ContextMenuActionInputMethods = 19
    fromEnum ContextMenuActionUnicode = 20
    fromEnum ContextMenuActionSpellingGuess = 21
    fromEnum ContextMenuActionNoGuessesFound = 22
    fromEnum ContextMenuActionIgnoreSpelling = 23
    fromEnum ContextMenuActionLearnSpelling = 24
    fromEnum ContextMenuActionIgnoreGrammar = 25
    fromEnum ContextMenuActionFontMenu = 26
    fromEnum ContextMenuActionBold = 27
    fromEnum ContextMenuActionItalic = 28
    fromEnum ContextMenuActionUnderline = 29
    fromEnum ContextMenuActionOutline = 30
    fromEnum ContextMenuActionInspectElement = 31
    fromEnum ContextMenuActionOpenVideoInNewWindow = 32
    fromEnum ContextMenuActionOpenAudioInNewWindow = 33
    fromEnum ContextMenuActionCopyVideoLinkToClipboard = 34
    fromEnum ContextMenuActionCopyAudioLinkToClipboard = 35
    fromEnum ContextMenuActionToggleMediaControls = 36
    fromEnum ContextMenuActionToggleMediaLoop = 37
    fromEnum ContextMenuActionEnterVideoFullscreen = 38
    fromEnum ContextMenuActionMediaPlay = 39
    fromEnum ContextMenuActionMediaPause = 40
    fromEnum ContextMenuActionMediaMute = 41
    fromEnum ContextMenuActionDownloadVideoToDisk = 42
    fromEnum ContextMenuActionDownloadAudioToDisk = 43
    fromEnum ContextMenuActionCustom = 10000
    fromEnum (AnotherContextMenuAction k) = k

    toEnum 0 = ContextMenuActionNoAction
    toEnum 1 = ContextMenuActionOpenLink
    toEnum 2 = ContextMenuActionOpenLinkInNewWindow
    toEnum 3 = ContextMenuActionDownloadLinkToDisk
    toEnum 4 = ContextMenuActionCopyLinkToClipboard
    toEnum 5 = ContextMenuActionOpenImageInNewWindow
    toEnum 6 = ContextMenuActionDownloadImageToDisk
    toEnum 7 = ContextMenuActionCopyImageToClipboard
    toEnum 8 = ContextMenuActionCopyImageUrlToClipboard
    toEnum 9 = ContextMenuActionOpenFrameInNewWindow
    toEnum 10 = ContextMenuActionGoBack
    toEnum 11 = ContextMenuActionGoForward
    toEnum 12 = ContextMenuActionStop
    toEnum 13 = ContextMenuActionReload
    toEnum 14 = ContextMenuActionCopy
    toEnum 15 = ContextMenuActionCut
    toEnum 16 = ContextMenuActionPaste
    toEnum 17 = ContextMenuActionDelete
    toEnum 18 = ContextMenuActionSelectAll
    toEnum 19 = ContextMenuActionInputMethods
    toEnum 20 = ContextMenuActionUnicode
    toEnum 21 = ContextMenuActionSpellingGuess
    toEnum 22 = ContextMenuActionNoGuessesFound
    toEnum 23 = ContextMenuActionIgnoreSpelling
    toEnum 24 = ContextMenuActionLearnSpelling
    toEnum 25 = ContextMenuActionIgnoreGrammar
    toEnum 26 = ContextMenuActionFontMenu
    toEnum 27 = ContextMenuActionBold
    toEnum 28 = ContextMenuActionItalic
    toEnum 29 = ContextMenuActionUnderline
    toEnum 30 = ContextMenuActionOutline
    toEnum 31 = ContextMenuActionInspectElement
    toEnum 32 = ContextMenuActionOpenVideoInNewWindow
    toEnum 33 = ContextMenuActionOpenAudioInNewWindow
    toEnum 34 = ContextMenuActionCopyVideoLinkToClipboard
    toEnum 35 = ContextMenuActionCopyAudioLinkToClipboard
    toEnum 36 = ContextMenuActionToggleMediaControls
    toEnum 37 = ContextMenuActionToggleMediaLoop
    toEnum 38 = ContextMenuActionEnterVideoFullscreen
    toEnum 39 = ContextMenuActionMediaPlay
    toEnum 40 = ContextMenuActionMediaPause
    toEnum 41 = ContextMenuActionMediaMute
    toEnum 42 = ContextMenuActionDownloadVideoToDisk
    toEnum 43 = ContextMenuActionDownloadAudioToDisk
    toEnum 10000 = ContextMenuActionCustom
    toEnum k = AnotherContextMenuAction k

foreign import ccall "webkit_context_menu_action_get_type" c_webkit_context_menu_action_get_type :: 
    IO GType

instance BoxedEnum ContextMenuAction where
    boxedEnumType _ = c_webkit_context_menu_action_get_type

-- object ContextMenuItem 
newtype ContextMenuItem = ContextMenuItem (ForeignPtr ContextMenuItem)
noContextMenuItem :: Maybe ContextMenuItem
noContextMenuItem = Nothing

foreign import ccall "webkit_context_menu_item_get_type"
    c_webkit_context_menu_item_get_type :: IO GType

type instance ParentTypes ContextMenuItem = '[GObject.Object]

instance GObject ContextMenuItem where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_webkit_context_menu_item_get_type
    

class GObject o => ContextMenuItemK o
instance (GObject o, IsDescendantOf ContextMenuItem o) => ContextMenuItemK o

toContextMenuItem :: ContextMenuItemK o => o -> IO ContextMenuItem
toContextMenuItem = unsafeCastTo ContextMenuItem

-- method ContextMenuItem::new
-- method type : Constructor
-- Args : [Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "action", argType = TInterface "Gtk" "Action", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_new" webkit_context_menu_item_new :: 
    Ptr Gtk.Action ->                       -- action : TInterface "Gtk" "Action"
    IO (Ptr ContextMenuItem)


contextMenuItemNew ::
    (MonadIO m, Gtk.ActionK a) =>
    a ->                                    -- action
    m ContextMenuItem
contextMenuItemNew action = liftIO $ do
    let action' = unsafeManagedPtrCastPtr action
    result <- webkit_context_menu_item_new action'
    checkUnexpectedReturnNULL "webkit_context_menu_item_new" result
    result' <- (newObject ContextMenuItem) result
    touchManagedPtr action
    return result'

-- method ContextMenuItem::new_from_stock_action
-- method type : Constructor
-- Args : [Arg {argName = "action", argType = TInterface "WebKit2" "ContextMenuAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "action", argType = TInterface "WebKit2" "ContextMenuAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_new_from_stock_action" webkit_context_menu_item_new_from_stock_action :: 
    CUInt ->                                -- action : TInterface "WebKit2" "ContextMenuAction"
    IO (Ptr ContextMenuItem)


contextMenuItemNewFromStockAction ::
    (MonadIO m) =>
    ContextMenuAction ->                    -- action
    m ContextMenuItem
contextMenuItemNewFromStockAction action = liftIO $ do
    let action' = (fromIntegral . fromEnum) action
    result <- webkit_context_menu_item_new_from_stock_action action'
    checkUnexpectedReturnNULL "webkit_context_menu_item_new_from_stock_action" result
    result' <- (newObject ContextMenuItem) result
    return result'

-- method ContextMenuItem::new_from_stock_action_with_label
-- method type : Constructor
-- Args : [Arg {argName = "action", argType = TInterface "WebKit2" "ContextMenuAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "action", argType = TInterface "WebKit2" "ContextMenuAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_new_from_stock_action_with_label" webkit_context_menu_item_new_from_stock_action_with_label :: 
    CUInt ->                                -- action : TInterface "WebKit2" "ContextMenuAction"
    CString ->                              -- label : TBasicType TUTF8
    IO (Ptr ContextMenuItem)


contextMenuItemNewFromStockActionWithLabel ::
    (MonadIO m) =>
    ContextMenuAction ->                    -- action
    T.Text ->                               -- label
    m ContextMenuItem
contextMenuItemNewFromStockActionWithLabel action label = liftIO $ do
    let action' = (fromIntegral . fromEnum) action
    label' <- textToCString label
    result <- webkit_context_menu_item_new_from_stock_action_with_label action' label'
    checkUnexpectedReturnNULL "webkit_context_menu_item_new_from_stock_action_with_label" result
    result' <- (newObject ContextMenuItem) result
    freeMem label'
    return result'

-- method ContextMenuItem::new_separator
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_new_separator" webkit_context_menu_item_new_separator :: 
    IO (Ptr ContextMenuItem)


contextMenuItemNewSeparator ::
    (MonadIO m) =>
    m ContextMenuItem
contextMenuItemNewSeparator  = liftIO $ do
    result <- webkit_context_menu_item_new_separator
    checkUnexpectedReturnNULL "webkit_context_menu_item_new_separator" result
    result' <- (newObject ContextMenuItem) result
    return result'

-- method ContextMenuItem::new_with_submenu
-- method type : Constructor
-- Args : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "submenu", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "label", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "submenu", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuItem"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_new_with_submenu" webkit_context_menu_item_new_with_submenu :: 
    CString ->                              -- label : TBasicType TUTF8
    Ptr ContextMenu ->                      -- submenu : TInterface "WebKit2" "ContextMenu"
    IO (Ptr ContextMenuItem)


contextMenuItemNewWithSubmenu ::
    (MonadIO m, ContextMenuK a) =>
    T.Text ->                               -- label
    a ->                                    -- submenu
    m ContextMenuItem
contextMenuItemNewWithSubmenu label submenu = liftIO $ do
    label' <- textToCString label
    let submenu' = unsafeManagedPtrCastPtr submenu
    result <- webkit_context_menu_item_new_with_submenu label' submenu'
    checkUnexpectedReturnNULL "webkit_context_menu_item_new_with_submenu" result
    result' <- (newObject ContextMenuItem) result
    touchManagedPtr submenu
    freeMem label'
    return result'

-- method ContextMenuItem::get_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Action"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_get_action" webkit_context_menu_item_get_action :: 
    Ptr ContextMenuItem ->                  -- _obj : TInterface "WebKit2" "ContextMenuItem"
    IO (Ptr Gtk.Action)


contextMenuItemGetAction ::
    (MonadIO m, ContextMenuItemK a) =>
    a ->                                    -- _obj
    m Gtk.Action
contextMenuItemGetAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_item_get_action _obj'
    checkUnexpectedReturnNULL "webkit_context_menu_item_get_action" result
    result' <- (newObject Gtk.Action) result
    touchManagedPtr _obj
    return result'

-- method ContextMenuItem::get_stock_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenuAction"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_get_stock_action" webkit_context_menu_item_get_stock_action :: 
    Ptr ContextMenuItem ->                  -- _obj : TInterface "WebKit2" "ContextMenuItem"
    IO CUInt


contextMenuItemGetStockAction ::
    (MonadIO m, ContextMenuItemK a) =>
    a ->                                    -- _obj
    m ContextMenuAction
contextMenuItemGetStockAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_item_get_stock_action _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ContextMenuItem::get_submenu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ContextMenu"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_context_menu_item_get_submenu" webkit_context_menu_item_get_submenu :: 
    Ptr ContextMenuItem ->                  -- _obj : TInterface "WebKit2" "ContextMenuItem"
    IO (Ptr ContextMenu)


contextMenuItemGetSubmenu ::
    (MonadIO m, ContextMenuItemK a) =>
    a ->                                    -- _obj
    m ContextMenu
contextMenuItemGetSubmenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_item_get_submenu _obj'
    checkUnexpectedReturnNULL "webkit_context_menu_item_get_submenu" result
    result' <- (newObject ContextMenu) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_context_menu_item_is_separator" webkit_context_menu_item_is_separator :: 
    Ptr ContextMenuItem ->                  -- _obj : TInterface "WebKit2" "ContextMenuItem"
    IO CInt


contextMenuItemIsSeparator ::
    (MonadIO m, ContextMenuItemK a) =>
    a ->                                    -- _obj
    m Bool
contextMenuItemIsSeparator _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_context_menu_item_is_separator _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_context_menu_item_set_submenu" webkit_context_menu_item_set_submenu :: 
    Ptr ContextMenuItem ->                  -- _obj : TInterface "WebKit2" "ContextMenuItem"
    Ptr ContextMenu ->                      -- submenu : TInterface "WebKit2" "ContextMenu"
    IO ()


contextMenuItemSetSubmenu ::
    (MonadIO m, ContextMenuItemK a, ContextMenuK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- submenu
    m ()
contextMenuItemSetSubmenu _obj submenu = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeSubmenu <- case submenu of
        Nothing -> return nullPtr
        Just jSubmenu -> do
            let jSubmenu' = unsafeManagedPtrCastPtr jSubmenu
            return jSubmenu'
    webkit_context_menu_item_set_submenu _obj' maybeSubmenu
    touchManagedPtr _obj
    whenJust submenu touchManagedPtr
    return ()

-- Enum CookieAcceptPolicy

data CookieAcceptPolicy = 
      CookieAcceptPolicyAlways
    | CookieAcceptPolicyNever
    | CookieAcceptPolicyNoThirdParty
    | AnotherCookieAcceptPolicy Int
    deriving (Show, Eq)

instance Enum CookieAcceptPolicy where
    fromEnum CookieAcceptPolicyAlways = 0
    fromEnum CookieAcceptPolicyNever = 1
    fromEnum CookieAcceptPolicyNoThirdParty = 2
    fromEnum (AnotherCookieAcceptPolicy k) = k

    toEnum 0 = CookieAcceptPolicyAlways
    toEnum 1 = CookieAcceptPolicyNever
    toEnum 2 = CookieAcceptPolicyNoThirdParty
    toEnum k = AnotherCookieAcceptPolicy k

foreign import ccall "webkit_cookie_accept_policy_get_type" c_webkit_cookie_accept_policy_get_type :: 
    IO GType

instance BoxedEnum CookieAcceptPolicy where
    boxedEnumType _ = c_webkit_cookie_accept_policy_get_type

-- object CookieManager 
newtype CookieManager = CookieManager (ForeignPtr CookieManager)
noCookieManager :: Maybe CookieManager
noCookieManager = Nothing

foreign import ccall "webkit_cookie_manager_get_type"
    c_webkit_cookie_manager_get_type :: IO GType

type instance ParentTypes CookieManager = '[GObject.Object]

instance GObject CookieManager where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_cookie_manager_get_type
    

class GObject o => CookieManagerK o
instance (GObject o, IsDescendantOf CookieManager o) => CookieManagerK o

toCookieManager :: CookieManagerK o => o -> IO CookieManager
toCookieManager = unsafeCastTo CookieManager

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

foreign import ccall "webkit_cookie_manager_delete_all_cookies" webkit_cookie_manager_delete_all_cookies :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    IO ()


cookieManagerDeleteAllCookies ::
    (MonadIO m, CookieManagerK a) =>
    a ->                                    -- _obj
    m ()
cookieManagerDeleteAllCookies _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_cookie_manager_delete_all_cookies _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_cookie_manager_delete_cookies_for_domain" webkit_cookie_manager_delete_cookies_for_domain :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    CString ->                              -- domain : TBasicType TUTF8
    IO ()


cookieManagerDeleteCookiesForDomain ::
    (MonadIO m, CookieManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- domain
    m ()
cookieManagerDeleteCookiesForDomain _obj domain = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    domain' <- textToCString domain
    webkit_cookie_manager_delete_cookies_for_domain _obj' domain'
    touchManagedPtr _obj
    freeMem domain'
    return ()

-- method CookieManager::get_accept_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_cookie_manager_get_accept_policy" webkit_cookie_manager_get_accept_policy :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


cookieManagerGetAcceptPolicy ::
    (MonadIO m, CookieManagerK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
cookieManagerGetAcceptPolicy _obj cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_cookie_manager_get_accept_policy _obj' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method CookieManager::get_accept_policy_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "CookieAcceptPolicy"
-- throws : True
-- Skip return : False

foreign import ccall "webkit_cookie_manager_get_accept_policy_finish" webkit_cookie_manager_get_accept_policy_finish :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO CUInt


cookieManagerGetAcceptPolicyFinish ::
    (MonadIO m, CookieManagerK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m CookieAcceptPolicy
cookieManagerGetAcceptPolicyFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_cookie_manager_get_accept_policy_finish _obj' result_'
        let result' = (toEnum . fromIntegral) result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

-- method CookieManager::get_domains_with_cookies
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_cookie_manager_get_domains_with_cookies" webkit_cookie_manager_get_domains_with_cookies :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


cookieManagerGetDomainsWithCookies ::
    (MonadIO m, CookieManagerK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
cookieManagerGetDomainsWithCookies _obj cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_cookie_manager_get_domains_with_cookies _obj' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method CookieManager::get_domains_with_cookies_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : True
-- Skip return : False

foreign import ccall "webkit_cookie_manager_get_domains_with_cookies_finish" webkit_cookie_manager_get_domains_with_cookies_finish :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr CString)


cookieManagerGetDomainsWithCookiesFinish ::
    (MonadIO m, CookieManagerK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m [T.Text]
cookieManagerGetDomainsWithCookiesFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_cookie_manager_get_domains_with_cookies_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_cookie_manager_get_domains_with_cookies_finish" result
        result' <- unpackZeroTerminatedUTF8CArray result
        mapZeroTerminatedCArray freeMem result
        freeMem result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

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

foreign import ccall "webkit_cookie_manager_set_accept_policy" webkit_cookie_manager_set_accept_policy :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    CUInt ->                                -- policy : TInterface "WebKit2" "CookieAcceptPolicy"
    IO ()


cookieManagerSetAcceptPolicy ::
    (MonadIO m, CookieManagerK a) =>
    a ->                                    -- _obj
    CookieAcceptPolicy ->                   -- policy
    m ()
cookieManagerSetAcceptPolicy _obj policy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let policy' = (fromIntegral . fromEnum) policy
    webkit_cookie_manager_set_accept_policy _obj' policy'
    touchManagedPtr _obj
    return ()

-- method CookieManager::set_persistent_storage
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "storage", argType = TInterface "WebKit2" "CookiePersistentStorage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "CookieManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filename", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "storage", argType = TInterface "WebKit2" "CookiePersistentStorage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_cookie_manager_set_persistent_storage" webkit_cookie_manager_set_persistent_storage :: 
    Ptr CookieManager ->                    -- _obj : TInterface "WebKit2" "CookieManager"
    CString ->                              -- filename : TBasicType TUTF8
    CUInt ->                                -- storage : TInterface "WebKit2" "CookiePersistentStorage"
    IO ()


cookieManagerSetPersistentStorage ::
    (MonadIO m, CookieManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- filename
    CookiePersistentStorage ->              -- storage
    m ()
cookieManagerSetPersistentStorage _obj filename storage = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filename' <- textToCString filename
    let storage' = (fromIntegral . fromEnum) storage
    webkit_cookie_manager_set_persistent_storage _obj' filename' storage'
    touchManagedPtr _obj
    freeMem filename'
    return ()

-- signal CookieManager::changed
type CookieManagerChangedCallback =
    IO ()

noCookieManagerChangedCallback :: Maybe CookieManagerChangedCallback
noCookieManagerChangedCallback = Nothing

type CookieManagerChangedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkCookieManagerChangedCallback :: CookieManagerChangedCallbackC -> IO (FunPtr CookieManagerChangedCallbackC)

cookieManagerChangedClosure :: CookieManagerChangedCallback -> IO Closure
cookieManagerChangedClosure cb = newCClosure =<< mkCookieManagerChangedCallback wrapped
    where wrapped = cookieManagerChangedCallbackWrapper cb

cookieManagerChangedCallbackWrapper ::
    CookieManagerChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
cookieManagerChangedCallbackWrapper _cb _ _ = do
    _cb 

onCookieManagerChanged :: (GObject a, MonadIO m) => a -> CookieManagerChangedCallback -> m SignalHandlerId
onCookieManagerChanged obj cb = liftIO $ connectCookieManagerChanged obj cb SignalConnectBefore
afterCookieManagerChanged :: (GObject a, MonadIO m) => a -> CookieManagerChangedCallback -> m SignalHandlerId
afterCookieManagerChanged obj cb = connectCookieManagerChanged obj cb SignalConnectAfter

connectCookieManagerChanged :: (GObject a, MonadIO m) =>
                               a -> CookieManagerChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectCookieManagerChanged obj cb after = liftIO $ do
    cb' <- mkCookieManagerChangedCallback (cookieManagerChangedCallbackWrapper cb)
    connectSignalFunPtr obj "changed" cb' after

-- Enum CookiePersistentStorage

data CookiePersistentStorage = 
      CookiePersistentStorageText
    | CookiePersistentStorageSqlite
    | AnotherCookiePersistentStorage Int
    deriving (Show, Eq)

instance Enum CookiePersistentStorage where
    fromEnum CookiePersistentStorageText = 0
    fromEnum CookiePersistentStorageSqlite = 1
    fromEnum (AnotherCookiePersistentStorage k) = k

    toEnum 0 = CookiePersistentStorageText
    toEnum 1 = CookiePersistentStorageSqlite
    toEnum k = AnotherCookiePersistentStorage k

foreign import ccall "webkit_cookie_persistent_storage_get_type" c_webkit_cookie_persistent_storage_get_type :: 
    IO GType

instance BoxedEnum CookiePersistentStorage where
    boxedEnumType _ = c_webkit_cookie_persistent_storage_get_type

-- struct Credential
newtype Credential = Credential (ForeignPtr Credential)
noCredential :: Maybe Credential
noCredential = Nothing

foreign import ccall "webkit_credential_get_type" c_webkit_credential_get_type :: 
    IO GType

instance BoxedObject Credential where
    boxedType _ = c_webkit_credential_get_type

-- method Credential::new
-- method type : Constructor
-- Args : [Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "persistence", argType = TInterface "WebKit2" "CredentialPersistence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "persistence", argType = TInterface "WebKit2" "CredentialPersistence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "Credential"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_credential_new" webkit_credential_new :: 
    CString ->                              -- username : TBasicType TUTF8
    CString ->                              -- password : TBasicType TUTF8
    CUInt ->                                -- persistence : TInterface "WebKit2" "CredentialPersistence"
    IO (Ptr Credential)


credentialNew ::
    (MonadIO m) =>
    T.Text ->                               -- username
    T.Text ->                               -- password
    CredentialPersistence ->                -- persistence
    m Credential
credentialNew username password persistence = liftIO $ do
    username' <- textToCString username
    password' <- textToCString password
    let persistence' = (fromIntegral . fromEnum) persistence
    result <- webkit_credential_new username' password' persistence'
    checkUnexpectedReturnNULL "webkit_credential_new" result
    result' <- (wrapBoxed Credential) result
    freeMem username'
    freeMem password'
    return result'

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

foreign import ccall "webkit_credential_copy" webkit_credential_copy :: 
    Ptr Credential ->                       -- _obj : TInterface "WebKit2" "Credential"
    IO (Ptr Credential)


credentialCopy ::
    (MonadIO m) =>
    Credential ->                           -- _obj
    m Credential
credentialCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_credential_copy _obj'
    checkUnexpectedReturnNULL "webkit_credential_copy" result
    result' <- (wrapBoxed Credential) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_credential_free" webkit_credential_free :: 
    Ptr Credential ->                       -- _obj : TInterface "WebKit2" "Credential"
    IO ()


credentialFree ::
    (MonadIO m) =>
    Credential ->                           -- _obj
    m ()
credentialFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    webkit_credential_free _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_credential_get_password" webkit_credential_get_password :: 
    Ptr Credential ->                       -- _obj : TInterface "WebKit2" "Credential"
    IO CString


credentialGetPassword ::
    (MonadIO m) =>
    Credential ->                           -- _obj
    m T.Text
credentialGetPassword _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_credential_get_password _obj'
    checkUnexpectedReturnNULL "webkit_credential_get_password" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Credential::get_persistence
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Credential", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Credential", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "CredentialPersistence"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_credential_get_persistence" webkit_credential_get_persistence :: 
    Ptr Credential ->                       -- _obj : TInterface "WebKit2" "Credential"
    IO CUInt


credentialGetPersistence ::
    (MonadIO m) =>
    Credential ->                           -- _obj
    m CredentialPersistence
credentialGetPersistence _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_credential_get_persistence _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_credential_get_username" webkit_credential_get_username :: 
    Ptr Credential ->                       -- _obj : TInterface "WebKit2" "Credential"
    IO CString


credentialGetUsername ::
    (MonadIO m) =>
    Credential ->                           -- _obj
    m T.Text
credentialGetUsername _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_credential_get_username _obj'
    checkUnexpectedReturnNULL "webkit_credential_get_username" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_credential_has_password" webkit_credential_has_password :: 
    Ptr Credential ->                       -- _obj : TInterface "WebKit2" "Credential"
    IO CInt


credentialHasPassword ::
    (MonadIO m) =>
    Credential ->                           -- _obj
    m Bool
credentialHasPassword _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_credential_has_password _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- Enum CredentialPersistence

data CredentialPersistence = 
      CredentialPersistenceNone
    | CredentialPersistenceForSession
    | CredentialPersistencePermanent
    | AnotherCredentialPersistence Int
    deriving (Show, Eq)

instance Enum CredentialPersistence where
    fromEnum CredentialPersistenceNone = 0
    fromEnum CredentialPersistenceForSession = 1
    fromEnum CredentialPersistencePermanent = 2
    fromEnum (AnotherCredentialPersistence k) = k

    toEnum 0 = CredentialPersistenceNone
    toEnum 1 = CredentialPersistenceForSession
    toEnum 2 = CredentialPersistencePermanent
    toEnum k = AnotherCredentialPersistence k

foreign import ccall "webkit_credential_persistence_get_type" c_webkit_credential_persistence_get_type :: 
    IO GType

instance BoxedEnum CredentialPersistence where
    boxedEnumType _ = c_webkit_credential_persistence_get_type

-- object Download 
newtype Download = Download (ForeignPtr Download)
noDownload :: Maybe Download
noDownload = Nothing

foreign import ccall "webkit_download_get_type"
    c_webkit_download_get_type :: IO GType

type instance ParentTypes Download = '[GObject.Object]

instance GObject Download where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_download_get_type
    

class GObject o => DownloadK o
instance (GObject o, IsDescendantOf Download o) => DownloadK o

toDownload :: DownloadK o => o -> IO Download
toDownload = unsafeCastTo Download

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

foreign import ccall "webkit_download_cancel" webkit_download_cancel :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO ()


downloadCancel ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m ()
downloadCancel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_download_cancel _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_download_get_allow_overwrite" webkit_download_get_allow_overwrite :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO CInt


downloadGetAllowOverwrite ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m Bool
downloadGetAllowOverwrite _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_allow_overwrite _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_download_get_destination" webkit_download_get_destination :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO CString


downloadGetDestination ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m T.Text
downloadGetDestination _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_destination _obj'
    checkUnexpectedReturnNULL "webkit_download_get_destination" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_download_get_elapsed_time" webkit_download_get_elapsed_time :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO CDouble


downloadGetElapsedTime ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m Double
downloadGetElapsedTime _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_elapsed_time _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_download_get_estimated_progress" webkit_download_get_estimated_progress :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO CDouble


downloadGetEstimatedProgress ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m Double
downloadGetEstimatedProgress _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_estimated_progress _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_download_get_received_data_length" webkit_download_get_received_data_length :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO Word64


downloadGetReceivedDataLength ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m Word64
downloadGetReceivedDataLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_received_data_length _obj'
    touchManagedPtr _obj
    return result

-- method Download::get_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Download", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Download", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIRequest"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_download_get_request" webkit_download_get_request :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO (Ptr URIRequest)


downloadGetRequest ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m URIRequest
downloadGetRequest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_request _obj'
    checkUnexpectedReturnNULL "webkit_download_get_request" result
    result' <- (newObject URIRequest) result
    touchManagedPtr _obj
    return result'

-- method Download::get_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Download", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Download", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIResponse"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_download_get_response" webkit_download_get_response :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO (Ptr URIResponse)


downloadGetResponse ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m URIResponse
downloadGetResponse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_response _obj'
    checkUnexpectedReturnNULL "webkit_download_get_response" result
    result' <- (newObject URIResponse) result
    touchManagedPtr _obj
    return result'

-- method Download::get_web_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Download", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Download", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_download_get_web_view" webkit_download_get_web_view :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    IO (Ptr WebView)


downloadGetWebView ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    m WebView
downloadGetWebView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_download_get_web_view _obj'
    checkUnexpectedReturnNULL "webkit_download_get_web_view" result
    result' <- (newObject WebView) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_download_set_allow_overwrite" webkit_download_set_allow_overwrite :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    CInt ->                                 -- allowed : TBasicType TBoolean
    IO ()


downloadSetAllowOverwrite ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- allowed
    m ()
downloadSetAllowOverwrite _obj allowed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let allowed' = (fromIntegral . fromEnum) allowed
    webkit_download_set_allow_overwrite _obj' allowed'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_download_set_destination" webkit_download_set_destination :: 
    Ptr Download ->                         -- _obj : TInterface "WebKit2" "Download"
    CString ->                              -- uri : TBasicType TUTF8
    IO ()


downloadSetDestination ::
    (MonadIO m, DownloadK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
downloadSetDestination _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    webkit_download_set_destination _obj' uri'
    touchManagedPtr _obj
    freeMem uri'
    return ()

-- signal Download::created-destination
type DownloadCreatedDestinationCallback =
    T.Text ->
    IO ()

noDownloadCreatedDestinationCallback :: Maybe DownloadCreatedDestinationCallback
noDownloadCreatedDestinationCallback = Nothing

type DownloadCreatedDestinationCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDownloadCreatedDestinationCallback :: DownloadCreatedDestinationCallbackC -> IO (FunPtr DownloadCreatedDestinationCallbackC)

downloadCreatedDestinationClosure :: DownloadCreatedDestinationCallback -> IO Closure
downloadCreatedDestinationClosure cb = newCClosure =<< mkDownloadCreatedDestinationCallback wrapped
    where wrapped = downloadCreatedDestinationCallbackWrapper cb

downloadCreatedDestinationCallbackWrapper ::
    DownloadCreatedDestinationCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO ()
downloadCreatedDestinationCallbackWrapper _cb _ destination _ = do
    destination' <- cstringToText destination
    _cb  destination'

onDownloadCreatedDestination :: (GObject a, MonadIO m) => a -> DownloadCreatedDestinationCallback -> m SignalHandlerId
onDownloadCreatedDestination obj cb = liftIO $ connectDownloadCreatedDestination obj cb SignalConnectBefore
afterDownloadCreatedDestination :: (GObject a, MonadIO m) => a -> DownloadCreatedDestinationCallback -> m SignalHandlerId
afterDownloadCreatedDestination obj cb = connectDownloadCreatedDestination obj cb SignalConnectAfter

connectDownloadCreatedDestination :: (GObject a, MonadIO m) =>
                                     a -> DownloadCreatedDestinationCallback -> SignalConnectMode -> m SignalHandlerId
connectDownloadCreatedDestination obj cb after = liftIO $ do
    cb' <- mkDownloadCreatedDestinationCallback (downloadCreatedDestinationCallbackWrapper cb)
    connectSignalFunPtr obj "created-destination" cb' after

-- signal Download::decide-destination
type DownloadDecideDestinationCallback =
    T.Text ->
    IO Bool

noDownloadDecideDestinationCallback :: Maybe DownloadDecideDestinationCallback
noDownloadDecideDestinationCallback = Nothing

type DownloadDecideDestinationCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkDownloadDecideDestinationCallback :: DownloadDecideDestinationCallbackC -> IO (FunPtr DownloadDecideDestinationCallbackC)

downloadDecideDestinationClosure :: DownloadDecideDestinationCallback -> IO Closure
downloadDecideDestinationClosure cb = newCClosure =<< mkDownloadDecideDestinationCallback wrapped
    where wrapped = downloadDecideDestinationCallbackWrapper cb

downloadDecideDestinationCallbackWrapper ::
    DownloadDecideDestinationCallback ->
    Ptr () ->
    CString ->
    Ptr () ->
    IO CInt
downloadDecideDestinationCallbackWrapper _cb _ suggested_filename _ = do
    suggested_filename' <- cstringToText suggested_filename
    result <- _cb  suggested_filename'
    let result' = (fromIntegral . fromEnum) result
    return result'

onDownloadDecideDestination :: (GObject a, MonadIO m) => a -> DownloadDecideDestinationCallback -> m SignalHandlerId
onDownloadDecideDestination obj cb = liftIO $ connectDownloadDecideDestination obj cb SignalConnectBefore
afterDownloadDecideDestination :: (GObject a, MonadIO m) => a -> DownloadDecideDestinationCallback -> m SignalHandlerId
afterDownloadDecideDestination obj cb = connectDownloadDecideDestination obj cb SignalConnectAfter

connectDownloadDecideDestination :: (GObject a, MonadIO m) =>
                                    a -> DownloadDecideDestinationCallback -> SignalConnectMode -> m SignalHandlerId
connectDownloadDecideDestination obj cb after = liftIO $ do
    cb' <- mkDownloadDecideDestinationCallback (downloadDecideDestinationCallbackWrapper cb)
    connectSignalFunPtr obj "decide-destination" cb' after

-- signal Download::failed
type DownloadFailedCallback =
    Ptr () ->
    IO ()

noDownloadFailedCallback :: Maybe DownloadFailedCallback
noDownloadFailedCallback = Nothing

type DownloadFailedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDownloadFailedCallback :: DownloadFailedCallbackC -> IO (FunPtr DownloadFailedCallbackC)

downloadFailedClosure :: DownloadFailedCallback -> IO Closure
downloadFailedClosure cb = newCClosure =<< mkDownloadFailedCallback wrapped
    where wrapped = downloadFailedCallbackWrapper cb

downloadFailedCallbackWrapper ::
    DownloadFailedCallback ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO ()
downloadFailedCallbackWrapper _cb _ error_ _ = do
    _cb  error_

onDownloadFailed :: (GObject a, MonadIO m) => a -> DownloadFailedCallback -> m SignalHandlerId
onDownloadFailed obj cb = liftIO $ connectDownloadFailed obj cb SignalConnectBefore
afterDownloadFailed :: (GObject a, MonadIO m) => a -> DownloadFailedCallback -> m SignalHandlerId
afterDownloadFailed obj cb = connectDownloadFailed obj cb SignalConnectAfter

connectDownloadFailed :: (GObject a, MonadIO m) =>
                         a -> DownloadFailedCallback -> SignalConnectMode -> m SignalHandlerId
connectDownloadFailed obj cb after = liftIO $ do
    cb' <- mkDownloadFailedCallback (downloadFailedCallbackWrapper cb)
    connectSignalFunPtr obj "failed" cb' after

-- signal Download::finished
type DownloadFinishedCallback =
    IO ()

noDownloadFinishedCallback :: Maybe DownloadFinishedCallback
noDownloadFinishedCallback = Nothing

type DownloadFinishedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDownloadFinishedCallback :: DownloadFinishedCallbackC -> IO (FunPtr DownloadFinishedCallbackC)

downloadFinishedClosure :: DownloadFinishedCallback -> IO Closure
downloadFinishedClosure cb = newCClosure =<< mkDownloadFinishedCallback wrapped
    where wrapped = downloadFinishedCallbackWrapper cb

downloadFinishedCallbackWrapper ::
    DownloadFinishedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
downloadFinishedCallbackWrapper _cb _ _ = do
    _cb 

onDownloadFinished :: (GObject a, MonadIO m) => a -> DownloadFinishedCallback -> m SignalHandlerId
onDownloadFinished obj cb = liftIO $ connectDownloadFinished obj cb SignalConnectBefore
afterDownloadFinished :: (GObject a, MonadIO m) => a -> DownloadFinishedCallback -> m SignalHandlerId
afterDownloadFinished obj cb = connectDownloadFinished obj cb SignalConnectAfter

connectDownloadFinished :: (GObject a, MonadIO m) =>
                           a -> DownloadFinishedCallback -> SignalConnectMode -> m SignalHandlerId
connectDownloadFinished obj cb after = liftIO $ do
    cb' <- mkDownloadFinishedCallback (downloadFinishedCallbackWrapper cb)
    connectSignalFunPtr obj "finished" cb' after

-- signal Download::received-data
type DownloadReceivedDataCallback =
    Word64 ->
    IO ()

noDownloadReceivedDataCallback :: Maybe DownloadReceivedDataCallback
noDownloadReceivedDataCallback = Nothing

type DownloadReceivedDataCallbackC =
    Ptr () ->                               -- object
    Word64 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkDownloadReceivedDataCallback :: DownloadReceivedDataCallbackC -> IO (FunPtr DownloadReceivedDataCallbackC)

downloadReceivedDataClosure :: DownloadReceivedDataCallback -> IO Closure
downloadReceivedDataClosure cb = newCClosure =<< mkDownloadReceivedDataCallback wrapped
    where wrapped = downloadReceivedDataCallbackWrapper cb

downloadReceivedDataCallbackWrapper ::
    DownloadReceivedDataCallback ->
    Ptr () ->
    Word64 ->
    Ptr () ->
    IO ()
downloadReceivedDataCallbackWrapper _cb _ data_length _ = do
    _cb  data_length

onDownloadReceivedData :: (GObject a, MonadIO m) => a -> DownloadReceivedDataCallback -> m SignalHandlerId
onDownloadReceivedData obj cb = liftIO $ connectDownloadReceivedData obj cb SignalConnectBefore
afterDownloadReceivedData :: (GObject a, MonadIO m) => a -> DownloadReceivedDataCallback -> m SignalHandlerId
afterDownloadReceivedData obj cb = connectDownloadReceivedData obj cb SignalConnectAfter

connectDownloadReceivedData :: (GObject a, MonadIO m) =>
                               a -> DownloadReceivedDataCallback -> SignalConnectMode -> m SignalHandlerId
connectDownloadReceivedData obj cb after = liftIO $ do
    cb' <- mkDownloadReceivedDataCallback (downloadReceivedDataCallbackWrapper cb)
    connectSignalFunPtr obj "received-data" cb' after

-- Enum DownloadError

data DownloadError = 
      DownloadErrorNetwork
    | DownloadErrorCancelledByUser
    | DownloadErrorDestination
    | AnotherDownloadError Int
    deriving (Show, Eq)

instance Enum DownloadError where
    fromEnum DownloadErrorNetwork = 499
    fromEnum DownloadErrorCancelledByUser = 400
    fromEnum DownloadErrorDestination = 401
    fromEnum (AnotherDownloadError k) = k

    toEnum 400 = DownloadErrorCancelledByUser
    toEnum 401 = DownloadErrorDestination
    toEnum 499 = DownloadErrorNetwork
    toEnum k = AnotherDownloadError k

instance GErrorClass DownloadError where
    gerrorClassDomain _ = "WebKitDownloadError"

catchDownloadError ::
    IO a ->
    (DownloadError -> GErrorMessage -> IO a) ->
    IO a
catchDownloadError = catchGErrorJustDomain

handleDownloadError ::
    (DownloadError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleDownloadError = handleGErrorJustDomain

foreign import ccall "webkit_download_error_get_type" c_webkit_download_error_get_type :: 
    IO GType

instance BoxedEnum DownloadError where
    boxedEnumType _ = c_webkit_download_error_get_type

-- object FaviconDatabase 
newtype FaviconDatabase = FaviconDatabase (ForeignPtr FaviconDatabase)
noFaviconDatabase :: Maybe FaviconDatabase
noFaviconDatabase = Nothing

foreign import ccall "webkit_favicon_database_get_type"
    c_webkit_favicon_database_get_type :: IO GType

type instance ParentTypes FaviconDatabase = '[GObject.Object]

instance GObject FaviconDatabase where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_favicon_database_get_type
    

class GObject o => FaviconDatabaseK o
instance (GObject o, IsDescendantOf FaviconDatabase o) => FaviconDatabaseK o

toFaviconDatabase :: FaviconDatabaseK o => o -> IO FaviconDatabase
toFaviconDatabase = unsafeCastTo FaviconDatabase

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

foreign import ccall "webkit_favicon_database_clear" webkit_favicon_database_clear :: 
    Ptr FaviconDatabase ->                  -- _obj : TInterface "WebKit2" "FaviconDatabase"
    IO ()


faviconDatabaseClear ::
    (MonadIO m, FaviconDatabaseK a) =>
    a ->                                    -- _obj
    m ()
faviconDatabaseClear _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_favicon_database_clear _obj'
    touchManagedPtr _obj
    return ()

-- method FaviconDatabase::get_favicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FaviconDatabase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FaviconDatabase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "page_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_favicon_database_get_favicon" webkit_favicon_database_get_favicon :: 
    Ptr FaviconDatabase ->                  -- _obj : TInterface "WebKit2" "FaviconDatabase"
    CString ->                              -- page_uri : TBasicType TUTF8
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


faviconDatabaseGetFavicon ::
    (MonadIO m, FaviconDatabaseK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- page_uri
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
faviconDatabaseGetFavicon _obj page_uri cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    page_uri' <- textToCString page_uri
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_favicon_database_get_favicon _obj' page_uri' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    freeMem page_uri'
    return ()

-- method FaviconDatabase::get_favicon_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FaviconDatabase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FaviconDatabase", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : True
-- Skip return : False

foreign import ccall "webkit_favicon_database_get_favicon_finish" webkit_favicon_database_get_favicon_finish :: 
    Ptr FaviconDatabase ->                  -- _obj : TInterface "WebKit2" "FaviconDatabase"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Cairo.Surface)


faviconDatabaseGetFaviconFinish ::
    (MonadIO m, FaviconDatabaseK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m Cairo.Surface
faviconDatabaseGetFaviconFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_favicon_database_get_favicon_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_favicon_database_get_favicon_finish" result
        result' <- (wrapBoxed Cairo.Surface) result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

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

foreign import ccall "webkit_favicon_database_get_favicon_uri" webkit_favicon_database_get_favicon_uri :: 
    Ptr FaviconDatabase ->                  -- _obj : TInterface "WebKit2" "FaviconDatabase"
    CString ->                              -- page_uri : TBasicType TUTF8
    IO CString


faviconDatabaseGetFaviconUri ::
    (MonadIO m, FaviconDatabaseK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- page_uri
    m T.Text
faviconDatabaseGetFaviconUri _obj page_uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    page_uri' <- textToCString page_uri
    result <- webkit_favicon_database_get_favicon_uri _obj' page_uri'
    checkUnexpectedReturnNULL "webkit_favicon_database_get_favicon_uri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr _obj
    freeMem page_uri'
    return result'

-- signal FaviconDatabase::favicon-changed
type FaviconDatabaseFaviconChangedCallback =
    T.Text ->
    T.Text ->
    IO ()

noFaviconDatabaseFaviconChangedCallback :: Maybe FaviconDatabaseFaviconChangedCallback
noFaviconDatabaseFaviconChangedCallback = Nothing

type FaviconDatabaseFaviconChangedCallbackC =
    Ptr () ->                               -- object
    CString ->
    CString ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFaviconDatabaseFaviconChangedCallback :: FaviconDatabaseFaviconChangedCallbackC -> IO (FunPtr FaviconDatabaseFaviconChangedCallbackC)

faviconDatabaseFaviconChangedClosure :: FaviconDatabaseFaviconChangedCallback -> IO Closure
faviconDatabaseFaviconChangedClosure cb = newCClosure =<< mkFaviconDatabaseFaviconChangedCallback wrapped
    where wrapped = faviconDatabaseFaviconChangedCallbackWrapper cb

faviconDatabaseFaviconChangedCallbackWrapper ::
    FaviconDatabaseFaviconChangedCallback ->
    Ptr () ->
    CString ->
    CString ->
    Ptr () ->
    IO ()
faviconDatabaseFaviconChangedCallbackWrapper _cb _ page_uri favicon_uri _ = do
    page_uri' <- cstringToText page_uri
    favicon_uri' <- cstringToText favicon_uri
    _cb  page_uri' favicon_uri'

onFaviconDatabaseFaviconChanged :: (GObject a, MonadIO m) => a -> FaviconDatabaseFaviconChangedCallback -> m SignalHandlerId
onFaviconDatabaseFaviconChanged obj cb = liftIO $ connectFaviconDatabaseFaviconChanged obj cb SignalConnectBefore
afterFaviconDatabaseFaviconChanged :: (GObject a, MonadIO m) => a -> FaviconDatabaseFaviconChangedCallback -> m SignalHandlerId
afterFaviconDatabaseFaviconChanged obj cb = connectFaviconDatabaseFaviconChanged obj cb SignalConnectAfter

connectFaviconDatabaseFaviconChanged :: (GObject a, MonadIO m) =>
                                        a -> FaviconDatabaseFaviconChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectFaviconDatabaseFaviconChanged obj cb after = liftIO $ do
    cb' <- mkFaviconDatabaseFaviconChangedCallback (faviconDatabaseFaviconChangedCallbackWrapper cb)
    connectSignalFunPtr obj "favicon-changed" cb' after

-- Enum FaviconDatabaseError

data FaviconDatabaseError = 
      FaviconDatabaseErrorNotInitialized
    | FaviconDatabaseErrorFaviconNotFound
    | FaviconDatabaseErrorFaviconUnknown
    | AnotherFaviconDatabaseError Int
    deriving (Show, Eq)

instance Enum FaviconDatabaseError where
    fromEnum FaviconDatabaseErrorNotInitialized = 0
    fromEnum FaviconDatabaseErrorFaviconNotFound = 1
    fromEnum FaviconDatabaseErrorFaviconUnknown = 2
    fromEnum (AnotherFaviconDatabaseError k) = k

    toEnum 0 = FaviconDatabaseErrorNotInitialized
    toEnum 1 = FaviconDatabaseErrorFaviconNotFound
    toEnum 2 = FaviconDatabaseErrorFaviconUnknown
    toEnum k = AnotherFaviconDatabaseError k

instance GErrorClass FaviconDatabaseError where
    gerrorClassDomain _ = "WebKitFaviconDatabaseError"

catchFaviconDatabaseError ::
    IO a ->
    (FaviconDatabaseError -> GErrorMessage -> IO a) ->
    IO a
catchFaviconDatabaseError = catchGErrorJustDomain

handleFaviconDatabaseError ::
    (FaviconDatabaseError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleFaviconDatabaseError = handleGErrorJustDomain

foreign import ccall "webkit_favicon_database_error_get_type" c_webkit_favicon_database_error_get_type :: 
    IO GType

instance BoxedEnum FaviconDatabaseError where
    boxedEnumType _ = c_webkit_favicon_database_error_get_type

-- object FileChooserRequest 
newtype FileChooserRequest = FileChooserRequest (ForeignPtr FileChooserRequest)
noFileChooserRequest :: Maybe FileChooserRequest
noFileChooserRequest = Nothing

foreign import ccall "webkit_file_chooser_request_get_type"
    c_webkit_file_chooser_request_get_type :: IO GType

type instance ParentTypes FileChooserRequest = '[GObject.Object]

instance GObject FileChooserRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_file_chooser_request_get_type
    

class GObject o => FileChooserRequestK o
instance (GObject o, IsDescendantOf FileChooserRequest o) => FileChooserRequestK o

toFileChooserRequest :: FileChooserRequestK o => o -> IO FileChooserRequest
toFileChooserRequest = unsafeCastTo FileChooserRequest

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

foreign import ccall "webkit_file_chooser_request_cancel" webkit_file_chooser_request_cancel :: 
    Ptr FileChooserRequest ->               -- _obj : TInterface "WebKit2" "FileChooserRequest"
    IO ()


fileChooserRequestCancel ::
    (MonadIO m, FileChooserRequestK a) =>
    a ->                                    -- _obj
    m ()
fileChooserRequestCancel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_file_chooser_request_cancel _obj'
    touchManagedPtr _obj
    return ()

-- method FileChooserRequest::get_mime_types
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_file_chooser_request_get_mime_types" webkit_file_chooser_request_get_mime_types :: 
    Ptr FileChooserRequest ->               -- _obj : TInterface "WebKit2" "FileChooserRequest"
    IO (Ptr CString)


fileChooserRequestGetMimeTypes ::
    (MonadIO m, FileChooserRequestK a) =>
    a ->                                    -- _obj
    m [T.Text]
fileChooserRequestGetMimeTypes _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_file_chooser_request_get_mime_types _obj'
    checkUnexpectedReturnNULL "webkit_file_chooser_request_get_mime_types" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

-- method FileChooserRequest::get_mime_types_filter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "FileFilter"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_file_chooser_request_get_mime_types_filter" webkit_file_chooser_request_get_mime_types_filter :: 
    Ptr FileChooserRequest ->               -- _obj : TInterface "WebKit2" "FileChooserRequest"
    IO (Ptr Gtk.FileFilter)


fileChooserRequestGetMimeTypesFilter ::
    (MonadIO m, FileChooserRequestK a) =>
    a ->                                    -- _obj
    m Gtk.FileFilter
fileChooserRequestGetMimeTypesFilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_file_chooser_request_get_mime_types_filter _obj'
    checkUnexpectedReturnNULL "webkit_file_chooser_request_get_mime_types_filter" result
    result' <- (newObject Gtk.FileFilter) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_file_chooser_request_get_select_multiple" webkit_file_chooser_request_get_select_multiple :: 
    Ptr FileChooserRequest ->               -- _obj : TInterface "WebKit2" "FileChooserRequest"
    IO CInt


fileChooserRequestGetSelectMultiple ::
    (MonadIO m, FileChooserRequestK a) =>
    a ->                                    -- _obj
    m Bool
fileChooserRequestGetSelectMultiple _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_file_chooser_request_get_select_multiple _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method FileChooserRequest::get_selected_files
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_file_chooser_request_get_selected_files" webkit_file_chooser_request_get_selected_files :: 
    Ptr FileChooserRequest ->               -- _obj : TInterface "WebKit2" "FileChooserRequest"
    IO (Ptr CString)


fileChooserRequestGetSelectedFiles ::
    (MonadIO m, FileChooserRequestK a) =>
    a ->                                    -- _obj
    m [T.Text]
fileChooserRequestGetSelectedFiles _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_file_chooser_request_get_selected_files _obj'
    checkUnexpectedReturnNULL "webkit_file_chooser_request_get_selected_files" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

-- method FileChooserRequest::select_files
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "files", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FileChooserRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "files", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_file_chooser_request_select_files" webkit_file_chooser_request_select_files :: 
    Ptr FileChooserRequest ->               -- _obj : TInterface "WebKit2" "FileChooserRequest"
    Ptr CString ->                          -- files : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


fileChooserRequestSelectFiles ::
    (MonadIO m, FileChooserRequestK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- files
    m ()
fileChooserRequestSelectFiles _obj files = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    files' <- packZeroTerminatedUTF8CArray files
    webkit_file_chooser_request_select_files _obj' files'
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem files'
    freeMem files'
    return ()

-- object FindController 
newtype FindController = FindController (ForeignPtr FindController)
noFindController :: Maybe FindController
noFindController = Nothing

foreign import ccall "webkit_find_controller_get_type"
    c_webkit_find_controller_get_type :: IO GType

type instance ParentTypes FindController = '[GObject.Object]

instance GObject FindController where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_find_controller_get_type
    

class GObject o => FindControllerK o
instance (GObject o, IsDescendantOf FindController o) => FindControllerK o

toFindController :: FindControllerK o => o -> IO FindController
toFindController = unsafeCastTo FindController

-- method FindController::count_matches
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FindController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "find_options", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_match_count", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FindController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "find_options", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_match_count", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_find_controller_count_matches" webkit_find_controller_count_matches :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    CString ->                              -- search_text : TBasicType TUTF8
    Word32 ->                               -- find_options : TBasicType TUInt32
    Word32 ->                               -- max_match_count : TBasicType TUInt32
    IO ()


findControllerCountMatches ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- search_text
    Word32 ->                               -- find_options
    Word32 ->                               -- max_match_count
    m ()
findControllerCountMatches _obj search_text find_options max_match_count = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    search_text' <- textToCString search_text
    webkit_find_controller_count_matches _obj' search_text' find_options max_match_count
    touchManagedPtr _obj
    freeMem search_text'
    return ()

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

foreign import ccall "webkit_find_controller_get_max_match_count" webkit_find_controller_get_max_match_count :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO Word32


findControllerGetMaxMatchCount ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m Word32
findControllerGetMaxMatchCount _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_find_controller_get_max_match_count _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_find_controller_get_options" webkit_find_controller_get_options :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO Word32


findControllerGetOptions ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m Word32
findControllerGetOptions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_find_controller_get_options _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_find_controller_get_search_text" webkit_find_controller_get_search_text :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO CString


findControllerGetSearchText ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m T.Text
findControllerGetSearchText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_find_controller_get_search_text _obj'
    checkUnexpectedReturnNULL "webkit_find_controller_get_search_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method FindController::get_web_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FindController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FindController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_find_controller_get_web_view" webkit_find_controller_get_web_view :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO (Ptr WebView)


findControllerGetWebView ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m WebView
findControllerGetWebView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_find_controller_get_web_view _obj'
    checkUnexpectedReturnNULL "webkit_find_controller_get_web_view" result
    result' <- (newObject WebView) result
    touchManagedPtr _obj
    return result'

-- method FindController::search
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FindController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "find_options", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_match_count", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "FindController", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "search_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "find_options", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "max_match_count", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_find_controller_search" webkit_find_controller_search :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    CString ->                              -- search_text : TBasicType TUTF8
    Word32 ->                               -- find_options : TBasicType TUInt32
    Word32 ->                               -- max_match_count : TBasicType TUInt32
    IO ()


findControllerSearch ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- search_text
    Word32 ->                               -- find_options
    Word32 ->                               -- max_match_count
    m ()
findControllerSearch _obj search_text find_options max_match_count = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    search_text' <- textToCString search_text
    webkit_find_controller_search _obj' search_text' find_options max_match_count
    touchManagedPtr _obj
    freeMem search_text'
    return ()

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

foreign import ccall "webkit_find_controller_search_finish" webkit_find_controller_search_finish :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO ()


findControllerSearchFinish ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m ()
findControllerSearchFinish _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_find_controller_search_finish _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_find_controller_search_next" webkit_find_controller_search_next :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO ()


findControllerSearchNext ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m ()
findControllerSearchNext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_find_controller_search_next _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_find_controller_search_previous" webkit_find_controller_search_previous :: 
    Ptr FindController ->                   -- _obj : TInterface "WebKit2" "FindController"
    IO ()


findControllerSearchPrevious ::
    (MonadIO m, FindControllerK a) =>
    a ->                                    -- _obj
    m ()
findControllerSearchPrevious _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_find_controller_search_previous _obj'
    touchManagedPtr _obj
    return ()

-- signal FindController::counted-matches
type FindControllerCountedMatchesCallback =
    Word32 ->
    IO ()

noFindControllerCountedMatchesCallback :: Maybe FindControllerCountedMatchesCallback
noFindControllerCountedMatchesCallback = Nothing

type FindControllerCountedMatchesCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFindControllerCountedMatchesCallback :: FindControllerCountedMatchesCallbackC -> IO (FunPtr FindControllerCountedMatchesCallbackC)

findControllerCountedMatchesClosure :: FindControllerCountedMatchesCallback -> IO Closure
findControllerCountedMatchesClosure cb = newCClosure =<< mkFindControllerCountedMatchesCallback wrapped
    where wrapped = findControllerCountedMatchesCallbackWrapper cb

findControllerCountedMatchesCallbackWrapper ::
    FindControllerCountedMatchesCallback ->
    Ptr () ->
    Word32 ->
    Ptr () ->
    IO ()
findControllerCountedMatchesCallbackWrapper _cb _ match_count _ = do
    _cb  match_count

onFindControllerCountedMatches :: (GObject a, MonadIO m) => a -> FindControllerCountedMatchesCallback -> m SignalHandlerId
onFindControllerCountedMatches obj cb = liftIO $ connectFindControllerCountedMatches obj cb SignalConnectBefore
afterFindControllerCountedMatches :: (GObject a, MonadIO m) => a -> FindControllerCountedMatchesCallback -> m SignalHandlerId
afterFindControllerCountedMatches obj cb = connectFindControllerCountedMatches obj cb SignalConnectAfter

connectFindControllerCountedMatches :: (GObject a, MonadIO m) =>
                                       a -> FindControllerCountedMatchesCallback -> SignalConnectMode -> m SignalHandlerId
connectFindControllerCountedMatches obj cb after = liftIO $ do
    cb' <- mkFindControllerCountedMatchesCallback (findControllerCountedMatchesCallbackWrapper cb)
    connectSignalFunPtr obj "counted-matches" cb' after

-- signal FindController::failed-to-find-text
type FindControllerFailedToFindTextCallback =
    IO ()

noFindControllerFailedToFindTextCallback :: Maybe FindControllerFailedToFindTextCallback
noFindControllerFailedToFindTextCallback = Nothing

type FindControllerFailedToFindTextCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFindControllerFailedToFindTextCallback :: FindControllerFailedToFindTextCallbackC -> IO (FunPtr FindControllerFailedToFindTextCallbackC)

findControllerFailedToFindTextClosure :: FindControllerFailedToFindTextCallback -> IO Closure
findControllerFailedToFindTextClosure cb = newCClosure =<< mkFindControllerFailedToFindTextCallback wrapped
    where wrapped = findControllerFailedToFindTextCallbackWrapper cb

findControllerFailedToFindTextCallbackWrapper ::
    FindControllerFailedToFindTextCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
findControllerFailedToFindTextCallbackWrapper _cb _ _ = do
    _cb 

onFindControllerFailedToFindText :: (GObject a, MonadIO m) => a -> FindControllerFailedToFindTextCallback -> m SignalHandlerId
onFindControllerFailedToFindText obj cb = liftIO $ connectFindControllerFailedToFindText obj cb SignalConnectBefore
afterFindControllerFailedToFindText :: (GObject a, MonadIO m) => a -> FindControllerFailedToFindTextCallback -> m SignalHandlerId
afterFindControllerFailedToFindText obj cb = connectFindControllerFailedToFindText obj cb SignalConnectAfter

connectFindControllerFailedToFindText :: (GObject a, MonadIO m) =>
                                         a -> FindControllerFailedToFindTextCallback -> SignalConnectMode -> m SignalHandlerId
connectFindControllerFailedToFindText obj cb after = liftIO $ do
    cb' <- mkFindControllerFailedToFindTextCallback (findControllerFailedToFindTextCallbackWrapper cb)
    connectSignalFunPtr obj "failed-to-find-text" cb' after

-- signal FindController::found-text
type FindControllerFoundTextCallback =
    Word32 ->
    IO ()

noFindControllerFoundTextCallback :: Maybe FindControllerFoundTextCallback
noFindControllerFoundTextCallback = Nothing

type FindControllerFoundTextCallbackC =
    Ptr () ->                               -- object
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkFindControllerFoundTextCallback :: FindControllerFoundTextCallbackC -> IO (FunPtr FindControllerFoundTextCallbackC)

findControllerFoundTextClosure :: FindControllerFoundTextCallback -> IO Closure
findControllerFoundTextClosure cb = newCClosure =<< mkFindControllerFoundTextCallback wrapped
    where wrapped = findControllerFoundTextCallbackWrapper cb

findControllerFoundTextCallbackWrapper ::
    FindControllerFoundTextCallback ->
    Ptr () ->
    Word32 ->
    Ptr () ->
    IO ()
findControllerFoundTextCallbackWrapper _cb _ match_count _ = do
    _cb  match_count

onFindControllerFoundText :: (GObject a, MonadIO m) => a -> FindControllerFoundTextCallback -> m SignalHandlerId
onFindControllerFoundText obj cb = liftIO $ connectFindControllerFoundText obj cb SignalConnectBefore
afterFindControllerFoundText :: (GObject a, MonadIO m) => a -> FindControllerFoundTextCallback -> m SignalHandlerId
afterFindControllerFoundText obj cb = connectFindControllerFoundText obj cb SignalConnectAfter

connectFindControllerFoundText :: (GObject a, MonadIO m) =>
                                  a -> FindControllerFoundTextCallback -> SignalConnectMode -> m SignalHandlerId
connectFindControllerFoundText obj cb after = liftIO $ do
    cb' <- mkFindControllerFoundTextCallback (findControllerFoundTextCallbackWrapper cb)
    connectSignalFunPtr obj "found-text" cb' after

-- Flags FindOptions

data FindOptions = 
      FindOptionsNone
    | FindOptionsCaseInsensitive
    | FindOptionsAtWordStarts
    | FindOptionsTreatMedialCapitalAsWordStart
    | FindOptionsBackwards
    | FindOptionsWrapAround
    | AnotherFindOptions Int
    deriving (Show, Eq)

instance Enum FindOptions where
    fromEnum FindOptionsNone = 0
    fromEnum FindOptionsCaseInsensitive = 1
    fromEnum FindOptionsAtWordStarts = 2
    fromEnum FindOptionsTreatMedialCapitalAsWordStart = 4
    fromEnum FindOptionsBackwards = 8
    fromEnum FindOptionsWrapAround = 16
    fromEnum (AnotherFindOptions k) = k

    toEnum 0 = FindOptionsNone
    toEnum 1 = FindOptionsCaseInsensitive
    toEnum 2 = FindOptionsAtWordStarts
    toEnum 4 = FindOptionsTreatMedialCapitalAsWordStart
    toEnum 8 = FindOptionsBackwards
    toEnum 16 = FindOptionsWrapAround
    toEnum k = AnotherFindOptions k

foreign import ccall "webkit_find_options_get_type" c_webkit_find_options_get_type :: 
    IO GType

instance BoxedEnum FindOptions where
    boxedEnumType _ = c_webkit_find_options_get_type

instance IsGFlag FindOptions

-- object FormSubmissionRequest 
newtype FormSubmissionRequest = FormSubmissionRequest (ForeignPtr FormSubmissionRequest)
noFormSubmissionRequest :: Maybe FormSubmissionRequest
noFormSubmissionRequest = Nothing

foreign import ccall "webkit_form_submission_request_get_type"
    c_webkit_form_submission_request_get_type :: IO GType

type instance ParentTypes FormSubmissionRequest = '[GObject.Object]

instance GObject FormSubmissionRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_form_submission_request_get_type
    

class GObject o => FormSubmissionRequestK o
instance (GObject o, IsDescendantOf FormSubmissionRequest o) => FormSubmissionRequestK o

toFormSubmissionRequest :: FormSubmissionRequestK o => o -> IO FormSubmissionRequest
toFormSubmissionRequest = unsafeCastTo FormSubmissionRequest

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

foreign import ccall "webkit_form_submission_request_get_text_fields" webkit_form_submission_request_get_text_fields :: 
    Ptr FormSubmissionRequest ->            -- _obj : TInterface "WebKit2" "FormSubmissionRequest"
    IO (Ptr (GHashTable (Ptr ()) (Ptr ())))


formSubmissionRequestGetTextFields ::
    (MonadIO m, FormSubmissionRequestK a) =>
    a ->                                    -- _obj
    m (Map.Map (Ptr ()) (Ptr ()))
formSubmissionRequestGetTextFields _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_form_submission_request_get_text_fields _obj'
    checkUnexpectedReturnNULL "webkit_form_submission_request_get_text_fields" result
    result' <- unpackGHashTable result
    let result'' = mapFirst ptrUnpackPtr result'
    let result''' = mapSecond ptrUnpackPtr result''
    let result'''' = Map.fromList result'''
    touchManagedPtr _obj
    return result''''

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

foreign import ccall "webkit_form_submission_request_submit" webkit_form_submission_request_submit :: 
    Ptr FormSubmissionRequest ->            -- _obj : TInterface "WebKit2" "FormSubmissionRequest"
    IO ()


formSubmissionRequestSubmit ::
    (MonadIO m, FormSubmissionRequestK a) =>
    a ->                                    -- _obj
    m ()
formSubmissionRequestSubmit _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_form_submission_request_submit _obj'
    touchManagedPtr _obj
    return ()

-- object GeolocationPermissionRequest 
newtype GeolocationPermissionRequest = GeolocationPermissionRequest (ForeignPtr GeolocationPermissionRequest)
noGeolocationPermissionRequest :: Maybe GeolocationPermissionRequest
noGeolocationPermissionRequest = Nothing

foreign import ccall "webkit_geolocation_permission_request_get_type"
    c_webkit_geolocation_permission_request_get_type :: IO GType

type instance ParentTypes GeolocationPermissionRequest = '[GObject.Object, PermissionRequest]

instance GObject GeolocationPermissionRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_geolocation_permission_request_get_type
    

class GObject o => GeolocationPermissionRequestK o
instance (GObject o, IsDescendantOf GeolocationPermissionRequest o) => GeolocationPermissionRequestK o

toGeolocationPermissionRequest :: GeolocationPermissionRequestK o => o -> IO GeolocationPermissionRequest
toGeolocationPermissionRequest = unsafeCastTo GeolocationPermissionRequest

-- object HitTestResult 
newtype HitTestResult = HitTestResult (ForeignPtr HitTestResult)
noHitTestResult :: Maybe HitTestResult
noHitTestResult = Nothing

foreign import ccall "webkit_hit_test_result_get_type"
    c_webkit_hit_test_result_get_type :: IO GType

type instance ParentTypes HitTestResult = '[GObject.Object]

instance GObject HitTestResult where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_hit_test_result_get_type
    

class GObject o => HitTestResultK o
instance (GObject o, IsDescendantOf HitTestResult o) => HitTestResultK o

toHitTestResult :: HitTestResultK o => o -> IO HitTestResult
toHitTestResult = unsafeCastTo HitTestResult

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

foreign import ccall "webkit_hit_test_result_context_is_editable" webkit_hit_test_result_context_is_editable :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CInt


hitTestResultContextIsEditable ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Bool
hitTestResultContextIsEditable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_context_is_editable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_context_is_image" webkit_hit_test_result_context_is_image :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CInt


hitTestResultContextIsImage ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Bool
hitTestResultContextIsImage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_context_is_image _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_context_is_link" webkit_hit_test_result_context_is_link :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CInt


hitTestResultContextIsLink ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Bool
hitTestResultContextIsLink _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_context_is_link _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_context_is_media" webkit_hit_test_result_context_is_media :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CInt


hitTestResultContextIsMedia ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Bool
hitTestResultContextIsMedia _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_context_is_media _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_context_is_scrollbar" webkit_hit_test_result_context_is_scrollbar :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CInt


hitTestResultContextIsScrollbar ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Bool
hitTestResultContextIsScrollbar _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_context_is_scrollbar _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_context_is_selection" webkit_hit_test_result_context_is_selection :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CInt


hitTestResultContextIsSelection ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Bool
hitTestResultContextIsSelection _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_context_is_selection _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_get_context" webkit_hit_test_result_get_context :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO Word32


hitTestResultGetContext ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m Word32
hitTestResultGetContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_get_context _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_hit_test_result_get_image_uri" webkit_hit_test_result_get_image_uri :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CString


hitTestResultGetImageUri ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m T.Text
hitTestResultGetImageUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_get_image_uri _obj'
    checkUnexpectedReturnNULL "webkit_hit_test_result_get_image_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_get_link_label" webkit_hit_test_result_get_link_label :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CString


hitTestResultGetLinkLabel ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m T.Text
hitTestResultGetLinkLabel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_get_link_label _obj'
    checkUnexpectedReturnNULL "webkit_hit_test_result_get_link_label" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_get_link_title" webkit_hit_test_result_get_link_title :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CString


hitTestResultGetLinkTitle ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m T.Text
hitTestResultGetLinkTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_get_link_title _obj'
    checkUnexpectedReturnNULL "webkit_hit_test_result_get_link_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_get_link_uri" webkit_hit_test_result_get_link_uri :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CString


hitTestResultGetLinkUri ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m T.Text
hitTestResultGetLinkUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_get_link_uri _obj'
    checkUnexpectedReturnNULL "webkit_hit_test_result_get_link_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_hit_test_result_get_media_uri" webkit_hit_test_result_get_media_uri :: 
    Ptr HitTestResult ->                    -- _obj : TInterface "WebKit2" "HitTestResult"
    IO CString


hitTestResultGetMediaUri ::
    (MonadIO m, HitTestResultK a) =>
    a ->                                    -- _obj
    m T.Text
hitTestResultGetMediaUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_hit_test_result_get_media_uri _obj'
    checkUnexpectedReturnNULL "webkit_hit_test_result_get_media_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- Flags HitTestResultContext

data HitTestResultContext = 
      HitTestResultContextDocument
    | HitTestResultContextLink
    | HitTestResultContextImage
    | HitTestResultContextMedia
    | HitTestResultContextEditable
    | HitTestResultContextScrollbar
    | HitTestResultContextSelection
    | AnotherHitTestResultContext Int
    deriving (Show, Eq)

instance Enum HitTestResultContext where
    fromEnum HitTestResultContextDocument = 2
    fromEnum HitTestResultContextLink = 4
    fromEnum HitTestResultContextImage = 8
    fromEnum HitTestResultContextMedia = 16
    fromEnum HitTestResultContextEditable = 32
    fromEnum HitTestResultContextScrollbar = 64
    fromEnum HitTestResultContextSelection = 128
    fromEnum (AnotherHitTestResultContext k) = k

    toEnum 2 = HitTestResultContextDocument
    toEnum 4 = HitTestResultContextLink
    toEnum 8 = HitTestResultContextImage
    toEnum 16 = HitTestResultContextMedia
    toEnum 32 = HitTestResultContextEditable
    toEnum 64 = HitTestResultContextScrollbar
    toEnum 128 = HitTestResultContextSelection
    toEnum k = AnotherHitTestResultContext k

foreign import ccall "webkit_hit_test_result_context_get_type" c_webkit_hit_test_result_context_get_type :: 
    IO GType

instance BoxedEnum HitTestResultContext where
    boxedEnumType _ = c_webkit_hit_test_result_context_get_type

instance IsGFlag HitTestResultContext

-- Enum InsecureContentEvent

data InsecureContentEvent = 
      InsecureContentEventRun
    | InsecureContentEventDisplayed
    | AnotherInsecureContentEvent Int
    deriving (Show, Eq)

instance Enum InsecureContentEvent where
    fromEnum InsecureContentEventRun = 0
    fromEnum InsecureContentEventDisplayed = 1
    fromEnum (AnotherInsecureContentEvent k) = k

    toEnum 0 = InsecureContentEventRun
    toEnum 1 = InsecureContentEventDisplayed
    toEnum k = AnotherInsecureContentEvent k

foreign import ccall "webkit_insecure_content_event_get_type" c_webkit_insecure_content_event_get_type :: 
    IO GType

instance BoxedEnum InsecureContentEvent where
    boxedEnumType _ = c_webkit_insecure_content_event_get_type

-- Enum JavascriptError

data JavascriptError = 
      JavascriptErrorFailed
    | AnotherJavascriptError Int
    deriving (Show, Eq)

instance Enum JavascriptError where
    fromEnum JavascriptErrorFailed = 699
    fromEnum (AnotherJavascriptError k) = k

    toEnum 699 = JavascriptErrorFailed
    toEnum k = AnotherJavascriptError k

instance GErrorClass JavascriptError where
    gerrorClassDomain _ = "WebKitJavascriptError"

catchJavascriptError ::
    IO a ->
    (JavascriptError -> GErrorMessage -> IO a) ->
    IO a
catchJavascriptError = catchGErrorJustDomain

handleJavascriptError ::
    (JavascriptError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleJavascriptError = handleGErrorJustDomain

foreign import ccall "webkit_javascript_error_get_type" c_webkit_javascript_error_get_type :: 
    IO GType

instance BoxedEnum JavascriptError where
    boxedEnumType _ = c_webkit_javascript_error_get_type

-- struct JavascriptResult
newtype JavascriptResult = JavascriptResult (ForeignPtr JavascriptResult)
noJavascriptResult :: Maybe JavascriptResult
noJavascriptResult = Nothing

foreign import ccall "webkit_javascript_result_get_type" c_webkit_javascript_result_get_type :: 
    IO GType

instance BoxedObject JavascriptResult where
    boxedType _ = c_webkit_javascript_result_get_type

-- method JavascriptResult::get_global_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "JavascriptResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "JavascriptResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "JavaScriptCore" "GlobalContext"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_javascript_result_get_global_context" webkit_javascript_result_get_global_context :: 
    Ptr JavascriptResult ->                 -- _obj : TInterface "WebKit2" "JavascriptResult"
    IO (Ptr JavaScriptCore.GlobalContext)


javascriptResultGetGlobalContext ::
    (MonadIO m) =>
    JavascriptResult ->                     -- _obj
    m JavaScriptCore.GlobalContext
javascriptResultGetGlobalContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_javascript_result_get_global_context _obj'
    checkUnexpectedReturnNULL "webkit_javascript_result_get_global_context" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> JavaScriptCore.GlobalContext <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

-- method JavascriptResult::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "JavascriptResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "JavascriptResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "JavaScriptCore" "Value"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_javascript_result_get_value" webkit_javascript_result_get_value :: 
    Ptr JavascriptResult ->                 -- _obj : TInterface "WebKit2" "JavascriptResult"
    IO (Ptr JavaScriptCore.Value)


javascriptResultGetValue ::
    (MonadIO m) =>
    JavascriptResult ->                     -- _obj
    m JavaScriptCore.Value
javascriptResultGetValue _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_javascript_result_get_value _obj'
    checkUnexpectedReturnNULL "webkit_javascript_result_get_value" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> JavaScriptCore.Value <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_javascript_result_ref" webkit_javascript_result_ref :: 
    Ptr JavascriptResult ->                 -- _obj : TInterface "WebKit2" "JavascriptResult"
    IO (Ptr JavascriptResult)


javascriptResultRef ::
    (MonadIO m) =>
    JavascriptResult ->                     -- _obj
    m JavascriptResult
javascriptResultRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_javascript_result_ref _obj'
    checkUnexpectedReturnNULL "webkit_javascript_result_ref" result
    result' <- (wrapBoxed JavascriptResult) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_javascript_result_unref" webkit_javascript_result_unref :: 
    Ptr JavascriptResult ->                 -- _obj : TInterface "WebKit2" "JavascriptResult"
    IO ()


javascriptResultUnref ::
    (MonadIO m) =>
    JavascriptResult ->                     -- _obj
    m ()
javascriptResultUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    webkit_javascript_result_unref _obj'
    touchManagedPtr _obj
    return ()

-- Enum LoadEvent

data LoadEvent = 
      LoadEventStarted
    | LoadEventRedirected
    | LoadEventCommitted
    | LoadEventFinished
    | AnotherLoadEvent Int
    deriving (Show, Eq)

instance Enum LoadEvent where
    fromEnum LoadEventStarted = 0
    fromEnum LoadEventRedirected = 1
    fromEnum LoadEventCommitted = 2
    fromEnum LoadEventFinished = 3
    fromEnum (AnotherLoadEvent k) = k

    toEnum 0 = LoadEventStarted
    toEnum 1 = LoadEventRedirected
    toEnum 2 = LoadEventCommitted
    toEnum 3 = LoadEventFinished
    toEnum k = AnotherLoadEvent k

foreign import ccall "webkit_load_event_get_type" c_webkit_load_event_get_type :: 
    IO GType

instance BoxedEnum LoadEvent where
    boxedEnumType _ = c_webkit_load_event_get_type

-- struct MimeInfo
newtype MimeInfo = MimeInfo (ForeignPtr MimeInfo)
noMimeInfo :: Maybe MimeInfo
noMimeInfo = Nothing

foreign import ccall "webkit_mime_info_get_type" c_webkit_mime_info_get_type :: 
    IO GType

instance BoxedObject MimeInfo where
    boxedType _ = c_webkit_mime_info_get_type

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

foreign import ccall "webkit_mime_info_get_description" webkit_mime_info_get_description :: 
    Ptr MimeInfo ->                         -- _obj : TInterface "WebKit2" "MimeInfo"
    IO CString


mimeInfoGetDescription ::
    (MonadIO m) =>
    MimeInfo ->                             -- _obj
    m T.Text
mimeInfoGetDescription _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_mime_info_get_description _obj'
    checkUnexpectedReturnNULL "webkit_mime_info_get_description" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method MimeInfo::get_extensions
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "MimeInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "MimeInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_mime_info_get_extensions" webkit_mime_info_get_extensions :: 
    Ptr MimeInfo ->                         -- _obj : TInterface "WebKit2" "MimeInfo"
    IO (Ptr CString)


mimeInfoGetExtensions ::
    (MonadIO m) =>
    MimeInfo ->                             -- _obj
    m [T.Text]
mimeInfoGetExtensions _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_mime_info_get_extensions _obj'
    checkUnexpectedReturnNULL "webkit_mime_info_get_extensions" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_mime_info_get_mime_type" webkit_mime_info_get_mime_type :: 
    Ptr MimeInfo ->                         -- _obj : TInterface "WebKit2" "MimeInfo"
    IO CString


mimeInfoGetMimeType ::
    (MonadIO m) =>
    MimeInfo ->                             -- _obj
    m T.Text
mimeInfoGetMimeType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_mime_info_get_mime_type _obj'
    checkUnexpectedReturnNULL "webkit_mime_info_get_mime_type" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_mime_info_ref" webkit_mime_info_ref :: 
    Ptr MimeInfo ->                         -- _obj : TInterface "WebKit2" "MimeInfo"
    IO (Ptr MimeInfo)


mimeInfoRef ::
    (MonadIO m) =>
    MimeInfo ->                             -- _obj
    m MimeInfo
mimeInfoRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_mime_info_ref _obj'
    checkUnexpectedReturnNULL "webkit_mime_info_ref" result
    result' <- (wrapBoxed MimeInfo) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_mime_info_unref" webkit_mime_info_unref :: 
    Ptr MimeInfo ->                         -- _obj : TInterface "WebKit2" "MimeInfo"
    IO ()


mimeInfoUnref ::
    (MonadIO m) =>
    MimeInfo ->                             -- _obj
    m ()
mimeInfoUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    webkit_mime_info_unref _obj'
    touchManagedPtr _obj
    return ()

-- struct NavigationAction
newtype NavigationAction = NavigationAction (ForeignPtr NavigationAction)
noNavigationAction :: Maybe NavigationAction
noNavigationAction = Nothing

foreign import ccall "webkit_navigation_action_get_type" c_webkit_navigation_action_get_type :: 
    IO GType

instance BoxedObject NavigationAction where
    boxedType _ = c_webkit_navigation_action_get_type

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

foreign import ccall "webkit_navigation_action_copy" webkit_navigation_action_copy :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO (Ptr NavigationAction)


navigationActionCopy ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m NavigationAction
navigationActionCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_navigation_action_copy _obj'
    checkUnexpectedReturnNULL "webkit_navigation_action_copy" result
    result' <- (wrapBoxed NavigationAction) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_navigation_action_free" webkit_navigation_action_free :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO ()


navigationActionFree ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m ()
navigationActionFree _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    webkit_navigation_action_free _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_navigation_action_get_modifiers" webkit_navigation_action_get_modifiers :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO Word32


navigationActionGetModifiers ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m Word32
navigationActionGetModifiers _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_navigation_action_get_modifiers _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_navigation_action_get_mouse_button" webkit_navigation_action_get_mouse_button :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO Word32


navigationActionGetMouseButton ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m Word32
navigationActionGetMouseButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_navigation_action_get_mouse_button _obj'
    touchManagedPtr _obj
    return result

-- method NavigationAction::get_navigation_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "NavigationType"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_navigation_action_get_navigation_type" webkit_navigation_action_get_navigation_type :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO CUInt


navigationActionGetNavigationType ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m NavigationType
navigationActionGetNavigationType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_navigation_action_get_navigation_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method NavigationAction::get_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationAction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIRequest"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_navigation_action_get_request" webkit_navigation_action_get_request :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO (Ptr URIRequest)


navigationActionGetRequest ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m URIRequest
navigationActionGetRequest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_navigation_action_get_request _obj'
    checkUnexpectedReturnNULL "webkit_navigation_action_get_request" result
    result' <- (newObject URIRequest) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_navigation_action_is_user_gesture" webkit_navigation_action_is_user_gesture :: 
    Ptr NavigationAction ->                 -- _obj : TInterface "WebKit2" "NavigationAction"
    IO CInt


navigationActionIsUserGesture ::
    (MonadIO m) =>
    NavigationAction ->                     -- _obj
    m Bool
navigationActionIsUserGesture _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_navigation_action_is_user_gesture _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- object NavigationPolicyDecision 
newtype NavigationPolicyDecision = NavigationPolicyDecision (ForeignPtr NavigationPolicyDecision)
noNavigationPolicyDecision :: Maybe NavigationPolicyDecision
noNavigationPolicyDecision = Nothing

foreign import ccall "webkit_navigation_policy_decision_get_type"
    c_webkit_navigation_policy_decision_get_type :: IO GType

type instance ParentTypes NavigationPolicyDecision = '[PolicyDecision, GObject.Object]

instance GObject NavigationPolicyDecision where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_navigation_policy_decision_get_type
    

class GObject o => NavigationPolicyDecisionK o
instance (GObject o, IsDescendantOf NavigationPolicyDecision o) => NavigationPolicyDecisionK o

toNavigationPolicyDecision :: NavigationPolicyDecisionK o => o -> IO NavigationPolicyDecision
toNavigationPolicyDecision = unsafeCastTo NavigationPolicyDecision

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

foreign import ccall "webkit_navigation_policy_decision_get_frame_name" webkit_navigation_policy_decision_get_frame_name :: 
    Ptr NavigationPolicyDecision ->         -- _obj : TInterface "WebKit2" "NavigationPolicyDecision"
    IO CString


navigationPolicyDecisionGetFrameName ::
    (MonadIO m, NavigationPolicyDecisionK a) =>
    a ->                                    -- _obj
    m T.Text
navigationPolicyDecisionGetFrameName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_navigation_policy_decision_get_frame_name _obj'
    checkUnexpectedReturnNULL "webkit_navigation_policy_decision_get_frame_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_navigation_policy_decision_get_modifiers" webkit_navigation_policy_decision_get_modifiers :: 
    Ptr NavigationPolicyDecision ->         -- _obj : TInterface "WebKit2" "NavigationPolicyDecision"
    IO Word32

{-# DEPRECATED navigationPolicyDecisionGetModifiers ["(Since version 2.6)","Use webkit_navigation_policy_decision_get_navigation_action() instead."]#-}
navigationPolicyDecisionGetModifiers ::
    (MonadIO m, NavigationPolicyDecisionK a) =>
    a ->                                    -- _obj
    m Word32
navigationPolicyDecisionGetModifiers _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_navigation_policy_decision_get_modifiers _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_navigation_policy_decision_get_mouse_button" webkit_navigation_policy_decision_get_mouse_button :: 
    Ptr NavigationPolicyDecision ->         -- _obj : TInterface "WebKit2" "NavigationPolicyDecision"
    IO Word32

{-# DEPRECATED navigationPolicyDecisionGetMouseButton ["(Since version 2.6)","Use webkit_navigation_policy_decision_get_navigation_action() instead."]#-}
navigationPolicyDecisionGetMouseButton ::
    (MonadIO m, NavigationPolicyDecisionK a) =>
    a ->                                    -- _obj
    m Word32
navigationPolicyDecisionGetMouseButton _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_navigation_policy_decision_get_mouse_button _obj'
    touchManagedPtr _obj
    return result

-- method NavigationPolicyDecision::get_navigation_action
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "NavigationAction"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_navigation_policy_decision_get_navigation_action" webkit_navigation_policy_decision_get_navigation_action :: 
    Ptr NavigationPolicyDecision ->         -- _obj : TInterface "WebKit2" "NavigationPolicyDecision"
    IO (Ptr NavigationAction)


navigationPolicyDecisionGetNavigationAction ::
    (MonadIO m, NavigationPolicyDecisionK a) =>
    a ->                                    -- _obj
    m NavigationAction
navigationPolicyDecisionGetNavigationAction _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_navigation_policy_decision_get_navigation_action _obj'
    checkUnexpectedReturnNULL "webkit_navigation_policy_decision_get_navigation_action" result
    result' <- (newBoxed NavigationAction) result
    touchManagedPtr _obj
    return result'

-- method NavigationPolicyDecision::get_navigation_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "NavigationType"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_navigation_policy_decision_get_navigation_type" webkit_navigation_policy_decision_get_navigation_type :: 
    Ptr NavigationPolicyDecision ->         -- _obj : TInterface "WebKit2" "NavigationPolicyDecision"
    IO CUInt

{-# DEPRECATED navigationPolicyDecisionGetNavigationType ["(Since version 2.6)","Use webkit_navigation_policy_decision_get_navigation_action() instead."]#-}
navigationPolicyDecisionGetNavigationType ::
    (MonadIO m, NavigationPolicyDecisionK a) =>
    a ->                                    -- _obj
    m NavigationType
navigationPolicyDecisionGetNavigationType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_navigation_policy_decision_get_navigation_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method NavigationPolicyDecision::get_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "NavigationPolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIRequest"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_navigation_policy_decision_get_request" webkit_navigation_policy_decision_get_request :: 
    Ptr NavigationPolicyDecision ->         -- _obj : TInterface "WebKit2" "NavigationPolicyDecision"
    IO (Ptr URIRequest)

{-# DEPRECATED navigationPolicyDecisionGetRequest ["(Since version 2.6)","Use webkit_navigation_policy_decision_get_navigation_action() instead."]#-}
navigationPolicyDecisionGetRequest ::
    (MonadIO m, NavigationPolicyDecisionK a) =>
    a ->                                    -- _obj
    m URIRequest
navigationPolicyDecisionGetRequest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_navigation_policy_decision_get_request _obj'
    checkUnexpectedReturnNULL "webkit_navigation_policy_decision_get_request" result
    result' <- (newObject URIRequest) result
    touchManagedPtr _obj
    return result'

-- Enum NavigationType

data NavigationType = 
      NavigationTypeLinkClicked
    | NavigationTypeFormSubmitted
    | NavigationTypeBackForward
    | NavigationTypeReload
    | NavigationTypeFormResubmitted
    | NavigationTypeOther
    | AnotherNavigationType Int
    deriving (Show, Eq)

instance Enum NavigationType where
    fromEnum NavigationTypeLinkClicked = 0
    fromEnum NavigationTypeFormSubmitted = 1
    fromEnum NavigationTypeBackForward = 2
    fromEnum NavigationTypeReload = 3
    fromEnum NavigationTypeFormResubmitted = 4
    fromEnum NavigationTypeOther = 5
    fromEnum (AnotherNavigationType k) = k

    toEnum 0 = NavigationTypeLinkClicked
    toEnum 1 = NavigationTypeFormSubmitted
    toEnum 2 = NavigationTypeBackForward
    toEnum 3 = NavigationTypeReload
    toEnum 4 = NavigationTypeFormResubmitted
    toEnum 5 = NavigationTypeOther
    toEnum k = AnotherNavigationType k

foreign import ccall "webkit_navigation_type_get_type" c_webkit_navigation_type_get_type :: 
    IO GType

instance BoxedEnum NavigationType where
    boxedEnumType _ = c_webkit_navigation_type_get_type

-- Enum NetworkError

data NetworkError = 
      NetworkErrorFailed
    | NetworkErrorTransport
    | NetworkErrorUnknownProtocol
    | NetworkErrorCancelled
    | NetworkErrorFileDoesNotExist
    | AnotherNetworkError Int
    deriving (Show, Eq)

instance Enum NetworkError where
    fromEnum NetworkErrorFailed = 399
    fromEnum NetworkErrorTransport = 300
    fromEnum NetworkErrorUnknownProtocol = 301
    fromEnum NetworkErrorCancelled = 302
    fromEnum NetworkErrorFileDoesNotExist = 303
    fromEnum (AnotherNetworkError k) = k

    toEnum 300 = NetworkErrorTransport
    toEnum 301 = NetworkErrorUnknownProtocol
    toEnum 302 = NetworkErrorCancelled
    toEnum 303 = NetworkErrorFileDoesNotExist
    toEnum 399 = NetworkErrorFailed
    toEnum k = AnotherNetworkError k

instance GErrorClass NetworkError where
    gerrorClassDomain _ = "WebKitNetworkError"

catchNetworkError ::
    IO a ->
    (NetworkError -> GErrorMessage -> IO a) ->
    IO a
catchNetworkError = catchGErrorJustDomain

handleNetworkError ::
    (NetworkError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleNetworkError = handleGErrorJustDomain

foreign import ccall "webkit_network_error_get_type" c_webkit_network_error_get_type :: 
    IO GType

instance BoxedEnum NetworkError where
    boxedEnumType _ = c_webkit_network_error_get_type

-- object Notification 
newtype Notification = Notification (ForeignPtr Notification)
noNotification :: Maybe Notification
noNotification = Nothing

foreign import ccall "webkit_notification_get_type"
    c_webkit_notification_get_type :: IO GType

type instance ParentTypes Notification = '[GObject.Object]

instance GObject Notification where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_notification_get_type
    

class GObject o => NotificationK o
instance (GObject o, IsDescendantOf Notification o) => NotificationK o

toNotification :: NotificationK o => o -> IO Notification
toNotification = unsafeCastTo Notification

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

foreign import ccall "webkit_notification_close" webkit_notification_close :: 
    Ptr Notification ->                     -- _obj : TInterface "WebKit2" "Notification"
    IO ()


notificationClose ::
    (MonadIO m, NotificationK a) =>
    a ->                                    -- _obj
    m ()
notificationClose _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_notification_close _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_notification_get_body" webkit_notification_get_body :: 
    Ptr Notification ->                     -- _obj : TInterface "WebKit2" "Notification"
    IO CString


notificationGetBody ::
    (MonadIO m, NotificationK a) =>
    a ->                                    -- _obj
    m T.Text
notificationGetBody _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_notification_get_body _obj'
    checkUnexpectedReturnNULL "webkit_notification_get_body" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_notification_get_id" webkit_notification_get_id :: 
    Ptr Notification ->                     -- _obj : TInterface "WebKit2" "Notification"
    IO Word64


notificationGetId ::
    (MonadIO m, NotificationK a) =>
    a ->                                    -- _obj
    m Word64
notificationGetId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_notification_get_id _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_notification_get_title" webkit_notification_get_title :: 
    Ptr Notification ->                     -- _obj : TInterface "WebKit2" "Notification"
    IO CString


notificationGetTitle ::
    (MonadIO m, NotificationK a) =>
    a ->                                    -- _obj
    m T.Text
notificationGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_notification_get_title _obj'
    checkUnexpectedReturnNULL "webkit_notification_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- signal Notification::closed
type NotificationClosedCallback =
    IO ()

noNotificationClosedCallback :: Maybe NotificationClosedCallback
noNotificationClosedCallback = Nothing

type NotificationClosedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkNotificationClosedCallback :: NotificationClosedCallbackC -> IO (FunPtr NotificationClosedCallbackC)

notificationClosedClosure :: NotificationClosedCallback -> IO Closure
notificationClosedClosure cb = newCClosure =<< mkNotificationClosedCallback wrapped
    where wrapped = notificationClosedCallbackWrapper cb

notificationClosedCallbackWrapper ::
    NotificationClosedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
notificationClosedCallbackWrapper _cb _ _ = do
    _cb 

onNotificationClosed :: (GObject a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
onNotificationClosed obj cb = liftIO $ connectNotificationClosed obj cb SignalConnectBefore
afterNotificationClosed :: (GObject a, MonadIO m) => a -> NotificationClosedCallback -> m SignalHandlerId
afterNotificationClosed obj cb = connectNotificationClosed obj cb SignalConnectAfter

connectNotificationClosed :: (GObject a, MonadIO m) =>
                             a -> NotificationClosedCallback -> SignalConnectMode -> m SignalHandlerId
connectNotificationClosed obj cb after = liftIO $ do
    cb' <- mkNotificationClosedCallback (notificationClosedCallbackWrapper cb)
    connectSignalFunPtr obj "closed" cb' after

-- object NotificationPermissionRequest 
newtype NotificationPermissionRequest = NotificationPermissionRequest (ForeignPtr NotificationPermissionRequest)
noNotificationPermissionRequest :: Maybe NotificationPermissionRequest
noNotificationPermissionRequest = Nothing

foreign import ccall "webkit_notification_permission_request_get_type"
    c_webkit_notification_permission_request_get_type :: IO GType

type instance ParentTypes NotificationPermissionRequest = '[GObject.Object, PermissionRequest]

instance GObject NotificationPermissionRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_notification_permission_request_get_type
    

class GObject o => NotificationPermissionRequestK o
instance (GObject o, IsDescendantOf NotificationPermissionRequest o) => NotificationPermissionRequestK o

toNotificationPermissionRequest :: NotificationPermissionRequestK o => o -> IO NotificationPermissionRequest
toNotificationPermissionRequest = unsafeCastTo NotificationPermissionRequest

-- interface PermissionRequest 

newtype PermissionRequest = PermissionRequest (ForeignPtr PermissionRequest)
noPermissionRequest :: Maybe PermissionRequest
noPermissionRequest = Nothing

foreign import ccall "webkit_permission_request_get_type"
    c_webkit_permission_request_get_type :: IO GType

type instance ParentTypes PermissionRequest = '[GObject.Object]

instance GObject PermissionRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_permission_request_get_type
    

class GObject o => PermissionRequestK o
instance (GObject o, IsDescendantOf PermissionRequest o) => PermissionRequestK o

toPermissionRequest :: PermissionRequestK o => o -> IO PermissionRequest
toPermissionRequest = unsafeCastTo PermissionRequest

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

foreign import ccall "webkit_permission_request_allow" webkit_permission_request_allow :: 
    Ptr PermissionRequest ->                -- _obj : TInterface "WebKit2" "PermissionRequest"
    IO ()


permissionRequestAllow ::
    (MonadIO m, PermissionRequestK a) =>
    a ->                                    -- _obj
    m ()
permissionRequestAllow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_permission_request_allow _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_permission_request_deny" webkit_permission_request_deny :: 
    Ptr PermissionRequest ->                -- _obj : TInterface "WebKit2" "PermissionRequest"
    IO ()


permissionRequestDeny ::
    (MonadIO m, PermissionRequestK a) =>
    a ->                                    -- _obj
    m ()
permissionRequestDeny _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_permission_request_deny _obj'
    touchManagedPtr _obj
    return ()

-- object Plugin 
newtype Plugin = Plugin (ForeignPtr Plugin)
noPlugin :: Maybe Plugin
noPlugin = Nothing

foreign import ccall "webkit_plugin_get_type"
    c_webkit_plugin_get_type :: IO GType

type instance ParentTypes Plugin = '[GObject.Object]

instance GObject Plugin where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_plugin_get_type
    

class GObject o => PluginK o
instance (GObject o, IsDescendantOf Plugin o) => PluginK o

toPlugin :: PluginK o => o -> IO Plugin
toPlugin = unsafeCastTo Plugin

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

foreign import ccall "webkit_plugin_get_description" webkit_plugin_get_description :: 
    Ptr Plugin ->                           -- _obj : TInterface "WebKit2" "Plugin"
    IO CString


pluginGetDescription ::
    (MonadIO m, PluginK a) =>
    a ->                                    -- _obj
    m T.Text
pluginGetDescription _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_plugin_get_description _obj'
    checkUnexpectedReturnNULL "webkit_plugin_get_description" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method Plugin::get_mime_info_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Plugin", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Plugin", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "MimeInfo")
-- throws : False
-- Skip return : False

foreign import ccall "webkit_plugin_get_mime_info_list" webkit_plugin_get_mime_info_list :: 
    Ptr Plugin ->                           -- _obj : TInterface "WebKit2" "Plugin"
    IO (Ptr (GList (Ptr MimeInfo)))


pluginGetMimeInfoList ::
    (MonadIO m, PluginK a) =>
    a ->                                    -- _obj
    m [MimeInfo]
pluginGetMimeInfoList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_plugin_get_mime_info_list _obj'
    checkUnexpectedReturnNULL "webkit_plugin_get_mime_info_list" result
    result' <- unpackGList result
    result'' <- mapM (newBoxed MimeInfo) result'
    touchManagedPtr _obj
    return result''

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

foreign import ccall "webkit_plugin_get_name" webkit_plugin_get_name :: 
    Ptr Plugin ->                           -- _obj : TInterface "WebKit2" "Plugin"
    IO CString


pluginGetName ::
    (MonadIO m, PluginK a) =>
    a ->                                    -- _obj
    m T.Text
pluginGetName _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_plugin_get_name _obj'
    checkUnexpectedReturnNULL "webkit_plugin_get_name" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_plugin_get_path" webkit_plugin_get_path :: 
    Ptr Plugin ->                           -- _obj : TInterface "WebKit2" "Plugin"
    IO CString


pluginGetPath ::
    (MonadIO m, PluginK a) =>
    a ->                                    -- _obj
    m T.Text
pluginGetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_plugin_get_path _obj'
    checkUnexpectedReturnNULL "webkit_plugin_get_path" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- Enum PluginError

data PluginError = 
      PluginErrorFailed
    | PluginErrorCannotFindPlugin
    | PluginErrorCannotLoadPlugin
    | PluginErrorJavaUnavailable
    | PluginErrorConnectionCancelled
    | PluginErrorWillHandleLoad
    | AnotherPluginError Int
    deriving (Show, Eq)

instance Enum PluginError where
    fromEnum PluginErrorFailed = 299
    fromEnum PluginErrorCannotFindPlugin = 200
    fromEnum PluginErrorCannotLoadPlugin = 201
    fromEnum PluginErrorJavaUnavailable = 202
    fromEnum PluginErrorConnectionCancelled = 203
    fromEnum PluginErrorWillHandleLoad = 204
    fromEnum (AnotherPluginError k) = k

    toEnum 200 = PluginErrorCannotFindPlugin
    toEnum 201 = PluginErrorCannotLoadPlugin
    toEnum 202 = PluginErrorJavaUnavailable
    toEnum 203 = PluginErrorConnectionCancelled
    toEnum 204 = PluginErrorWillHandleLoad
    toEnum 299 = PluginErrorFailed
    toEnum k = AnotherPluginError k

instance GErrorClass PluginError where
    gerrorClassDomain _ = "WebKitPluginError"

catchPluginError ::
    IO a ->
    (PluginError -> GErrorMessage -> IO a) ->
    IO a
catchPluginError = catchGErrorJustDomain

handlePluginError ::
    (PluginError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handlePluginError = handleGErrorJustDomain

foreign import ccall "webkit_plugin_error_get_type" c_webkit_plugin_error_get_type :: 
    IO GType

instance BoxedEnum PluginError where
    boxedEnumType _ = c_webkit_plugin_error_get_type

-- object PolicyDecision 
newtype PolicyDecision = PolicyDecision (ForeignPtr PolicyDecision)
noPolicyDecision :: Maybe PolicyDecision
noPolicyDecision = Nothing

foreign import ccall "webkit_policy_decision_get_type"
    c_webkit_policy_decision_get_type :: IO GType

type instance ParentTypes PolicyDecision = '[GObject.Object]

instance GObject PolicyDecision where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_policy_decision_get_type
    

class GObject o => PolicyDecisionK o
instance (GObject o, IsDescendantOf PolicyDecision o) => PolicyDecisionK o

toPolicyDecision :: PolicyDecisionK o => o -> IO PolicyDecision
toPolicyDecision = unsafeCastTo PolicyDecision

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

foreign import ccall "webkit_policy_decision_download" webkit_policy_decision_download :: 
    Ptr PolicyDecision ->                   -- _obj : TInterface "WebKit2" "PolicyDecision"
    IO ()


policyDecisionDownload ::
    (MonadIO m, PolicyDecisionK a) =>
    a ->                                    -- _obj
    m ()
policyDecisionDownload _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_policy_decision_download _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_policy_decision_ignore" webkit_policy_decision_ignore :: 
    Ptr PolicyDecision ->                   -- _obj : TInterface "WebKit2" "PolicyDecision"
    IO ()


policyDecisionIgnore ::
    (MonadIO m, PolicyDecisionK a) =>
    a ->                                    -- _obj
    m ()
policyDecisionIgnore _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_policy_decision_ignore _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_policy_decision_use" webkit_policy_decision_use :: 
    Ptr PolicyDecision ->                   -- _obj : TInterface "WebKit2" "PolicyDecision"
    IO ()


policyDecisionUse ::
    (MonadIO m, PolicyDecisionK a) =>
    a ->                                    -- _obj
    m ()
policyDecisionUse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_policy_decision_use _obj'
    touchManagedPtr _obj
    return ()

-- Enum PolicyDecisionType

data PolicyDecisionType = 
      PolicyDecisionTypeNavigationAction
    | PolicyDecisionTypeNewWindowAction
    | PolicyDecisionTypeResponse
    | AnotherPolicyDecisionType Int
    deriving (Show, Eq)

instance Enum PolicyDecisionType where
    fromEnum PolicyDecisionTypeNavigationAction = 0
    fromEnum PolicyDecisionTypeNewWindowAction = 1
    fromEnum PolicyDecisionTypeResponse = 2
    fromEnum (AnotherPolicyDecisionType k) = k

    toEnum 0 = PolicyDecisionTypeNavigationAction
    toEnum 1 = PolicyDecisionTypeNewWindowAction
    toEnum 2 = PolicyDecisionTypeResponse
    toEnum k = AnotherPolicyDecisionType k

foreign import ccall "webkit_policy_decision_type_get_type" c_webkit_policy_decision_type_get_type :: 
    IO GType

instance BoxedEnum PolicyDecisionType where
    boxedEnumType _ = c_webkit_policy_decision_type_get_type

-- Enum PolicyError

data PolicyError = 
      PolicyErrorFailed
    | PolicyErrorCannotShowMimeType
    | PolicyErrorCannotShowUri
    | PolicyErrorFrameLoadInterruptedByPolicyChange
    | PolicyErrorCannotUseRestrictedPort
    | AnotherPolicyError Int
    deriving (Show, Eq)

instance Enum PolicyError where
    fromEnum PolicyErrorFailed = 199
    fromEnum PolicyErrorCannotShowMimeType = 100
    fromEnum PolicyErrorCannotShowUri = 101
    fromEnum PolicyErrorFrameLoadInterruptedByPolicyChange = 102
    fromEnum PolicyErrorCannotUseRestrictedPort = 103
    fromEnum (AnotherPolicyError k) = k

    toEnum 100 = PolicyErrorCannotShowMimeType
    toEnum 101 = PolicyErrorCannotShowUri
    toEnum 102 = PolicyErrorFrameLoadInterruptedByPolicyChange
    toEnum 103 = PolicyErrorCannotUseRestrictedPort
    toEnum 199 = PolicyErrorFailed
    toEnum k = AnotherPolicyError k

instance GErrorClass PolicyError where
    gerrorClassDomain _ = "WebKitPolicyError"

catchPolicyError ::
    IO a ->
    (PolicyError -> GErrorMessage -> IO a) ->
    IO a
catchPolicyError = catchGErrorJustDomain

handlePolicyError ::
    (PolicyError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handlePolicyError = handleGErrorJustDomain

foreign import ccall "webkit_policy_error_get_type" c_webkit_policy_error_get_type :: 
    IO GType

instance BoxedEnum PolicyError where
    boxedEnumType _ = c_webkit_policy_error_get_type

-- Enum PrintError

data PrintError = 
      PrintErrorGeneral
    | PrintErrorPrinterNotFound
    | PrintErrorInvalidPageRange
    | AnotherPrintError Int
    deriving (Show, Eq)

instance Enum PrintError where
    fromEnum PrintErrorGeneral = 599
    fromEnum PrintErrorPrinterNotFound = 500
    fromEnum PrintErrorInvalidPageRange = 501
    fromEnum (AnotherPrintError k) = k

    toEnum 500 = PrintErrorPrinterNotFound
    toEnum 501 = PrintErrorInvalidPageRange
    toEnum 599 = PrintErrorGeneral
    toEnum k = AnotherPrintError k

instance GErrorClass PrintError where
    gerrorClassDomain _ = "WebKitPrintError"

catchPrintError ::
    IO a ->
    (PrintError -> GErrorMessage -> IO a) ->
    IO a
catchPrintError = catchGErrorJustDomain

handlePrintError ::
    (PrintError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handlePrintError = handleGErrorJustDomain

foreign import ccall "webkit_print_error_get_type" c_webkit_print_error_get_type :: 
    IO GType

instance BoxedEnum PrintError where
    boxedEnumType _ = c_webkit_print_error_get_type

-- object PrintOperation 
newtype PrintOperation = PrintOperation (ForeignPtr PrintOperation)
noPrintOperation :: Maybe PrintOperation
noPrintOperation = Nothing

foreign import ccall "webkit_print_operation_get_type"
    c_webkit_print_operation_get_type :: IO GType

type instance ParentTypes PrintOperation = '[GObject.Object]

instance GObject PrintOperation where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_print_operation_get_type
    

class GObject o => PrintOperationK o
instance (GObject o, IsDescendantOf PrintOperation o) => PrintOperationK o

toPrintOperation :: PrintOperationK o => o -> IO PrintOperation
toPrintOperation = unsafeCastTo PrintOperation

-- method PrintOperation::new
-- method type : Constructor
-- Args : [Arg {argName = "web_view", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "web_view", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "PrintOperation"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_operation_new" webkit_print_operation_new :: 
    Ptr WebView ->                          -- web_view : TInterface "WebKit2" "WebView"
    IO (Ptr PrintOperation)


printOperationNew ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- web_view
    m PrintOperation
printOperationNew web_view = liftIO $ do
    let web_view' = unsafeManagedPtrCastPtr web_view
    result <- webkit_print_operation_new web_view'
    checkUnexpectedReturnNULL "webkit_print_operation_new" result
    result' <- (wrapObject PrintOperation) result
    touchManagedPtr web_view
    return result'

-- method PrintOperation::get_page_setup
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PageSetup"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_operation_get_page_setup" webkit_print_operation_get_page_setup :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "WebKit2" "PrintOperation"
    IO (Ptr Gtk.PageSetup)


printOperationGetPageSetup ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Gtk.PageSetup
printOperationGetPageSetup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_print_operation_get_page_setup _obj'
    checkUnexpectedReturnNULL "webkit_print_operation_get_page_setup" result
    result' <- (newObject Gtk.PageSetup) result
    touchManagedPtr _obj
    return result'

-- method PrintOperation::get_print_settings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "PrintSettings"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_operation_get_print_settings" webkit_print_operation_get_print_settings :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "WebKit2" "PrintOperation"
    IO (Ptr Gtk.PrintSettings)


printOperationGetPrintSettings ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m Gtk.PrintSettings
printOperationGetPrintSettings _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_print_operation_get_print_settings _obj'
    checkUnexpectedReturnNULL "webkit_print_operation_get_print_settings" result
    result' <- (newObject Gtk.PrintSettings) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_print_operation_print" webkit_print_operation_print :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "WebKit2" "PrintOperation"
    IO ()


printOperationPrint ::
    (MonadIO m, PrintOperationK a) =>
    a ->                                    -- _obj
    m ()
printOperationPrint _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_print_operation_print _obj'
    touchManagedPtr _obj
    return ()

-- method PrintOperation::run_dialog
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "PrintOperation", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "parent", argType = TInterface "Gtk" "Window", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "PrintOperationResponse"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_operation_run_dialog" webkit_print_operation_run_dialog :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "WebKit2" "PrintOperation"
    Ptr Gtk.Window ->                       -- parent : TInterface "Gtk" "Window"
    IO CUInt


printOperationRunDialog ::
    (MonadIO m, PrintOperationK a, Gtk.WindowK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- parent
    m PrintOperationResponse
printOperationRunDialog _obj parent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeParent <- case parent of
        Nothing -> return nullPtr
        Just jParent -> do
            let jParent' = unsafeManagedPtrCastPtr jParent
            return jParent'
    result <- webkit_print_operation_run_dialog _obj' maybeParent
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    whenJust parent touchManagedPtr
    return result'

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

foreign import ccall "webkit_print_operation_set_page_setup" webkit_print_operation_set_page_setup :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "WebKit2" "PrintOperation"
    Ptr Gtk.PageSetup ->                    -- page_setup : TInterface "Gtk" "PageSetup"
    IO ()


printOperationSetPageSetup ::
    (MonadIO m, PrintOperationK a, Gtk.PageSetupK b) =>
    a ->                                    -- _obj
    b ->                                    -- page_setup
    m ()
printOperationSetPageSetup _obj page_setup = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let page_setup' = unsafeManagedPtrCastPtr page_setup
    webkit_print_operation_set_page_setup _obj' page_setup'
    touchManagedPtr _obj
    touchManagedPtr page_setup
    return ()

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

foreign import ccall "webkit_print_operation_set_print_settings" webkit_print_operation_set_print_settings :: 
    Ptr PrintOperation ->                   -- _obj : TInterface "WebKit2" "PrintOperation"
    Ptr Gtk.PrintSettings ->                -- print_settings : TInterface "Gtk" "PrintSettings"
    IO ()


printOperationSetPrintSettings ::
    (MonadIO m, PrintOperationK a, Gtk.PrintSettingsK b) =>
    a ->                                    -- _obj
    b ->                                    -- print_settings
    m ()
printOperationSetPrintSettings _obj print_settings = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let print_settings' = unsafeManagedPtrCastPtr print_settings
    webkit_print_operation_set_print_settings _obj' print_settings'
    touchManagedPtr _obj
    touchManagedPtr print_settings
    return ()

-- signal PrintOperation::failed
type PrintOperationFailedCallback =
    Ptr () ->
    IO ()

noPrintOperationFailedCallback :: Maybe PrintOperationFailedCallback
noPrintOperationFailedCallback = Nothing

type PrintOperationFailedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationFailedCallback :: PrintOperationFailedCallbackC -> IO (FunPtr PrintOperationFailedCallbackC)

printOperationFailedClosure :: PrintOperationFailedCallback -> IO Closure
printOperationFailedClosure cb = newCClosure =<< mkPrintOperationFailedCallback wrapped
    where wrapped = printOperationFailedCallbackWrapper cb

printOperationFailedCallbackWrapper ::
    PrintOperationFailedCallback ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO ()
printOperationFailedCallbackWrapper _cb _ error_ _ = do
    _cb  error_

onPrintOperationFailed :: (GObject a, MonadIO m) => a -> PrintOperationFailedCallback -> m SignalHandlerId
onPrintOperationFailed obj cb = liftIO $ connectPrintOperationFailed obj cb SignalConnectBefore
afterPrintOperationFailed :: (GObject a, MonadIO m) => a -> PrintOperationFailedCallback -> m SignalHandlerId
afterPrintOperationFailed obj cb = connectPrintOperationFailed obj cb SignalConnectAfter

connectPrintOperationFailed :: (GObject a, MonadIO m) =>
                               a -> PrintOperationFailedCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationFailed obj cb after = liftIO $ do
    cb' <- mkPrintOperationFailedCallback (printOperationFailedCallbackWrapper cb)
    connectSignalFunPtr obj "failed" cb' after

-- signal PrintOperation::finished
type PrintOperationFinishedCallback =
    IO ()

noPrintOperationFinishedCallback :: Maybe PrintOperationFinishedCallback
noPrintOperationFinishedCallback = Nothing

type PrintOperationFinishedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPrintOperationFinishedCallback :: PrintOperationFinishedCallbackC -> IO (FunPtr PrintOperationFinishedCallbackC)

printOperationFinishedClosure :: PrintOperationFinishedCallback -> IO Closure
printOperationFinishedClosure cb = newCClosure =<< mkPrintOperationFinishedCallback wrapped
    where wrapped = printOperationFinishedCallbackWrapper cb

printOperationFinishedCallbackWrapper ::
    PrintOperationFinishedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
printOperationFinishedCallbackWrapper _cb _ _ = do
    _cb 

onPrintOperationFinished :: (GObject a, MonadIO m) => a -> PrintOperationFinishedCallback -> m SignalHandlerId
onPrintOperationFinished obj cb = liftIO $ connectPrintOperationFinished obj cb SignalConnectBefore
afterPrintOperationFinished :: (GObject a, MonadIO m) => a -> PrintOperationFinishedCallback -> m SignalHandlerId
afterPrintOperationFinished obj cb = connectPrintOperationFinished obj cb SignalConnectAfter

connectPrintOperationFinished :: (GObject a, MonadIO m) =>
                                 a -> PrintOperationFinishedCallback -> SignalConnectMode -> m SignalHandlerId
connectPrintOperationFinished obj cb after = liftIO $ do
    cb' <- mkPrintOperationFinishedCallback (printOperationFinishedCallbackWrapper cb)
    connectSignalFunPtr obj "finished" cb' after

-- Enum PrintOperationResponse

data PrintOperationResponse = 
      PrintOperationResponsePrint
    | PrintOperationResponseCancel
    | AnotherPrintOperationResponse Int
    deriving (Show, Eq)

instance Enum PrintOperationResponse where
    fromEnum PrintOperationResponsePrint = 0
    fromEnum PrintOperationResponseCancel = 1
    fromEnum (AnotherPrintOperationResponse k) = k

    toEnum 0 = PrintOperationResponsePrint
    toEnum 1 = PrintOperationResponseCancel
    toEnum k = AnotherPrintOperationResponse k

foreign import ccall "webkit_print_operation_response_get_type" c_webkit_print_operation_response_get_type :: 
    IO GType

instance BoxedEnum PrintOperationResponse where
    boxedEnumType _ = c_webkit_print_operation_response_get_type

-- Enum ProcessModel

data ProcessModel = 
      ProcessModelSharedSecondaryProcess
    | ProcessModelMultipleSecondaryProcesses
    | AnotherProcessModel Int
    deriving (Show, Eq)

instance Enum ProcessModel where
    fromEnum ProcessModelSharedSecondaryProcess = 0
    fromEnum ProcessModelMultipleSecondaryProcesses = 1
    fromEnum (AnotherProcessModel k) = k

    toEnum 0 = ProcessModelSharedSecondaryProcess
    toEnum 1 = ProcessModelMultipleSecondaryProcesses
    toEnum k = AnotherProcessModel k

foreign import ccall "webkit_process_model_get_type" c_webkit_process_model_get_type :: 
    IO GType

instance BoxedEnum ProcessModel where
    boxedEnumType _ = c_webkit_process_model_get_type

-- object ResponsePolicyDecision 
newtype ResponsePolicyDecision = ResponsePolicyDecision (ForeignPtr ResponsePolicyDecision)
noResponsePolicyDecision :: Maybe ResponsePolicyDecision
noResponsePolicyDecision = Nothing

foreign import ccall "webkit_response_policy_decision_get_type"
    c_webkit_response_policy_decision_get_type :: IO GType

type instance ParentTypes ResponsePolicyDecision = '[PolicyDecision, GObject.Object]

instance GObject ResponsePolicyDecision where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_response_policy_decision_get_type
    

class GObject o => ResponsePolicyDecisionK o
instance (GObject o, IsDescendantOf ResponsePolicyDecision o) => ResponsePolicyDecisionK o

toResponsePolicyDecision :: ResponsePolicyDecisionK o => o -> IO ResponsePolicyDecision
toResponsePolicyDecision = unsafeCastTo ResponsePolicyDecision

-- method ResponsePolicyDecision::get_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ResponsePolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ResponsePolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIRequest"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_response_policy_decision_get_request" webkit_response_policy_decision_get_request :: 
    Ptr ResponsePolicyDecision ->           -- _obj : TInterface "WebKit2" "ResponsePolicyDecision"
    IO (Ptr URIRequest)


responsePolicyDecisionGetRequest ::
    (MonadIO m, ResponsePolicyDecisionK a) =>
    a ->                                    -- _obj
    m URIRequest
responsePolicyDecisionGetRequest _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_response_policy_decision_get_request _obj'
    checkUnexpectedReturnNULL "webkit_response_policy_decision_get_request" result
    result' <- (newObject URIRequest) result
    touchManagedPtr _obj
    return result'

-- method ResponsePolicyDecision::get_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ResponsePolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ResponsePolicyDecision", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIResponse"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_response_policy_decision_get_response" webkit_response_policy_decision_get_response :: 
    Ptr ResponsePolicyDecision ->           -- _obj : TInterface "WebKit2" "ResponsePolicyDecision"
    IO (Ptr URIResponse)


responsePolicyDecisionGetResponse ::
    (MonadIO m, ResponsePolicyDecisionK a) =>
    a ->                                    -- _obj
    m URIResponse
responsePolicyDecisionGetResponse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_response_policy_decision_get_response _obj'
    checkUnexpectedReturnNULL "webkit_response_policy_decision_get_response" result
    result' <- (newObject URIResponse) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_response_policy_decision_is_mime_type_supported" webkit_response_policy_decision_is_mime_type_supported :: 
    Ptr ResponsePolicyDecision ->           -- _obj : TInterface "WebKit2" "ResponsePolicyDecision"
    IO CInt


responsePolicyDecisionIsMimeTypeSupported ::
    (MonadIO m, ResponsePolicyDecisionK a) =>
    a ->                                    -- _obj
    m Bool
responsePolicyDecisionIsMimeTypeSupported _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_response_policy_decision_is_mime_type_supported _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- Enum SaveMode

data SaveMode = 
      SaveModeMhtml
    | AnotherSaveMode Int
    deriving (Show, Eq)

instance Enum SaveMode where
    fromEnum SaveModeMhtml = 0
    fromEnum (AnotherSaveMode k) = k

    toEnum 0 = SaveModeMhtml
    toEnum k = AnotherSaveMode k

foreign import ccall "webkit_save_mode_get_type" c_webkit_save_mode_get_type :: 
    IO GType

instance BoxedEnum SaveMode where
    boxedEnumType _ = c_webkit_save_mode_get_type

-- struct ScriptDialog
newtype ScriptDialog = ScriptDialog (ForeignPtr ScriptDialog)
noScriptDialog :: Maybe ScriptDialog
noScriptDialog = Nothing

foreign import ccall "webkit_script_dialog_get_type" c_webkit_script_dialog_get_type :: 
    IO GType

instance BoxedObject ScriptDialog where
    boxedType _ = c_webkit_script_dialog_get_type

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

foreign import ccall "webkit_script_dialog_confirm_set_confirmed" webkit_script_dialog_confirm_set_confirmed :: 
    Ptr ScriptDialog ->                     -- _obj : TInterface "WebKit2" "ScriptDialog"
    CInt ->                                 -- confirmed : TBasicType TBoolean
    IO ()


scriptDialogConfirmSetConfirmed ::
    (MonadIO m) =>
    ScriptDialog ->                         -- _obj
    Bool ->                                 -- confirmed
    m ()
scriptDialogConfirmSetConfirmed _obj confirmed = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    let confirmed' = (fromIntegral . fromEnum) confirmed
    webkit_script_dialog_confirm_set_confirmed _obj' confirmed'
    touchManagedPtr _obj
    return ()

-- method ScriptDialog::get_dialog_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ScriptDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ScriptDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ScriptDialogType"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_script_dialog_get_dialog_type" webkit_script_dialog_get_dialog_type :: 
    Ptr ScriptDialog ->                     -- _obj : TInterface "WebKit2" "ScriptDialog"
    IO CUInt


scriptDialogGetDialogType ::
    (MonadIO m) =>
    ScriptDialog ->                         -- _obj
    m ScriptDialogType
scriptDialogGetDialogType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_script_dialog_get_dialog_type _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_script_dialog_get_message" webkit_script_dialog_get_message :: 
    Ptr ScriptDialog ->                     -- _obj : TInterface "WebKit2" "ScriptDialog"
    IO CString


scriptDialogGetMessage ::
    (MonadIO m) =>
    ScriptDialog ->                         -- _obj
    m T.Text
scriptDialogGetMessage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_script_dialog_get_message _obj'
    checkUnexpectedReturnNULL "webkit_script_dialog_get_message" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_script_dialog_prompt_get_default_text" webkit_script_dialog_prompt_get_default_text :: 
    Ptr ScriptDialog ->                     -- _obj : TInterface "WebKit2" "ScriptDialog"
    IO CString


scriptDialogPromptGetDefaultText ::
    (MonadIO m) =>
    ScriptDialog ->                         -- _obj
    m T.Text
scriptDialogPromptGetDefaultText _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_script_dialog_prompt_get_default_text _obj'
    checkUnexpectedReturnNULL "webkit_script_dialog_prompt_get_default_text" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_script_dialog_prompt_set_text" webkit_script_dialog_prompt_set_text :: 
    Ptr ScriptDialog ->                     -- _obj : TInterface "WebKit2" "ScriptDialog"
    CString ->                              -- text : TBasicType TUTF8
    IO ()


scriptDialogPromptSetText ::
    (MonadIO m) =>
    ScriptDialog ->                         -- _obj
    T.Text ->                               -- text
    m ()
scriptDialogPromptSetText _obj text = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    text' <- textToCString text
    webkit_script_dialog_prompt_set_text _obj' text'
    touchManagedPtr _obj
    freeMem text'
    return ()

-- Enum ScriptDialogType

data ScriptDialogType = 
      ScriptDialogTypeAlert
    | ScriptDialogTypeConfirm
    | ScriptDialogTypePrompt
    | AnotherScriptDialogType Int
    deriving (Show, Eq)

instance Enum ScriptDialogType where
    fromEnum ScriptDialogTypeAlert = 0
    fromEnum ScriptDialogTypeConfirm = 1
    fromEnum ScriptDialogTypePrompt = 2
    fromEnum (AnotherScriptDialogType k) = k

    toEnum 0 = ScriptDialogTypeAlert
    toEnum 1 = ScriptDialogTypeConfirm
    toEnum 2 = ScriptDialogTypePrompt
    toEnum k = AnotherScriptDialogType k

foreign import ccall "webkit_script_dialog_type_get_type" c_webkit_script_dialog_type_get_type :: 
    IO GType

instance BoxedEnum ScriptDialogType where
    boxedEnumType _ = c_webkit_script_dialog_type_get_type

-- object SecurityManager 
newtype SecurityManager = SecurityManager (ForeignPtr SecurityManager)
noSecurityManager :: Maybe SecurityManager
noSecurityManager = Nothing

foreign import ccall "webkit_security_manager_get_type"
    c_webkit_security_manager_get_type :: IO GType

type instance ParentTypes SecurityManager = '[GObject.Object]

instance GObject SecurityManager where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_security_manager_get_type
    

class GObject o => SecurityManagerK o
instance (GObject o, IsDescendantOf SecurityManager o) => SecurityManagerK o

toSecurityManager :: SecurityManagerK o => o -> IO SecurityManager
toSecurityManager = unsafeCastTo SecurityManager

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

foreign import ccall "webkit_security_manager_register_uri_scheme_as_cors_enabled" webkit_security_manager_register_uri_scheme_as_cors_enabled :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO ()


securityManagerRegisterUriSchemeAsCorsEnabled ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m ()
securityManagerRegisterUriSchemeAsCorsEnabled _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    webkit_security_manager_register_uri_scheme_as_cors_enabled _obj' scheme'
    touchManagedPtr _obj
    freeMem scheme'
    return ()

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

foreign import ccall "webkit_security_manager_register_uri_scheme_as_display_isolated" webkit_security_manager_register_uri_scheme_as_display_isolated :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO ()


securityManagerRegisterUriSchemeAsDisplayIsolated ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m ()
securityManagerRegisterUriSchemeAsDisplayIsolated _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    webkit_security_manager_register_uri_scheme_as_display_isolated _obj' scheme'
    touchManagedPtr _obj
    freeMem scheme'
    return ()

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

foreign import ccall "webkit_security_manager_register_uri_scheme_as_empty_document" webkit_security_manager_register_uri_scheme_as_empty_document :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO ()


securityManagerRegisterUriSchemeAsEmptyDocument ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m ()
securityManagerRegisterUriSchemeAsEmptyDocument _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    webkit_security_manager_register_uri_scheme_as_empty_document _obj' scheme'
    touchManagedPtr _obj
    freeMem scheme'
    return ()

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

foreign import ccall "webkit_security_manager_register_uri_scheme_as_local" webkit_security_manager_register_uri_scheme_as_local :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO ()


securityManagerRegisterUriSchemeAsLocal ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m ()
securityManagerRegisterUriSchemeAsLocal _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    webkit_security_manager_register_uri_scheme_as_local _obj' scheme'
    touchManagedPtr _obj
    freeMem scheme'
    return ()

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

foreign import ccall "webkit_security_manager_register_uri_scheme_as_no_access" webkit_security_manager_register_uri_scheme_as_no_access :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO ()


securityManagerRegisterUriSchemeAsNoAccess ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m ()
securityManagerRegisterUriSchemeAsNoAccess _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    webkit_security_manager_register_uri_scheme_as_no_access _obj' scheme'
    touchManagedPtr _obj
    freeMem scheme'
    return ()

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

foreign import ccall "webkit_security_manager_register_uri_scheme_as_secure" webkit_security_manager_register_uri_scheme_as_secure :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO ()


securityManagerRegisterUriSchemeAsSecure ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m ()
securityManagerRegisterUriSchemeAsSecure _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    webkit_security_manager_register_uri_scheme_as_secure _obj' scheme'
    touchManagedPtr _obj
    freeMem scheme'
    return ()

-- method SecurityManager::uri_scheme_is_cors_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_security_manager_uri_scheme_is_cors_enabled" webkit_security_manager_uri_scheme_is_cors_enabled :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO CInt


securityManagerUriSchemeIsCorsEnabled ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m Bool
securityManagerUriSchemeIsCorsEnabled _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    result <- webkit_security_manager_uri_scheme_is_cors_enabled _obj' scheme'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem scheme'
    return result'

-- method SecurityManager::uri_scheme_is_display_isolated
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_security_manager_uri_scheme_is_display_isolated" webkit_security_manager_uri_scheme_is_display_isolated :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO CInt


securityManagerUriSchemeIsDisplayIsolated ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m Bool
securityManagerUriSchemeIsDisplayIsolated _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    result <- webkit_security_manager_uri_scheme_is_display_isolated _obj' scheme'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem scheme'
    return result'

-- method SecurityManager::uri_scheme_is_empty_document
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_security_manager_uri_scheme_is_empty_document" webkit_security_manager_uri_scheme_is_empty_document :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO CInt


securityManagerUriSchemeIsEmptyDocument ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m Bool
securityManagerUriSchemeIsEmptyDocument _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    result <- webkit_security_manager_uri_scheme_is_empty_document _obj' scheme'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem scheme'
    return result'

-- method SecurityManager::uri_scheme_is_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_security_manager_uri_scheme_is_local" webkit_security_manager_uri_scheme_is_local :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO CInt


securityManagerUriSchemeIsLocal ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m Bool
securityManagerUriSchemeIsLocal _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    result <- webkit_security_manager_uri_scheme_is_local _obj' scheme'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem scheme'
    return result'

-- method SecurityManager::uri_scheme_is_no_access
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_security_manager_uri_scheme_is_no_access" webkit_security_manager_uri_scheme_is_no_access :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO CInt


securityManagerUriSchemeIsNoAccess ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m Bool
securityManagerUriSchemeIsNoAccess _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    result <- webkit_security_manager_uri_scheme_is_no_access _obj' scheme'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem scheme'
    return result'

-- method SecurityManager::uri_scheme_is_secure
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "SecurityManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_security_manager_uri_scheme_is_secure" webkit_security_manager_uri_scheme_is_secure :: 
    Ptr SecurityManager ->                  -- _obj : TInterface "WebKit2" "SecurityManager"
    CString ->                              -- scheme : TBasicType TUTF8
    IO CInt


securityManagerUriSchemeIsSecure ::
    (MonadIO m, SecurityManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    m Bool
securityManagerUriSchemeIsSecure _obj scheme = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    result <- webkit_security_manager_uri_scheme_is_secure _obj' scheme'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem scheme'
    return result'

-- object Settings 
newtype Settings = Settings (ForeignPtr Settings)
noSettings :: Maybe Settings
noSettings = Nothing

foreign import ccall "webkit_settings_get_type"
    c_webkit_settings_get_type :: IO GType

type instance ParentTypes Settings = '[GObject.Object]

instance GObject Settings where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_settings_get_type
    

class GObject o => SettingsK o
instance (GObject o, IsDescendantOf Settings o) => SettingsK o

toSettings :: SettingsK o => o -> IO Settings
toSettings = unsafeCastTo Settings

-- method Settings::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "Settings"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_settings_new" webkit_settings_new :: 
    IO (Ptr Settings)


settingsNew ::
    (MonadIO m) =>
    m Settings
settingsNew  = liftIO $ do
    result <- webkit_settings_new
    checkUnexpectedReturnNULL "webkit_settings_new" result
    result' <- (wrapObject Settings) result
    return result'

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

foreign import ccall "webkit_settings_get_allow_modal_dialogs" webkit_settings_get_allow_modal_dialogs :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetAllowModalDialogs ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetAllowModalDialogs _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_allow_modal_dialogs _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_auto_load_images" webkit_settings_get_auto_load_images :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetAutoLoadImages ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetAutoLoadImages _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_auto_load_images _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_cursive_font_family" webkit_settings_get_cursive_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetCursiveFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetCursiveFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_cursive_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_cursive_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_default_charset" webkit_settings_get_default_charset :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetDefaultCharset ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetDefaultCharset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_default_charset _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_default_charset" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_default_font_family" webkit_settings_get_default_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetDefaultFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetDefaultFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_default_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_default_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_default_font_size" webkit_settings_get_default_font_size :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO Word32


settingsGetDefaultFontSize ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Word32
settingsGetDefaultFontSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_default_font_size _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_settings_get_default_monospace_font_size" webkit_settings_get_default_monospace_font_size :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO Word32


settingsGetDefaultMonospaceFontSize ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Word32
settingsGetDefaultMonospaceFontSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_default_monospace_font_size _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_settings_get_draw_compositing_indicators" webkit_settings_get_draw_compositing_indicators :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetDrawCompositingIndicators ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetDrawCompositingIndicators _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_draw_compositing_indicators _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_accelerated_2d_canvas" webkit_settings_get_enable_accelerated_2d_canvas :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableAccelerated2dCanvas ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableAccelerated2dCanvas _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_accelerated_2d_canvas _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_caret_browsing" webkit_settings_get_enable_caret_browsing :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableCaretBrowsing ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableCaretBrowsing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_caret_browsing _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_developer_extras" webkit_settings_get_enable_developer_extras :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableDeveloperExtras ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableDeveloperExtras _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_developer_extras _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_dns_prefetching" webkit_settings_get_enable_dns_prefetching :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableDnsPrefetching ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableDnsPrefetching _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_dns_prefetching _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_frame_flattening" webkit_settings_get_enable_frame_flattening :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableFrameFlattening ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableFrameFlattening _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_frame_flattening _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_fullscreen" webkit_settings_get_enable_fullscreen :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableFullscreen ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableFullscreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_fullscreen _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_html5_database" webkit_settings_get_enable_html5_database :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableHtml5Database ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableHtml5Database _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_html5_database _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_html5_local_storage" webkit_settings_get_enable_html5_local_storage :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableHtml5LocalStorage ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableHtml5LocalStorage _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_html5_local_storage _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_hyperlink_auditing" webkit_settings_get_enable_hyperlink_auditing :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableHyperlinkAuditing ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableHyperlinkAuditing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_hyperlink_auditing _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_java" webkit_settings_get_enable_java :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableJava ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableJava _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_java _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_javascript" webkit_settings_get_enable_javascript :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableJavascript ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableJavascript _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_javascript _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_media_stream" webkit_settings_get_enable_media_stream :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableMediaStream ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableMediaStream _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_media_stream _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_mediasource" webkit_settings_get_enable_mediasource :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableMediasource ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableMediasource _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_mediasource _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_offline_web_application_cache" webkit_settings_get_enable_offline_web_application_cache :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableOfflineWebApplicationCache ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableOfflineWebApplicationCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_offline_web_application_cache _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_page_cache" webkit_settings_get_enable_page_cache :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnablePageCache ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnablePageCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_page_cache _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_plugins" webkit_settings_get_enable_plugins :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnablePlugins ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnablePlugins _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_plugins _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_private_browsing" webkit_settings_get_enable_private_browsing :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnablePrivateBrowsing ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnablePrivateBrowsing _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_private_browsing _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_resizable_text_areas" webkit_settings_get_enable_resizable_text_areas :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableResizableTextAreas ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableResizableTextAreas _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_resizable_text_areas _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_site_specific_quirks" webkit_settings_get_enable_site_specific_quirks :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableSiteSpecificQuirks ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableSiteSpecificQuirks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_site_specific_quirks _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_smooth_scrolling" webkit_settings_get_enable_smooth_scrolling :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableSmoothScrolling ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableSmoothScrolling _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_smooth_scrolling _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_spatial_navigation" webkit_settings_get_enable_spatial_navigation :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableSpatialNavigation ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableSpatialNavigation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_spatial_navigation _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_tabs_to_links" webkit_settings_get_enable_tabs_to_links :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableTabsToLinks ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableTabsToLinks _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_tabs_to_links _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_webaudio" webkit_settings_get_enable_webaudio :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableWebaudio ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableWebaudio _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_webaudio _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_webgl" webkit_settings_get_enable_webgl :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableWebgl ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableWebgl _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_webgl _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_write_console_messages_to_stdout" webkit_settings_get_enable_write_console_messages_to_stdout :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableWriteConsoleMessagesToStdout ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableWriteConsoleMessagesToStdout _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_write_console_messages_to_stdout _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_enable_xss_auditor" webkit_settings_get_enable_xss_auditor :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetEnableXssAuditor ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetEnableXssAuditor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_enable_xss_auditor _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_fantasy_font_family" webkit_settings_get_fantasy_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetFantasyFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetFantasyFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_fantasy_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_fantasy_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_javascript_can_access_clipboard" webkit_settings_get_javascript_can_access_clipboard :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetJavascriptCanAccessClipboard ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetJavascriptCanAccessClipboard _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_javascript_can_access_clipboard _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_javascript_can_open_windows_automatically" webkit_settings_get_javascript_can_open_windows_automatically :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetJavascriptCanOpenWindowsAutomatically ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetJavascriptCanOpenWindowsAutomatically _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_javascript_can_open_windows_automatically _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_load_icons_ignoring_image_load_setting" webkit_settings_get_load_icons_ignoring_image_load_setting :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetLoadIconsIgnoringImageLoadSetting ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetLoadIconsIgnoringImageLoadSetting _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_load_icons_ignoring_image_load_setting _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_media_playback_allows_inline" webkit_settings_get_media_playback_allows_inline :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetMediaPlaybackAllowsInline ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetMediaPlaybackAllowsInline _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_media_playback_allows_inline _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_media_playback_requires_user_gesture" webkit_settings_get_media_playback_requires_user_gesture :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetMediaPlaybackRequiresUserGesture ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetMediaPlaybackRequiresUserGesture _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_media_playback_requires_user_gesture _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_minimum_font_size" webkit_settings_get_minimum_font_size :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO Word32


settingsGetMinimumFontSize ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Word32
settingsGetMinimumFontSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_minimum_font_size _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_settings_get_monospace_font_family" webkit_settings_get_monospace_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetMonospaceFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetMonospaceFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_monospace_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_monospace_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_pictograph_font_family" webkit_settings_get_pictograph_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetPictographFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetPictographFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_pictograph_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_pictograph_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_print_backgrounds" webkit_settings_get_print_backgrounds :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetPrintBackgrounds ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetPrintBackgrounds _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_print_backgrounds _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_sans_serif_font_family" webkit_settings_get_sans_serif_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetSansSerifFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetSansSerifFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_sans_serif_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_sans_serif_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_serif_font_family" webkit_settings_get_serif_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetSerifFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetSerifFontFamily _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_serif_font_family _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_serif_font_family" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_user_agent" webkit_settings_get_user_agent :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CString


settingsGetUserAgent ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m T.Text
settingsGetUserAgent _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_user_agent _obj'
    checkUnexpectedReturnNULL "webkit_settings_get_user_agent" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_get_zoom_text_only" webkit_settings_get_zoom_text_only :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    IO CInt


settingsGetZoomTextOnly ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    m Bool
settingsGetZoomTextOnly _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_settings_get_zoom_text_only _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_settings_set_allow_modal_dialogs" webkit_settings_set_allow_modal_dialogs :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- allowed : TBasicType TBoolean
    IO ()


settingsSetAllowModalDialogs ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- allowed
    m ()
settingsSetAllowModalDialogs _obj allowed = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let allowed' = (fromIntegral . fromEnum) allowed
    webkit_settings_set_allow_modal_dialogs _obj' allowed'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_auto_load_images" webkit_settings_set_auto_load_images :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetAutoLoadImages ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetAutoLoadImages _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_auto_load_images _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_cursive_font_family" webkit_settings_set_cursive_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- cursive_font_family : TBasicType TUTF8
    IO ()


settingsSetCursiveFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- cursive_font_family
    m ()
settingsSetCursiveFontFamily _obj cursive_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    cursive_font_family' <- textToCString cursive_font_family
    webkit_settings_set_cursive_font_family _obj' cursive_font_family'
    touchManagedPtr _obj
    freeMem cursive_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_default_charset" webkit_settings_set_default_charset :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- default_charset : TBasicType TUTF8
    IO ()


settingsSetDefaultCharset ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- default_charset
    m ()
settingsSetDefaultCharset _obj default_charset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    default_charset' <- textToCString default_charset
    webkit_settings_set_default_charset _obj' default_charset'
    touchManagedPtr _obj
    freeMem default_charset'
    return ()

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

foreign import ccall "webkit_settings_set_default_font_family" webkit_settings_set_default_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- default_font_family : TBasicType TUTF8
    IO ()


settingsSetDefaultFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- default_font_family
    m ()
settingsSetDefaultFontFamily _obj default_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    default_font_family' <- textToCString default_font_family
    webkit_settings_set_default_font_family _obj' default_font_family'
    touchManagedPtr _obj
    freeMem default_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_default_font_size" webkit_settings_set_default_font_size :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    Word32 ->                               -- font_size : TBasicType TUInt32
    IO ()


settingsSetDefaultFontSize ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- font_size
    m ()
settingsSetDefaultFontSize _obj font_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_settings_set_default_font_size _obj' font_size
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_default_monospace_font_size" webkit_settings_set_default_monospace_font_size :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    Word32 ->                               -- font_size : TBasicType TUInt32
    IO ()


settingsSetDefaultMonospaceFontSize ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- font_size
    m ()
settingsSetDefaultMonospaceFontSize _obj font_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_settings_set_default_monospace_font_size _obj' font_size
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_draw_compositing_indicators" webkit_settings_set_draw_compositing_indicators :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetDrawCompositingIndicators ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetDrawCompositingIndicators _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_draw_compositing_indicators _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_accelerated_2d_canvas" webkit_settings_set_enable_accelerated_2d_canvas :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableAccelerated2dCanvas ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableAccelerated2dCanvas _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_accelerated_2d_canvas _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_caret_browsing" webkit_settings_set_enable_caret_browsing :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableCaretBrowsing ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableCaretBrowsing _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_caret_browsing _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_developer_extras" webkit_settings_set_enable_developer_extras :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableDeveloperExtras ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableDeveloperExtras _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_developer_extras _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_dns_prefetching" webkit_settings_set_enable_dns_prefetching :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableDnsPrefetching ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableDnsPrefetching _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_dns_prefetching _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_frame_flattening" webkit_settings_set_enable_frame_flattening :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableFrameFlattening ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableFrameFlattening _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_frame_flattening _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_fullscreen" webkit_settings_set_enable_fullscreen :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableFullscreen ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableFullscreen _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_fullscreen _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_html5_database" webkit_settings_set_enable_html5_database :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableHtml5Database ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableHtml5Database _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_html5_database _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_html5_local_storage" webkit_settings_set_enable_html5_local_storage :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableHtml5LocalStorage ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableHtml5LocalStorage _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_html5_local_storage _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_hyperlink_auditing" webkit_settings_set_enable_hyperlink_auditing :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableHyperlinkAuditing ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableHyperlinkAuditing _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_hyperlink_auditing _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_java" webkit_settings_set_enable_java :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableJava ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableJava _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_java _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_javascript" webkit_settings_set_enable_javascript :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableJavascript ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableJavascript _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_javascript _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_media_stream" webkit_settings_set_enable_media_stream :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableMediaStream ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableMediaStream _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_media_stream _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_mediasource" webkit_settings_set_enable_mediasource :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableMediasource ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableMediasource _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_mediasource _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_offline_web_application_cache" webkit_settings_set_enable_offline_web_application_cache :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableOfflineWebApplicationCache ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableOfflineWebApplicationCache _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_offline_web_application_cache _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_page_cache" webkit_settings_set_enable_page_cache :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnablePageCache ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnablePageCache _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_page_cache _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_plugins" webkit_settings_set_enable_plugins :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnablePlugins ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnablePlugins _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_plugins _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_private_browsing" webkit_settings_set_enable_private_browsing :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnablePrivateBrowsing ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnablePrivateBrowsing _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_private_browsing _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_resizable_text_areas" webkit_settings_set_enable_resizable_text_areas :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableResizableTextAreas ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableResizableTextAreas _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_resizable_text_areas _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_site_specific_quirks" webkit_settings_set_enable_site_specific_quirks :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableSiteSpecificQuirks ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableSiteSpecificQuirks _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_site_specific_quirks _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_smooth_scrolling" webkit_settings_set_enable_smooth_scrolling :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableSmoothScrolling ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableSmoothScrolling _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_smooth_scrolling _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_spatial_navigation" webkit_settings_set_enable_spatial_navigation :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableSpatialNavigation ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableSpatialNavigation _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_spatial_navigation _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_tabs_to_links" webkit_settings_set_enable_tabs_to_links :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableTabsToLinks ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableTabsToLinks _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_tabs_to_links _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_webaudio" webkit_settings_set_enable_webaudio :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableWebaudio ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableWebaudio _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_webaudio _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_webgl" webkit_settings_set_enable_webgl :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableWebgl ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableWebgl _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_webgl _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_write_console_messages_to_stdout" webkit_settings_set_enable_write_console_messages_to_stdout :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableWriteConsoleMessagesToStdout ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableWriteConsoleMessagesToStdout _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_write_console_messages_to_stdout _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_enable_xss_auditor" webkit_settings_set_enable_xss_auditor :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetEnableXssAuditor ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetEnableXssAuditor _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_enable_xss_auditor _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_fantasy_font_family" webkit_settings_set_fantasy_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- fantasy_font_family : TBasicType TUTF8
    IO ()


settingsSetFantasyFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- fantasy_font_family
    m ()
settingsSetFantasyFontFamily _obj fantasy_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    fantasy_font_family' <- textToCString fantasy_font_family
    webkit_settings_set_fantasy_font_family _obj' fantasy_font_family'
    touchManagedPtr _obj
    freeMem fantasy_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_javascript_can_access_clipboard" webkit_settings_set_javascript_can_access_clipboard :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetJavascriptCanAccessClipboard ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetJavascriptCanAccessClipboard _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_javascript_can_access_clipboard _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_javascript_can_open_windows_automatically" webkit_settings_set_javascript_can_open_windows_automatically :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetJavascriptCanOpenWindowsAutomatically ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetJavascriptCanOpenWindowsAutomatically _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_javascript_can_open_windows_automatically _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_load_icons_ignoring_image_load_setting" webkit_settings_set_load_icons_ignoring_image_load_setting :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetLoadIconsIgnoringImageLoadSetting ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetLoadIconsIgnoringImageLoadSetting _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_load_icons_ignoring_image_load_setting _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_media_playback_allows_inline" webkit_settings_set_media_playback_allows_inline :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetMediaPlaybackAllowsInline ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetMediaPlaybackAllowsInline _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_media_playback_allows_inline _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_media_playback_requires_user_gesture" webkit_settings_set_media_playback_requires_user_gesture :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


settingsSetMediaPlaybackRequiresUserGesture ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
settingsSetMediaPlaybackRequiresUserGesture _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_settings_set_media_playback_requires_user_gesture _obj' enabled'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_minimum_font_size" webkit_settings_set_minimum_font_size :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    Word32 ->                               -- font_size : TBasicType TUInt32
    IO ()


settingsSetMinimumFontSize ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Word32 ->                               -- font_size
    m ()
settingsSetMinimumFontSize _obj font_size = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_settings_set_minimum_font_size _obj' font_size
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_monospace_font_family" webkit_settings_set_monospace_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- monospace_font_family : TBasicType TUTF8
    IO ()


settingsSetMonospaceFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- monospace_font_family
    m ()
settingsSetMonospaceFontFamily _obj monospace_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    monospace_font_family' <- textToCString monospace_font_family
    webkit_settings_set_monospace_font_family _obj' monospace_font_family'
    touchManagedPtr _obj
    freeMem monospace_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_pictograph_font_family" webkit_settings_set_pictograph_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- pictograph_font_family : TBasicType TUTF8
    IO ()


settingsSetPictographFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- pictograph_font_family
    m ()
settingsSetPictographFontFamily _obj pictograph_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    pictograph_font_family' <- textToCString pictograph_font_family
    webkit_settings_set_pictograph_font_family _obj' pictograph_font_family'
    touchManagedPtr _obj
    freeMem pictograph_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_print_backgrounds" webkit_settings_set_print_backgrounds :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- print_backgrounds : TBasicType TBoolean
    IO ()


settingsSetPrintBackgrounds ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- print_backgrounds
    m ()
settingsSetPrintBackgrounds _obj print_backgrounds = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let print_backgrounds' = (fromIntegral . fromEnum) print_backgrounds
    webkit_settings_set_print_backgrounds _obj' print_backgrounds'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_settings_set_sans_serif_font_family" webkit_settings_set_sans_serif_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- sans_serif_font_family : TBasicType TUTF8
    IO ()


settingsSetSansSerifFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- sans_serif_font_family
    m ()
settingsSetSansSerifFontFamily _obj sans_serif_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    sans_serif_font_family' <- textToCString sans_serif_font_family
    webkit_settings_set_sans_serif_font_family _obj' sans_serif_font_family'
    touchManagedPtr _obj
    freeMem sans_serif_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_serif_font_family" webkit_settings_set_serif_font_family :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- serif_font_family : TBasicType TUTF8
    IO ()


settingsSetSerifFontFamily ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- serif_font_family
    m ()
settingsSetSerifFontFamily _obj serif_font_family = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    serif_font_family' <- textToCString serif_font_family
    webkit_settings_set_serif_font_family _obj' serif_font_family'
    touchManagedPtr _obj
    freeMem serif_font_family'
    return ()

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

foreign import ccall "webkit_settings_set_user_agent" webkit_settings_set_user_agent :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- user_agent : TBasicType TUTF8
    IO ()


settingsSetUserAgent ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- user_agent
    m ()
settingsSetUserAgent _obj user_agent = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeUser_agent <- case user_agent of
        Nothing -> return nullPtr
        Just jUser_agent -> do
            jUser_agent' <- textToCString jUser_agent
            return jUser_agent'
    webkit_settings_set_user_agent _obj' maybeUser_agent
    touchManagedPtr _obj
    freeMem maybeUser_agent
    return ()

-- method Settings::set_user_agent_with_application_details
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application_version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "application_version", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_settings_set_user_agent_with_application_details" webkit_settings_set_user_agent_with_application_details :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CString ->                              -- application_name : TBasicType TUTF8
    CString ->                              -- application_version : TBasicType TUTF8
    IO ()


settingsSetUserAgentWithApplicationDetails ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- application_name
    Maybe (T.Text) ->                       -- application_version
    m ()
settingsSetUserAgentWithApplicationDetails _obj application_name application_version = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeApplication_name <- case application_name of
        Nothing -> return nullPtr
        Just jApplication_name -> do
            jApplication_name' <- textToCString jApplication_name
            return jApplication_name'
    maybeApplication_version <- case application_version of
        Nothing -> return nullPtr
        Just jApplication_version -> do
            jApplication_version' <- textToCString jApplication_version
            return jApplication_version'
    webkit_settings_set_user_agent_with_application_details _obj' maybeApplication_name maybeApplication_version
    touchManagedPtr _obj
    freeMem maybeApplication_name
    freeMem maybeApplication_version
    return ()

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

foreign import ccall "webkit_settings_set_zoom_text_only" webkit_settings_set_zoom_text_only :: 
    Ptr Settings ->                         -- _obj : TInterface "WebKit2" "Settings"
    CInt ->                                 -- zoom_text_only : TBasicType TBoolean
    IO ()


settingsSetZoomTextOnly ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- zoom_text_only
    m ()
settingsSetZoomTextOnly _obj zoom_text_only = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let zoom_text_only' = (fromIntegral . fromEnum) zoom_text_only
    webkit_settings_set_zoom_text_only _obj' zoom_text_only'
    touchManagedPtr _obj
    return ()

-- Enum SnapshotError

data SnapshotError = 
      SnapshotErrorCreate
    | AnotherSnapshotError Int
    deriving (Show, Eq)

instance Enum SnapshotError where
    fromEnum SnapshotErrorCreate = 799
    fromEnum (AnotherSnapshotError k) = k

    toEnum 799 = SnapshotErrorCreate
    toEnum k = AnotherSnapshotError k

instance GErrorClass SnapshotError where
    gerrorClassDomain _ = "WebKitSnapshotError"

catchSnapshotError ::
    IO a ->
    (SnapshotError -> GErrorMessage -> IO a) ->
    IO a
catchSnapshotError = catchGErrorJustDomain

handleSnapshotError ::
    (SnapshotError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleSnapshotError = handleGErrorJustDomain

foreign import ccall "webkit_snapshot_error_get_type" c_webkit_snapshot_error_get_type :: 
    IO GType

instance BoxedEnum SnapshotError where
    boxedEnumType _ = c_webkit_snapshot_error_get_type

-- Flags SnapshotOptions

data SnapshotOptions = 
      SnapshotOptionsNone
    | SnapshotOptionsIncludeSelectionHighlighting
    | SnapshotOptionsTransparentBackground
    | AnotherSnapshotOptions Int
    deriving (Show, Eq)

instance Enum SnapshotOptions where
    fromEnum SnapshotOptionsNone = 0
    fromEnum SnapshotOptionsIncludeSelectionHighlighting = 1
    fromEnum SnapshotOptionsTransparentBackground = 2
    fromEnum (AnotherSnapshotOptions k) = k

    toEnum 0 = SnapshotOptionsNone
    toEnum 1 = SnapshotOptionsIncludeSelectionHighlighting
    toEnum 2 = SnapshotOptionsTransparentBackground
    toEnum k = AnotherSnapshotOptions k

foreign import ccall "webkit_snapshot_options_get_type" c_webkit_snapshot_options_get_type :: 
    IO GType

instance BoxedEnum SnapshotOptions where
    boxedEnumType _ = c_webkit_snapshot_options_get_type

instance IsGFlag SnapshotOptions

-- Enum SnapshotRegion

data SnapshotRegion = 
      SnapshotRegionVisible
    | SnapshotRegionFullDocument
    | AnotherSnapshotRegion Int
    deriving (Show, Eq)

instance Enum SnapshotRegion where
    fromEnum SnapshotRegionVisible = 0
    fromEnum SnapshotRegionFullDocument = 1
    fromEnum (AnotherSnapshotRegion k) = k

    toEnum 0 = SnapshotRegionVisible
    toEnum 1 = SnapshotRegionFullDocument
    toEnum k = AnotherSnapshotRegion k

foreign import ccall "webkit_snapshot_region_get_type" c_webkit_snapshot_region_get_type :: 
    IO GType

instance BoxedEnum SnapshotRegion where
    boxedEnumType _ = c_webkit_snapshot_region_get_type

-- Enum TLSErrorsPolicy

data TLSErrorsPolicy = 
      TLSErrorsPolicyIgnore
    | TLSErrorsPolicyFail
    | AnotherTLSErrorsPolicy Int
    deriving (Show, Eq)

instance Enum TLSErrorsPolicy where
    fromEnum TLSErrorsPolicyIgnore = 0
    fromEnum TLSErrorsPolicyFail = 1
    fromEnum (AnotherTLSErrorsPolicy k) = k

    toEnum 0 = TLSErrorsPolicyIgnore
    toEnum 1 = TLSErrorsPolicyFail
    toEnum k = AnotherTLSErrorsPolicy k

foreign import ccall "webkit_tls_errors_policy_get_type" c_webkit_tls_errors_policy_get_type :: 
    IO GType

instance BoxedEnum TLSErrorsPolicy where
    boxedEnumType _ = c_webkit_tls_errors_policy_get_type

-- object URIRequest 
newtype URIRequest = URIRequest (ForeignPtr URIRequest)
noURIRequest :: Maybe URIRequest
noURIRequest = Nothing

foreign import ccall "webkit_uri_request_get_type"
    c_webkit_uri_request_get_type :: IO GType

type instance ParentTypes URIRequest = '[GObject.Object]

instance GObject URIRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_uri_request_get_type
    

class GObject o => URIRequestK o
instance (GObject o, IsDescendantOf URIRequest o) => URIRequestK o

toURIRequest :: URIRequestK o => o -> IO URIRequest
toURIRequest = unsafeCastTo URIRequest

-- method URIRequest::new
-- method type : Constructor
-- Args : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIRequest"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_uri_request_new" webkit_uri_request_new :: 
    CString ->                              -- uri : TBasicType TUTF8
    IO (Ptr URIRequest)


uRIRequestNew ::
    (MonadIO m) =>
    T.Text ->                               -- uri
    m URIRequest
uRIRequestNew uri = liftIO $ do
    uri' <- textToCString uri
    result <- webkit_uri_request_new uri'
    checkUnexpectedReturnNULL "webkit_uri_request_new" result
    result' <- (wrapObject URIRequest) result
    freeMem uri'
    return result'

-- method URIRequest::get_http_headers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URIRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URIRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Soup" "MessageHeaders"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_uri_request_get_http_headers" webkit_uri_request_get_http_headers :: 
    Ptr URIRequest ->                       -- _obj : TInterface "WebKit2" "URIRequest"
    IO (Ptr Soup.MessageHeaders)


uRIRequestGetHttpHeaders ::
    (MonadIO m, URIRequestK a) =>
    a ->                                    -- _obj
    m Soup.MessageHeaders
uRIRequestGetHttpHeaders _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_request_get_http_headers _obj'
    checkUnexpectedReturnNULL "webkit_uri_request_get_http_headers" result
    result' <- (newBoxed Soup.MessageHeaders) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_request_get_uri" webkit_uri_request_get_uri :: 
    Ptr URIRequest ->                       -- _obj : TInterface "WebKit2" "URIRequest"
    IO CString


uRIRequestGetUri ::
    (MonadIO m, URIRequestK a) =>
    a ->                                    -- _obj
    m T.Text
uRIRequestGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_request_get_uri _obj'
    checkUnexpectedReturnNULL "webkit_uri_request_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_request_set_uri" webkit_uri_request_set_uri :: 
    Ptr URIRequest ->                       -- _obj : TInterface "WebKit2" "URIRequest"
    CString ->                              -- uri : TBasicType TUTF8
    IO ()


uRIRequestSetUri ::
    (MonadIO m, URIRequestK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
uRIRequestSetUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    webkit_uri_request_set_uri _obj' uri'
    touchManagedPtr _obj
    freeMem uri'
    return ()

-- object URIResponse 
newtype URIResponse = URIResponse (ForeignPtr URIResponse)
noURIResponse :: Maybe URIResponse
noURIResponse = Nothing

foreign import ccall "webkit_uri_response_get_type"
    c_webkit_uri_response_get_type :: IO GType

type instance ParentTypes URIResponse = '[GObject.Object]

instance GObject URIResponse where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_uri_response_get_type
    

class GObject o => URIResponseK o
instance (GObject o, IsDescendantOf URIResponse o) => URIResponseK o

toURIResponse :: URIResponseK o => o -> IO URIResponse
toURIResponse = unsafeCastTo URIResponse

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

foreign import ccall "webkit_uri_response_get_content_length" webkit_uri_response_get_content_length :: 
    Ptr URIResponse ->                      -- _obj : TInterface "WebKit2" "URIResponse"
    IO Word64


uRIResponseGetContentLength ::
    (MonadIO m, URIResponseK a) =>
    a ->                                    -- _obj
    m Word64
uRIResponseGetContentLength _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_response_get_content_length _obj'
    touchManagedPtr _obj
    return result

-- method URIResponse::get_http_headers
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URIResponse", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URIResponse", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Soup" "MessageHeaders"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_uri_response_get_http_headers" webkit_uri_response_get_http_headers :: 
    Ptr URIResponse ->                      -- _obj : TInterface "WebKit2" "URIResponse"
    IO (Ptr Soup.MessageHeaders)


uRIResponseGetHttpHeaders ::
    (MonadIO m, URIResponseK a) =>
    a ->                                    -- _obj
    m Soup.MessageHeaders
uRIResponseGetHttpHeaders _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_response_get_http_headers _obj'
    checkUnexpectedReturnNULL "webkit_uri_response_get_http_headers" result
    result' <- (newBoxed Soup.MessageHeaders) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_response_get_mime_type" webkit_uri_response_get_mime_type :: 
    Ptr URIResponse ->                      -- _obj : TInterface "WebKit2" "URIResponse"
    IO CString


uRIResponseGetMimeType ::
    (MonadIO m, URIResponseK a) =>
    a ->                                    -- _obj
    m T.Text
uRIResponseGetMimeType _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_response_get_mime_type _obj'
    checkUnexpectedReturnNULL "webkit_uri_response_get_mime_type" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_response_get_status_code" webkit_uri_response_get_status_code :: 
    Ptr URIResponse ->                      -- _obj : TInterface "WebKit2" "URIResponse"
    IO Word32


uRIResponseGetStatusCode ::
    (MonadIO m, URIResponseK a) =>
    a ->                                    -- _obj
    m Word32
uRIResponseGetStatusCode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_response_get_status_code _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_uri_response_get_suggested_filename" webkit_uri_response_get_suggested_filename :: 
    Ptr URIResponse ->                      -- _obj : TInterface "WebKit2" "URIResponse"
    IO CString


uRIResponseGetSuggestedFilename ::
    (MonadIO m, URIResponseK a) =>
    a ->                                    -- _obj
    m T.Text
uRIResponseGetSuggestedFilename _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_response_get_suggested_filename _obj'
    checkUnexpectedReturnNULL "webkit_uri_response_get_suggested_filename" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_response_get_uri" webkit_uri_response_get_uri :: 
    Ptr URIResponse ->                      -- _obj : TInterface "WebKit2" "URIResponse"
    IO CString


uRIResponseGetUri ::
    (MonadIO m, URIResponseK a) =>
    a ->                                    -- _obj
    m T.Text
uRIResponseGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_response_get_uri _obj'
    checkUnexpectedReturnNULL "webkit_uri_response_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- object URISchemeRequest 
newtype URISchemeRequest = URISchemeRequest (ForeignPtr URISchemeRequest)
noURISchemeRequest :: Maybe URISchemeRequest
noURISchemeRequest = Nothing

foreign import ccall "webkit_uri_scheme_request_get_type"
    c_webkit_uri_scheme_request_get_type :: IO GType

type instance ParentTypes URISchemeRequest = '[GObject.Object]

instance GObject URISchemeRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_uri_scheme_request_get_type
    

class GObject o => URISchemeRequestK o
instance (GObject o, IsDescendantOf URISchemeRequest o) => URISchemeRequestK o

toURISchemeRequest :: URISchemeRequestK o => o -> IO URISchemeRequest
toURISchemeRequest = unsafeCastTo URISchemeRequest

-- method URISchemeRequest::finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URISchemeRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stream", argType = TInterface "Gio" "InputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stream_length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URISchemeRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stream", argType = TInterface "Gio" "InputStream", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "stream_length", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_uri_scheme_request_finish" webkit_uri_scheme_request_finish :: 
    Ptr URISchemeRequest ->                 -- _obj : TInterface "WebKit2" "URISchemeRequest"
    Ptr Gio.InputStream ->                  -- stream : TInterface "Gio" "InputStream"
    Int64 ->                                -- stream_length : TBasicType TInt64
    CString ->                              -- mime_type : TBasicType TUTF8
    IO ()


uRISchemeRequestFinish ::
    (MonadIO m, URISchemeRequestK a, Gio.InputStreamK b) =>
    a ->                                    -- _obj
    b ->                                    -- stream
    Int64 ->                                -- stream_length
    Maybe (T.Text) ->                       -- mime_type
    m ()
uRISchemeRequestFinish _obj stream stream_length mime_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let stream' = unsafeManagedPtrCastPtr stream
    maybeMime_type <- case mime_type of
        Nothing -> return nullPtr
        Just jMime_type -> do
            jMime_type' <- textToCString jMime_type
            return jMime_type'
    webkit_uri_scheme_request_finish _obj' stream' stream_length maybeMime_type
    touchManagedPtr _obj
    touchManagedPtr stream
    freeMem maybeMime_type
    return ()

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

foreign import ccall "webkit_uri_scheme_request_finish_error" webkit_uri_scheme_request_finish_error :: 
    Ptr URISchemeRequest ->                 -- _obj : TInterface "WebKit2" "URISchemeRequest"
    Ptr GError ->                           -- error : TError
    IO ()


uRISchemeRequestFinishError ::
    (MonadIO m, URISchemeRequestK a) =>
    a ->                                    -- _obj
    GError ->                               -- error
    m ()
uRISchemeRequestFinishError _obj error_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let error_' = unsafeManagedPtrGetPtr error_
    webkit_uri_scheme_request_finish_error _obj' error_'
    touchManagedPtr _obj
    touchManagedPtr error_
    return ()

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

foreign import ccall "webkit_uri_scheme_request_get_path" webkit_uri_scheme_request_get_path :: 
    Ptr URISchemeRequest ->                 -- _obj : TInterface "WebKit2" "URISchemeRequest"
    IO CString


uRISchemeRequestGetPath ::
    (MonadIO m, URISchemeRequestK a) =>
    a ->                                    -- _obj
    m T.Text
uRISchemeRequestGetPath _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_scheme_request_get_path _obj'
    checkUnexpectedReturnNULL "webkit_uri_scheme_request_get_path" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_scheme_request_get_scheme" webkit_uri_scheme_request_get_scheme :: 
    Ptr URISchemeRequest ->                 -- _obj : TInterface "WebKit2" "URISchemeRequest"
    IO CString


uRISchemeRequestGetScheme ::
    (MonadIO m, URISchemeRequestK a) =>
    a ->                                    -- _obj
    m T.Text
uRISchemeRequestGetScheme _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_scheme_request_get_scheme _obj'
    checkUnexpectedReturnNULL "webkit_uri_scheme_request_get_scheme" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_uri_scheme_request_get_uri" webkit_uri_scheme_request_get_uri :: 
    Ptr URISchemeRequest ->                 -- _obj : TInterface "WebKit2" "URISchemeRequest"
    IO CString


uRISchemeRequestGetUri ::
    (MonadIO m, URISchemeRequestK a) =>
    a ->                                    -- _obj
    m T.Text
uRISchemeRequestGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_scheme_request_get_uri _obj'
    checkUnexpectedReturnNULL "webkit_uri_scheme_request_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method URISchemeRequest::get_web_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URISchemeRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "URISchemeRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_uri_scheme_request_get_web_view" webkit_uri_scheme_request_get_web_view :: 
    Ptr URISchemeRequest ->                 -- _obj : TInterface "WebKit2" "URISchemeRequest"
    IO (Ptr WebView)


uRISchemeRequestGetWebView ::
    (MonadIO m, URISchemeRequestK a) =>
    a ->                                    -- _obj
    m WebView
uRISchemeRequestGetWebView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_uri_scheme_request_get_web_view _obj'
    checkUnexpectedReturnNULL "webkit_uri_scheme_request_get_web_view" result
    result' <- (newObject WebView) result
    touchManagedPtr _obj
    return result'

-- callback URISchemeRequestCallback
uRISchemeRequestCallbackClosure :: URISchemeRequestCallback -> IO Closure
uRISchemeRequestCallbackClosure cb = newCClosure =<< mkURISchemeRequestCallback wrapped
    where wrapped = uRISchemeRequestCallbackWrapper Nothing cb

type URISchemeRequestCallbackC =
    Ptr URISchemeRequest ->
    Ptr () ->
    IO ()

foreign import ccall "wrapper"
    mkURISchemeRequestCallback :: URISchemeRequestCallbackC -> IO (FunPtr URISchemeRequestCallbackC)

type URISchemeRequestCallback =
    URISchemeRequest ->
    IO ()

noURISchemeRequestCallback :: Maybe URISchemeRequestCallback
noURISchemeRequestCallback = Nothing

uRISchemeRequestCallbackWrapper ::
    Maybe (Ptr (FunPtr (URISchemeRequestCallbackC))) ->
    URISchemeRequestCallback ->
    Ptr URISchemeRequest ->
    Ptr () ->
    IO ()
uRISchemeRequestCallbackWrapper funptrptr _cb request _ = do
    request' <- (newObject URISchemeRequest) request
    _cb  request'
    maybeReleaseFunPtr funptrptr

-- Enum UserContentInjectedFrames

data UserContentInjectedFrames = 
      UserContentInjectedFramesAllFrames
    | UserContentInjectedFramesTopFrame
    | AnotherUserContentInjectedFrames Int
    deriving (Show, Eq)

instance Enum UserContentInjectedFrames where
    fromEnum UserContentInjectedFramesAllFrames = 0
    fromEnum UserContentInjectedFramesTopFrame = 1
    fromEnum (AnotherUserContentInjectedFrames k) = k

    toEnum 0 = UserContentInjectedFramesAllFrames
    toEnum 1 = UserContentInjectedFramesTopFrame
    toEnum k = AnotherUserContentInjectedFrames k

foreign import ccall "webkit_user_content_injected_frames_get_type" c_webkit_user_content_injected_frames_get_type :: 
    IO GType

instance BoxedEnum UserContentInjectedFrames where
    boxedEnumType _ = c_webkit_user_content_injected_frames_get_type

-- object UserContentManager 
newtype UserContentManager = UserContentManager (ForeignPtr UserContentManager)
noUserContentManager :: Maybe UserContentManager
noUserContentManager = Nothing

foreign import ccall "webkit_user_content_manager_get_type"
    c_webkit_user_content_manager_get_type :: IO GType

type instance ParentTypes UserContentManager = '[GObject.Object]

instance GObject UserContentManager where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_user_content_manager_get_type
    

class GObject o => UserContentManagerK o
instance (GObject o, IsDescendantOf UserContentManager o) => UserContentManagerK o

toUserContentManager :: UserContentManagerK o => o -> IO UserContentManager
toUserContentManager = unsafeCastTo UserContentManager

-- method UserContentManager::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "UserContentManager"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_user_content_manager_new" webkit_user_content_manager_new :: 
    IO (Ptr UserContentManager)


userContentManagerNew ::
    (MonadIO m) =>
    m UserContentManager
userContentManagerNew  = liftIO $ do
    result <- webkit_user_content_manager_new
    checkUnexpectedReturnNULL "webkit_user_content_manager_new" result
    result' <- (wrapObject UserContentManager) result
    return result'

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

foreign import ccall "webkit_user_content_manager_add_script" webkit_user_content_manager_add_script :: 
    Ptr UserContentManager ->               -- _obj : TInterface "WebKit2" "UserContentManager"
    Ptr UserScript ->                       -- script : TInterface "WebKit2" "UserScript"
    IO ()


userContentManagerAddScript ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- _obj
    UserScript ->                           -- script
    m ()
userContentManagerAddScript _obj script = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let script' = unsafeManagedPtrGetPtr script
    webkit_user_content_manager_add_script _obj' script'
    touchManagedPtr _obj
    touchManagedPtr script
    return ()

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

foreign import ccall "webkit_user_content_manager_add_style_sheet" webkit_user_content_manager_add_style_sheet :: 
    Ptr UserContentManager ->               -- _obj : TInterface "WebKit2" "UserContentManager"
    Ptr UserStyleSheet ->                   -- stylesheet : TInterface "WebKit2" "UserStyleSheet"
    IO ()


userContentManagerAddStyleSheet ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- _obj
    UserStyleSheet ->                       -- stylesheet
    m ()
userContentManagerAddStyleSheet _obj stylesheet = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let stylesheet' = unsafeManagedPtrGetPtr stylesheet
    webkit_user_content_manager_add_style_sheet _obj' stylesheet'
    touchManagedPtr _obj
    touchManagedPtr stylesheet
    return ()

-- method UserContentManager::register_script_message_handler
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "UserContentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "UserContentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_user_content_manager_register_script_message_handler" webkit_user_content_manager_register_script_message_handler :: 
    Ptr UserContentManager ->               -- _obj : TInterface "WebKit2" "UserContentManager"
    CString ->                              -- name : TBasicType TUTF8
    IO CInt


userContentManagerRegisterScriptMessageHandler ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m Bool
userContentManagerRegisterScriptMessageHandler _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    result <- webkit_user_content_manager_register_script_message_handler _obj' name'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem name'
    return result'

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

foreign import ccall "webkit_user_content_manager_remove_all_scripts" webkit_user_content_manager_remove_all_scripts :: 
    Ptr UserContentManager ->               -- _obj : TInterface "WebKit2" "UserContentManager"
    IO ()


userContentManagerRemoveAllScripts ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- _obj
    m ()
userContentManagerRemoveAllScripts _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_user_content_manager_remove_all_scripts _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_user_content_manager_remove_all_style_sheets" webkit_user_content_manager_remove_all_style_sheets :: 
    Ptr UserContentManager ->               -- _obj : TInterface "WebKit2" "UserContentManager"
    IO ()


userContentManagerRemoveAllStyleSheets ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- _obj
    m ()
userContentManagerRemoveAllStyleSheets _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_user_content_manager_remove_all_style_sheets _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_user_content_manager_unregister_script_message_handler" webkit_user_content_manager_unregister_script_message_handler :: 
    Ptr UserContentManager ->               -- _obj : TInterface "WebKit2" "UserContentManager"
    CString ->                              -- name : TBasicType TUTF8
    IO ()


userContentManagerUnregisterScriptMessageHandler ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- name
    m ()
userContentManagerUnregisterScriptMessageHandler _obj name = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    name' <- textToCString name
    webkit_user_content_manager_unregister_script_message_handler _obj' name'
    touchManagedPtr _obj
    freeMem name'
    return ()

-- signal UserContentManager::script-message-received
type UserContentManagerScriptMessageReceivedCallback =
    JavascriptResult ->
    IO ()

noUserContentManagerScriptMessageReceivedCallback :: Maybe UserContentManagerScriptMessageReceivedCallback
noUserContentManagerScriptMessageReceivedCallback = Nothing

type UserContentManagerScriptMessageReceivedCallbackC =
    Ptr () ->                               -- object
    Ptr JavascriptResult ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkUserContentManagerScriptMessageReceivedCallback :: UserContentManagerScriptMessageReceivedCallbackC -> IO (FunPtr UserContentManagerScriptMessageReceivedCallbackC)

userContentManagerScriptMessageReceivedClosure :: UserContentManagerScriptMessageReceivedCallback -> IO Closure
userContentManagerScriptMessageReceivedClosure cb = newCClosure =<< mkUserContentManagerScriptMessageReceivedCallback wrapped
    where wrapped = userContentManagerScriptMessageReceivedCallbackWrapper cb

userContentManagerScriptMessageReceivedCallbackWrapper ::
    UserContentManagerScriptMessageReceivedCallback ->
    Ptr () ->
    Ptr JavascriptResult ->
    Ptr () ->
    IO ()
userContentManagerScriptMessageReceivedCallbackWrapper _cb _ js_result _ = do
    js_result' <- (newBoxed JavascriptResult) js_result
    _cb  js_result'

onUserContentManagerScriptMessageReceived :: (GObject a, MonadIO m) => a -> UserContentManagerScriptMessageReceivedCallback -> m SignalHandlerId
onUserContentManagerScriptMessageReceived obj cb = liftIO $ connectUserContentManagerScriptMessageReceived obj cb SignalConnectBefore
afterUserContentManagerScriptMessageReceived :: (GObject a, MonadIO m) => a -> UserContentManagerScriptMessageReceivedCallback -> m SignalHandlerId
afterUserContentManagerScriptMessageReceived obj cb = connectUserContentManagerScriptMessageReceived obj cb SignalConnectAfter

connectUserContentManagerScriptMessageReceived :: (GObject a, MonadIO m) =>
                                                  a -> UserContentManagerScriptMessageReceivedCallback -> SignalConnectMode -> m SignalHandlerId
connectUserContentManagerScriptMessageReceived obj cb after = liftIO $ do
    cb' <- mkUserContentManagerScriptMessageReceivedCallback (userContentManagerScriptMessageReceivedCallbackWrapper cb)
    connectSignalFunPtr obj "script-message-received" cb' after

-- object UserMediaPermissionRequest 
newtype UserMediaPermissionRequest = UserMediaPermissionRequest (ForeignPtr UserMediaPermissionRequest)
noUserMediaPermissionRequest :: Maybe UserMediaPermissionRequest
noUserMediaPermissionRequest = Nothing

foreign import ccall "webkit_user_media_permission_request_get_type"
    c_webkit_user_media_permission_request_get_type :: IO GType

type instance ParentTypes UserMediaPermissionRequest = '[GObject.Object, PermissionRequest]

instance GObject UserMediaPermissionRequest where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_user_media_permission_request_get_type
    

class GObject o => UserMediaPermissionRequestK o
instance (GObject o, IsDescendantOf UserMediaPermissionRequest o) => UserMediaPermissionRequestK o

toUserMediaPermissionRequest :: UserMediaPermissionRequestK o => o -> IO UserMediaPermissionRequest
toUserMediaPermissionRequest = unsafeCastTo UserMediaPermissionRequest

-- struct UserScript
newtype UserScript = UserScript (ForeignPtr UserScript)
noUserScript :: Maybe UserScript
noUserScript = Nothing

foreign import ccall "webkit_user_script_get_type" c_webkit_user_script_get_type :: 
    IO GType

instance BoxedObject UserScript where
    boxedType _ = c_webkit_user_script_get_type

-- method UserScript::new
-- method type : Constructor
-- Args : [Arg {argName = "source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "injected_frames", argType = TInterface "WebKit2" "UserContentInjectedFrames", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "injection_time", argType = TInterface "WebKit2" "UserScriptInjectionTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "whitelist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blacklist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "injected_frames", argType = TInterface "WebKit2" "UserContentInjectedFrames", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "injection_time", argType = TInterface "WebKit2" "UserScriptInjectionTime", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "whitelist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blacklist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "UserScript"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_user_script_new" webkit_user_script_new :: 
    CString ->                              -- source : TBasicType TUTF8
    CUInt ->                                -- injected_frames : TInterface "WebKit2" "UserContentInjectedFrames"
    CUInt ->                                -- injection_time : TInterface "WebKit2" "UserScriptInjectionTime"
    Ptr CString ->                          -- whitelist : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr CString ->                          -- blacklist : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO (Ptr UserScript)


userScriptNew ::
    (MonadIO m) =>
    T.Text ->                               -- source
    UserContentInjectedFrames ->            -- injected_frames
    UserScriptInjectionTime ->              -- injection_time
    Maybe ([T.Text]) ->                     -- whitelist
    Maybe ([T.Text]) ->                     -- blacklist
    m UserScript
userScriptNew source injected_frames injection_time whitelist blacklist = liftIO $ do
    source' <- textToCString source
    let injected_frames' = (fromIntegral . fromEnum) injected_frames
    let injection_time' = (fromIntegral . fromEnum) injection_time
    maybeWhitelist <- case whitelist of
        Nothing -> return nullPtr
        Just jWhitelist -> do
            jWhitelist' <- packZeroTerminatedUTF8CArray jWhitelist
            return jWhitelist'
    maybeBlacklist <- case blacklist of
        Nothing -> return nullPtr
        Just jBlacklist -> do
            jBlacklist' <- packZeroTerminatedUTF8CArray jBlacklist
            return jBlacklist'
    result <- webkit_user_script_new source' injected_frames' injection_time' maybeWhitelist maybeBlacklist
    checkUnexpectedReturnNULL "webkit_user_script_new" result
    result' <- (wrapBoxed UserScript) result
    freeMem source'
    mapZeroTerminatedCArray freeMem maybeWhitelist
    freeMem maybeWhitelist
    mapZeroTerminatedCArray freeMem maybeBlacklist
    freeMem maybeBlacklist
    return result'

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

foreign import ccall "webkit_user_script_ref" webkit_user_script_ref :: 
    Ptr UserScript ->                       -- _obj : TInterface "WebKit2" "UserScript"
    IO (Ptr UserScript)


userScriptRef ::
    (MonadIO m) =>
    UserScript ->                           -- _obj
    m UserScript
userScriptRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_user_script_ref _obj'
    checkUnexpectedReturnNULL "webkit_user_script_ref" result
    result' <- (wrapBoxed UserScript) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_user_script_unref" webkit_user_script_unref :: 
    Ptr UserScript ->                       -- _obj : TInterface "WebKit2" "UserScript"
    IO ()


userScriptUnref ::
    (MonadIO m) =>
    UserScript ->                           -- _obj
    m ()
userScriptUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    webkit_user_script_unref _obj'
    touchManagedPtr _obj
    return ()

-- Enum UserScriptInjectionTime

data UserScriptInjectionTime = 
      UserScriptInjectionTimeStart
    | UserScriptInjectionTimeEnd
    | AnotherUserScriptInjectionTime Int
    deriving (Show, Eq)

instance Enum UserScriptInjectionTime where
    fromEnum UserScriptInjectionTimeStart = 0
    fromEnum UserScriptInjectionTimeEnd = 1
    fromEnum (AnotherUserScriptInjectionTime k) = k

    toEnum 0 = UserScriptInjectionTimeStart
    toEnum 1 = UserScriptInjectionTimeEnd
    toEnum k = AnotherUserScriptInjectionTime k

foreign import ccall "webkit_user_script_injection_time_get_type" c_webkit_user_script_injection_time_get_type :: 
    IO GType

instance BoxedEnum UserScriptInjectionTime where
    boxedEnumType _ = c_webkit_user_script_injection_time_get_type

-- Enum UserStyleLevel

data UserStyleLevel = 
      UserStyleLevelUser
    | UserStyleLevelAuthor
    | AnotherUserStyleLevel Int
    deriving (Show, Eq)

instance Enum UserStyleLevel where
    fromEnum UserStyleLevelUser = 0
    fromEnum UserStyleLevelAuthor = 1
    fromEnum (AnotherUserStyleLevel k) = k

    toEnum 0 = UserStyleLevelUser
    toEnum 1 = UserStyleLevelAuthor
    toEnum k = AnotherUserStyleLevel k

foreign import ccall "webkit_user_style_level_get_type" c_webkit_user_style_level_get_type :: 
    IO GType

instance BoxedEnum UserStyleLevel where
    boxedEnumType _ = c_webkit_user_style_level_get_type

-- struct UserStyleSheet
newtype UserStyleSheet = UserStyleSheet (ForeignPtr UserStyleSheet)
noUserStyleSheet :: Maybe UserStyleSheet
noUserStyleSheet = Nothing

foreign import ccall "webkit_user_style_sheet_get_type" c_webkit_user_style_sheet_get_type :: 
    IO GType

instance BoxedObject UserStyleSheet where
    boxedType _ = c_webkit_user_style_sheet_get_type

-- method UserStyleSheet::new
-- method type : Constructor
-- Args : [Arg {argName = "source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "injected_frames", argType = TInterface "WebKit2" "UserContentInjectedFrames", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "level", argType = TInterface "WebKit2" "UserStyleLevel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "whitelist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blacklist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "source", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "injected_frames", argType = TInterface "WebKit2" "UserContentInjectedFrames", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "level", argType = TInterface "WebKit2" "UserStyleLevel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "whitelist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blacklist", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "UserStyleSheet"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_user_style_sheet_new" webkit_user_style_sheet_new :: 
    CString ->                              -- source : TBasicType TUTF8
    CUInt ->                                -- injected_frames : TInterface "WebKit2" "UserContentInjectedFrames"
    CUInt ->                                -- level : TInterface "WebKit2" "UserStyleLevel"
    Ptr CString ->                          -- whitelist : TCArray True (-1) (-1) (TBasicType TUTF8)
    Ptr CString ->                          -- blacklist : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO (Ptr UserStyleSheet)


userStyleSheetNew ::
    (MonadIO m) =>
    T.Text ->                               -- source
    UserContentInjectedFrames ->            -- injected_frames
    UserStyleLevel ->                       -- level
    Maybe ([T.Text]) ->                     -- whitelist
    Maybe ([T.Text]) ->                     -- blacklist
    m UserStyleSheet
userStyleSheetNew source injected_frames level whitelist blacklist = liftIO $ do
    source' <- textToCString source
    let injected_frames' = (fromIntegral . fromEnum) injected_frames
    let level' = (fromIntegral . fromEnum) level
    maybeWhitelist <- case whitelist of
        Nothing -> return nullPtr
        Just jWhitelist -> do
            jWhitelist' <- packZeroTerminatedUTF8CArray jWhitelist
            return jWhitelist'
    maybeBlacklist <- case blacklist of
        Nothing -> return nullPtr
        Just jBlacklist -> do
            jBlacklist' <- packZeroTerminatedUTF8CArray jBlacklist
            return jBlacklist'
    result <- webkit_user_style_sheet_new source' injected_frames' level' maybeWhitelist maybeBlacklist
    checkUnexpectedReturnNULL "webkit_user_style_sheet_new" result
    result' <- (wrapBoxed UserStyleSheet) result
    freeMem source'
    mapZeroTerminatedCArray freeMem maybeWhitelist
    freeMem maybeWhitelist
    mapZeroTerminatedCArray freeMem maybeBlacklist
    freeMem maybeBlacklist
    return result'

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

foreign import ccall "webkit_user_style_sheet_ref" webkit_user_style_sheet_ref :: 
    Ptr UserStyleSheet ->                   -- _obj : TInterface "WebKit2" "UserStyleSheet"
    IO (Ptr UserStyleSheet)


userStyleSheetRef ::
    (MonadIO m) =>
    UserStyleSheet ->                       -- _obj
    m UserStyleSheet
userStyleSheetRef _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    result <- webkit_user_style_sheet_ref _obj'
    checkUnexpectedReturnNULL "webkit_user_style_sheet_ref" result
    result' <- (wrapBoxed UserStyleSheet) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_user_style_sheet_unref" webkit_user_style_sheet_unref :: 
    Ptr UserStyleSheet ->                   -- _obj : TInterface "WebKit2" "UserStyleSheet"
    IO ()


userStyleSheetUnref ::
    (MonadIO m) =>
    UserStyleSheet ->                       -- _obj
    m ()
userStyleSheetUnref _obj = liftIO $ do
    let _obj' = unsafeManagedPtrGetPtr _obj
    webkit_user_style_sheet_unref _obj'
    touchManagedPtr _obj
    return ()

-- object WebContext 
newtype WebContext = WebContext (ForeignPtr WebContext)
noWebContext :: Maybe WebContext
noWebContext = Nothing

foreign import ccall "webkit_web_context_get_type"
    c_webkit_web_context_get_type :: IO GType

type instance ParentTypes WebContext = '[GObject.Object]

instance GObject WebContext where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_web_context_get_type
    

class GObject o => WebContextK o
instance (GObject o, IsDescendantOf WebContext o) => WebContextK o

toWebContext :: WebContextK o => o -> IO WebContext
toWebContext = unsafeCastTo WebContext

-- method WebContext::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "WebContext"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_new" webkit_web_context_new :: 
    IO (Ptr WebContext)


webContextNew ::
    (MonadIO m) =>
    m WebContext
webContextNew  = liftIO $ do
    result <- webkit_web_context_new
    checkUnexpectedReturnNULL "webkit_web_context_new" result
    result' <- (wrapObject WebContext) result
    return result'

-- method WebContext::allow_tls_certificate_for_host
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "certificate", argType = TInterface "Gio" "TlsCertificate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "host", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "certificate", argType = TInterface "Gio" "TlsCertificate", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "host", argType = TBasicType TUTF8, 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_context_allow_tls_certificate_for_host" webkit_web_context_allow_tls_certificate_for_host :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    Ptr Gio.TlsCertificate ->               -- certificate : TInterface "Gio" "TlsCertificate"
    CString ->                              -- host : TBasicType TUTF8
    IO ()


webContextAllowTlsCertificateForHost ::
    (MonadIO m, WebContextK a, Gio.TlsCertificateK b) =>
    a ->                                    -- _obj
    b ->                                    -- certificate
    T.Text ->                               -- host
    m ()
webContextAllowTlsCertificateForHost _obj certificate host = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let certificate' = unsafeManagedPtrCastPtr certificate
    host' <- textToCString host
    webkit_web_context_allow_tls_certificate_for_host _obj' certificate' host'
    touchManagedPtr _obj
    touchManagedPtr certificate
    freeMem host'
    return ()

-- method WebContext::clear_cache
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", 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_context_clear_cache" webkit_web_context_clear_cache :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO ()


webContextClearCache ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m ()
webContextClearCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_context_clear_cache _obj'
    touchManagedPtr _obj
    return ()

-- method WebContext::download_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "Download"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_download_uri" webkit_web_context_download_uri :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- uri : TBasicType TUTF8
    IO (Ptr Download)


webContextDownloadUri ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Download
webContextDownloadUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- webkit_web_context_download_uri _obj' uri'
    checkUnexpectedReturnNULL "webkit_web_context_download_uri" result
    result' <- (wrapObject Download) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method WebContext::get_cache_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "CacheModel"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_cache_model" webkit_web_context_get_cache_model :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO CUInt


webContextGetCacheModel ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m CacheModel
webContextGetCacheModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_cache_model _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method WebContext::get_cookie_manager
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "CookieManager"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_cookie_manager" webkit_web_context_get_cookie_manager :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO (Ptr CookieManager)


webContextGetCookieManager ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m CookieManager
webContextGetCookieManager _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_cookie_manager _obj'
    checkUnexpectedReturnNULL "webkit_web_context_get_cookie_manager" result
    result' <- (newObject CookieManager) result
    touchManagedPtr _obj
    return result'

-- method WebContext::get_favicon_database
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "FaviconDatabase"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_favicon_database" webkit_web_context_get_favicon_database :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO (Ptr FaviconDatabase)


webContextGetFaviconDatabase ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m FaviconDatabase
webContextGetFaviconDatabase _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_favicon_database _obj'
    checkUnexpectedReturnNULL "webkit_web_context_get_favicon_database" result
    result' <- (newObject FaviconDatabase) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_context_get_favicon_database_directory" webkit_web_context_get_favicon_database_directory :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO CString


webContextGetFaviconDatabaseDirectory ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m T.Text
webContextGetFaviconDatabaseDirectory _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_favicon_database_directory _obj'
    checkUnexpectedReturnNULL "webkit_web_context_get_favicon_database_directory" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method WebContext::get_plugins
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_plugins" webkit_web_context_get_plugins :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webContextGetPlugins ::
    (MonadIO m, WebContextK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webContextGetPlugins _obj cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_context_get_plugins _obj' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method WebContext::get_plugins_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TGList (TInterface "WebKit2" "Plugin")
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_context_get_plugins_finish" webkit_web_context_get_plugins_finish :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr (GList (Ptr Plugin)))


webContextGetPluginsFinish ::
    (MonadIO m, WebContextK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m [Plugin]
webContextGetPluginsFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_web_context_get_plugins_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_web_context_get_plugins_finish" result
        result' <- unpackGList result
        result'' <- mapM (wrapObject Plugin) result'
        g_list_free result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result''
     ) (do
        return ()
     )

-- method WebContext::get_process_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "ProcessModel"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_process_model" webkit_web_context_get_process_model :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO CUInt


webContextGetProcessModel ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m ProcessModel
webContextGetProcessModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_process_model _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method WebContext::get_security_manager
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "SecurityManager"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_security_manager" webkit_web_context_get_security_manager :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO (Ptr SecurityManager)


webContextGetSecurityManager ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m SecurityManager
webContextGetSecurityManager _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_security_manager _obj'
    checkUnexpectedReturnNULL "webkit_web_context_get_security_manager" result
    result' <- (newObject SecurityManager) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_context_get_spell_checking_enabled" webkit_web_context_get_spell_checking_enabled :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO CInt


webContextGetSpellCheckingEnabled ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m Bool
webContextGetSpellCheckingEnabled _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_spell_checking_enabled _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WebContext::get_spell_checking_languages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) (-1) (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_spell_checking_languages" webkit_web_context_get_spell_checking_languages :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO (Ptr CString)


webContextGetSpellCheckingLanguages ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m [T.Text]
webContextGetSpellCheckingLanguages _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_spell_checking_languages _obj'
    checkUnexpectedReturnNULL "webkit_web_context_get_spell_checking_languages" result
    result' <- unpackZeroTerminatedUTF8CArray result
    touchManagedPtr _obj
    return result'

-- method WebContext::get_tls_errors_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "TLSErrorsPolicy"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_tls_errors_policy" webkit_web_context_get_tls_errors_policy :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    IO CUInt


webContextGetTlsErrorsPolicy ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    m TLSErrorsPolicy
webContextGetTlsErrorsPolicy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_context_get_tls_errors_policy _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method WebContext::prefetch_dns
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "hostname", argType = TBasicType TUTF8, 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_context_prefetch_dns" webkit_web_context_prefetch_dns :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- hostname : TBasicType TUTF8
    IO ()


webContextPrefetchDns ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- hostname
    m ()
webContextPrefetchDns _obj hostname = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    hostname' <- textToCString hostname
    webkit_web_context_prefetch_dns _obj' hostname'
    touchManagedPtr _obj
    freeMem hostname'
    return ()

-- method WebContext::register_uri_scheme
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "WebKit2" "URISchemeRequestCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data_destroy_func", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "scheme", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "WebKit2" "URISchemeRequestCallback", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 3, argDestroy = 4, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_register_uri_scheme" webkit_web_context_register_uri_scheme :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- scheme : TBasicType TUTF8
    FunPtr URISchemeRequestCallbackC ->     -- callback : TInterface "WebKit2" "URISchemeRequestCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- user_data_destroy_func : TInterface "GLib" "DestroyNotify"
    IO ()


webContextRegisterUriScheme ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- scheme
    URISchemeRequestCallback ->             -- callback
    m ()
webContextRegisterUriScheme _obj scheme callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    scheme' <- textToCString scheme
    callback' <- mkURISchemeRequestCallback (uRISchemeRequestCallbackWrapper Nothing callback)
    let user_data = castFunPtrToPtr callback'
    let user_data_destroy_func = safeFreeFunPtrPtr
    webkit_web_context_register_uri_scheme _obj' scheme' callback' user_data user_data_destroy_func
    touchManagedPtr _obj
    freeMem scheme'
    return ()

-- method WebContext::set_additional_plugins_directory
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "directory", argType = TBasicType TUTF8, 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_context_set_additional_plugins_directory" webkit_web_context_set_additional_plugins_directory :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- directory : TBasicType TUTF8
    IO ()


webContextSetAdditionalPluginsDirectory ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- directory
    m ()
webContextSetAdditionalPluginsDirectory _obj directory = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    directory' <- textToCString directory
    webkit_web_context_set_additional_plugins_directory _obj' directory'
    touchManagedPtr _obj
    freeMem directory'
    return ()

-- method WebContext::set_cache_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cache_model", argType = TInterface "WebKit2" "CacheModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cache_model", argType = TInterface "WebKit2" "CacheModel", 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_context_set_cache_model" webkit_web_context_set_cache_model :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CUInt ->                                -- cache_model : TInterface "WebKit2" "CacheModel"
    IO ()


webContextSetCacheModel ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    CacheModel ->                           -- cache_model
    m ()
webContextSetCacheModel _obj cache_model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let cache_model' = (fromIntegral . fromEnum) cache_model
    webkit_web_context_set_cache_model _obj' cache_model'
    touchManagedPtr _obj
    return ()

-- method WebContext::set_disk_cache_directory
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "directory", argType = TBasicType TUTF8, 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_context_set_disk_cache_directory" webkit_web_context_set_disk_cache_directory :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- directory : TBasicType TUTF8
    IO ()


webContextSetDiskCacheDirectory ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- directory
    m ()
webContextSetDiskCacheDirectory _obj directory = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    directory' <- textToCString directory
    webkit_web_context_set_disk_cache_directory _obj' directory'
    touchManagedPtr _obj
    freeMem directory'
    return ()

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

foreign import ccall "webkit_web_context_set_favicon_database_directory" webkit_web_context_set_favicon_database_directory :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- path : TBasicType TUTF8
    IO ()


webContextSetFaviconDatabaseDirectory ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- path
    m ()
webContextSetFaviconDatabaseDirectory _obj path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybePath <- case path of
        Nothing -> return nullPtr
        Just jPath -> do
            jPath' <- textToCString jPath
            return jPath'
    webkit_web_context_set_favicon_database_directory _obj' maybePath
    touchManagedPtr _obj
    freeMem maybePath
    return ()

-- method WebContext::set_preferred_languages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "languages", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "languages", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_set_preferred_languages" webkit_web_context_set_preferred_languages :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    Ptr CString ->                          -- languages : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


webContextSetPreferredLanguages ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    Maybe ([T.Text]) ->                     -- languages
    m ()
webContextSetPreferredLanguages _obj languages = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeLanguages <- case languages of
        Nothing -> return nullPtr
        Just jLanguages -> do
            jLanguages' <- packZeroTerminatedUTF8CArray jLanguages
            return jLanguages'
    webkit_web_context_set_preferred_languages _obj' maybeLanguages
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem maybeLanguages
    freeMem maybeLanguages
    return ()

-- method WebContext::set_process_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "process_model", argType = TInterface "WebKit2" "ProcessModel", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "process_model", argType = TInterface "WebKit2" "ProcessModel", 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_context_set_process_model" webkit_web_context_set_process_model :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CUInt ->                                -- process_model : TInterface "WebKit2" "ProcessModel"
    IO ()


webContextSetProcessModel ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    ProcessModel ->                         -- process_model
    m ()
webContextSetProcessModel _obj process_model = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let process_model' = (fromIntegral . fromEnum) process_model
    webkit_web_context_set_process_model _obj' process_model'
    touchManagedPtr _obj
    return ()

-- method WebContext::set_spell_checking_enabled
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "enabled", argType = TBasicType TBoolean, 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_context_set_spell_checking_enabled" webkit_web_context_set_spell_checking_enabled :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()


webContextSetSpellCheckingEnabled ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- enabled
    m ()
webContextSetSpellCheckingEnabled _obj enabled = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let enabled' = (fromIntegral . fromEnum) enabled
    webkit_web_context_set_spell_checking_enabled _obj' enabled'
    touchManagedPtr _obj
    return ()

-- method WebContext::set_spell_checking_languages
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "languages", argType = TCArray True (-1) (-1) (TBasicType TUTF8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "languages", argType = TCArray True (-1) (-1) (TBasicType TUTF8), 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_context_set_spell_checking_languages" webkit_web_context_set_spell_checking_languages :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    Ptr CString ->                          -- languages : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()


webContextSetSpellCheckingLanguages ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    [T.Text] ->                             -- languages
    m ()
webContextSetSpellCheckingLanguages _obj languages = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    languages' <- packZeroTerminatedUTF8CArray languages
    webkit_web_context_set_spell_checking_languages _obj' languages'
    touchManagedPtr _obj
    mapZeroTerminatedCArray freeMem languages'
    freeMem languages'
    return ()

-- method WebContext::set_tls_errors_policy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "WebKit2" "TLSErrorsPolicy", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "policy", argType = TInterface "WebKit2" "TLSErrorsPolicy", 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_context_set_tls_errors_policy" webkit_web_context_set_tls_errors_policy :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CUInt ->                                -- policy : TInterface "WebKit2" "TLSErrorsPolicy"
    IO ()


webContextSetTlsErrorsPolicy ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    TLSErrorsPolicy ->                      -- policy
    m ()
webContextSetTlsErrorsPolicy _obj policy = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let policy' = (fromIntegral . fromEnum) policy
    webkit_web_context_set_tls_errors_policy _obj' policy'
    touchManagedPtr _obj
    return ()

-- method WebContext::set_web_extensions_directory
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "directory", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "directory", argType = TBasicType TUTF8, 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_context_set_web_extensions_directory" webkit_web_context_set_web_extensions_directory :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    CString ->                              -- directory : TBasicType TUTF8
    IO ()


webContextSetWebExtensionsDirectory ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- directory
    m ()
webContextSetWebExtensionsDirectory _obj directory = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    directory' <- textToCString directory
    webkit_web_context_set_web_extensions_directory _obj' directory'
    touchManagedPtr _obj
    freeMem directory'
    return ()

-- method WebContext::set_web_extensions_initialization_user_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TVariant, 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_context_set_web_extensions_initialization_user_data" webkit_web_context_set_web_extensions_initialization_user_data :: 
    Ptr WebContext ->                       -- _obj : TInterface "WebKit2" "WebContext"
    Ptr GVariant ->                         -- user_data : TVariant
    IO ()


webContextSetWebExtensionsInitializationUserData ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- _obj
    GVariant ->                             -- user_data
    m ()
webContextSetWebExtensionsInitializationUserData _obj user_data = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let user_data' = unsafeManagedPtrGetPtr user_data
    webkit_web_context_set_web_extensions_initialization_user_data _obj' user_data'
    touchManagedPtr _obj
    return ()

-- method WebContext::get_default
-- method type : MemberFunction
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "WebContext"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_context_get_default" webkit_web_context_get_default :: 
    IO (Ptr WebContext)


webContextGetDefault ::
    (MonadIO m) =>
    m WebContext
webContextGetDefault  = liftIO $ do
    result <- webkit_web_context_get_default
    checkUnexpectedReturnNULL "webkit_web_context_get_default" result
    result' <- (newObject WebContext) result
    return result'

-- signal WebContext::download-started
type WebContextDownloadStartedCallback =
    Download ->
    IO ()

noWebContextDownloadStartedCallback :: Maybe WebContextDownloadStartedCallback
noWebContextDownloadStartedCallback = Nothing

type WebContextDownloadStartedCallbackC =
    Ptr () ->                               -- object
    Ptr Download ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebContextDownloadStartedCallback :: WebContextDownloadStartedCallbackC -> IO (FunPtr WebContextDownloadStartedCallbackC)

webContextDownloadStartedClosure :: WebContextDownloadStartedCallback -> IO Closure
webContextDownloadStartedClosure cb = newCClosure =<< mkWebContextDownloadStartedCallback wrapped
    where wrapped = webContextDownloadStartedCallbackWrapper cb

webContextDownloadStartedCallbackWrapper ::
    WebContextDownloadStartedCallback ->
    Ptr () ->
    Ptr Download ->
    Ptr () ->
    IO ()
webContextDownloadStartedCallbackWrapper _cb _ download _ = do
    download' <- (newObject Download) download
    _cb  download'

onWebContextDownloadStarted :: (GObject a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId
onWebContextDownloadStarted obj cb = liftIO $ connectWebContextDownloadStarted obj cb SignalConnectBefore
afterWebContextDownloadStarted :: (GObject a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId
afterWebContextDownloadStarted obj cb = connectWebContextDownloadStarted obj cb SignalConnectAfter

connectWebContextDownloadStarted :: (GObject a, MonadIO m) =>
                                    a -> WebContextDownloadStartedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebContextDownloadStarted obj cb after = liftIO $ do
    cb' <- mkWebContextDownloadStartedCallback (webContextDownloadStartedCallbackWrapper cb)
    connectSignalFunPtr obj "download-started" cb' after

-- signal WebContext::initialize-web-extensions
type WebContextInitializeWebExtensionsCallback =
    IO ()

noWebContextInitializeWebExtensionsCallback :: Maybe WebContextInitializeWebExtensionsCallback
noWebContextInitializeWebExtensionsCallback = Nothing

type WebContextInitializeWebExtensionsCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebContextInitializeWebExtensionsCallback :: WebContextInitializeWebExtensionsCallbackC -> IO (FunPtr WebContextInitializeWebExtensionsCallbackC)

webContextInitializeWebExtensionsClosure :: WebContextInitializeWebExtensionsCallback -> IO Closure
webContextInitializeWebExtensionsClosure cb = newCClosure =<< mkWebContextInitializeWebExtensionsCallback wrapped
    where wrapped = webContextInitializeWebExtensionsCallbackWrapper cb

webContextInitializeWebExtensionsCallbackWrapper ::
    WebContextInitializeWebExtensionsCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webContextInitializeWebExtensionsCallbackWrapper _cb _ _ = do
    _cb 

onWebContextInitializeWebExtensions :: (GObject a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId
onWebContextInitializeWebExtensions obj cb = liftIO $ connectWebContextInitializeWebExtensions obj cb SignalConnectBefore
afterWebContextInitializeWebExtensions :: (GObject a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId
afterWebContextInitializeWebExtensions obj cb = connectWebContextInitializeWebExtensions obj cb SignalConnectAfter

connectWebContextInitializeWebExtensions :: (GObject a, MonadIO m) =>
                                            a -> WebContextInitializeWebExtensionsCallback -> SignalConnectMode -> m SignalHandlerId
connectWebContextInitializeWebExtensions obj cb after = liftIO $ do
    cb' <- mkWebContextInitializeWebExtensionsCallback (webContextInitializeWebExtensionsCallbackWrapper cb)
    connectSignalFunPtr obj "initialize-web-extensions" cb' after

-- object WebInspector 
newtype WebInspector = WebInspector (ForeignPtr WebInspector)
noWebInspector :: Maybe WebInspector
noWebInspector = Nothing

foreign import ccall "webkit_web_inspector_get_type"
    c_webkit_web_inspector_get_type :: IO GType

type instance ParentTypes WebInspector = '[GObject.Object]

instance GObject WebInspector where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_web_inspector_get_type
    

class GObject o => WebInspectorK o
instance (GObject o, IsDescendantOf WebInspector o) => WebInspectorK o

toWebInspector :: WebInspectorK o => o -> IO WebInspector
toWebInspector = unsafeCastTo WebInspector

-- method WebInspector::attach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", 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_inspector_attach" webkit_web_inspector_attach :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO ()


webInspectorAttach ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m ()
webInspectorAttach _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_inspector_attach _obj'
    touchManagedPtr _obj
    return ()

-- method WebInspector::close
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", 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_inspector_close" webkit_web_inspector_close :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO ()


webInspectorClose ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m ()
webInspectorClose _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_inspector_close _obj'
    touchManagedPtr _obj
    return ()

-- method WebInspector::detach
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", 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_inspector_detach" webkit_web_inspector_detach :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO ()


webInspectorDetach ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m ()
webInspectorDetach _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_inspector_detach _obj'
    touchManagedPtr _obj
    return ()

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

foreign import ccall "webkit_web_inspector_get_attached_height" webkit_web_inspector_get_attached_height :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO Word32


webInspectorGetAttachedHeight ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m Word32
webInspectorGetAttachedHeight _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_inspector_get_attached_height _obj'
    touchManagedPtr _obj
    return result

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

foreign import ccall "webkit_web_inspector_get_can_attach" webkit_web_inspector_get_can_attach :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO CInt


webInspectorGetCanAttach ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m Bool
webInspectorGetCanAttach _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_inspector_get_can_attach _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_inspector_get_inspected_uri" webkit_web_inspector_get_inspected_uri :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO CString


webInspectorGetInspectedUri ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m T.Text
webInspectorGetInspectedUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_inspector_get_inspected_uri _obj'
    checkUnexpectedReturnNULL "webkit_web_inspector_get_inspected_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method WebInspector::get_web_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebViewBase"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_inspector_get_web_view" webkit_web_inspector_get_web_view :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO (Ptr WebViewBase)


webInspectorGetWebView ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m WebViewBase
webInspectorGetWebView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_inspector_get_web_view _obj'
    checkUnexpectedReturnNULL "webkit_web_inspector_get_web_view" result
    result' <- (newObject WebViewBase) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_inspector_is_attached" webkit_web_inspector_is_attached :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO CInt


webInspectorIsAttached ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m Bool
webInspectorIsAttached _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_inspector_is_attached _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WebInspector::show
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebInspector", 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_inspector_show" webkit_web_inspector_show :: 
    Ptr WebInspector ->                     -- _obj : TInterface "WebKit2" "WebInspector"
    IO ()


webInspectorShow ::
    (MonadIO m, WebInspectorK a) =>
    a ->                                    -- _obj
    m ()
webInspectorShow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_inspector_show _obj'
    touchManagedPtr _obj
    return ()

-- signal WebInspector::attach
type WebInspectorAttachCallback =
    IO Bool

noWebInspectorAttachCallback :: Maybe WebInspectorAttachCallback
noWebInspectorAttachCallback = Nothing

type WebInspectorAttachCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebInspectorAttachCallback :: WebInspectorAttachCallbackC -> IO (FunPtr WebInspectorAttachCallbackC)

webInspectorAttachClosure :: WebInspectorAttachCallback -> IO Closure
webInspectorAttachClosure cb = newCClosure =<< mkWebInspectorAttachCallback wrapped
    where wrapped = webInspectorAttachCallbackWrapper cb

webInspectorAttachCallbackWrapper ::
    WebInspectorAttachCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webInspectorAttachCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebInspectorAttach :: (GObject a, MonadIO m) => a -> WebInspectorAttachCallback -> m SignalHandlerId
onWebInspectorAttach obj cb = liftIO $ connectWebInspectorAttach obj cb SignalConnectBefore
afterWebInspectorAttach :: (GObject a, MonadIO m) => a -> WebInspectorAttachCallback -> m SignalHandlerId
afterWebInspectorAttach obj cb = connectWebInspectorAttach obj cb SignalConnectAfter

connectWebInspectorAttach :: (GObject a, MonadIO m) =>
                             a -> WebInspectorAttachCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorAttach obj cb after = liftIO $ do
    cb' <- mkWebInspectorAttachCallback (webInspectorAttachCallbackWrapper cb)
    connectSignalFunPtr obj "attach" cb' after

-- signal WebInspector::bring-to-front
type WebInspectorBringToFrontCallback =
    IO Bool

noWebInspectorBringToFrontCallback :: Maybe WebInspectorBringToFrontCallback
noWebInspectorBringToFrontCallback = Nothing

type WebInspectorBringToFrontCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebInspectorBringToFrontCallback :: WebInspectorBringToFrontCallbackC -> IO (FunPtr WebInspectorBringToFrontCallbackC)

webInspectorBringToFrontClosure :: WebInspectorBringToFrontCallback -> IO Closure
webInspectorBringToFrontClosure cb = newCClosure =<< mkWebInspectorBringToFrontCallback wrapped
    where wrapped = webInspectorBringToFrontCallbackWrapper cb

webInspectorBringToFrontCallbackWrapper ::
    WebInspectorBringToFrontCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webInspectorBringToFrontCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebInspectorBringToFront :: (GObject a, MonadIO m) => a -> WebInspectorBringToFrontCallback -> m SignalHandlerId
onWebInspectorBringToFront obj cb = liftIO $ connectWebInspectorBringToFront obj cb SignalConnectBefore
afterWebInspectorBringToFront :: (GObject a, MonadIO m) => a -> WebInspectorBringToFrontCallback -> m SignalHandlerId
afterWebInspectorBringToFront obj cb = connectWebInspectorBringToFront obj cb SignalConnectAfter

connectWebInspectorBringToFront :: (GObject a, MonadIO m) =>
                                   a -> WebInspectorBringToFrontCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorBringToFront obj cb after = liftIO $ do
    cb' <- mkWebInspectorBringToFrontCallback (webInspectorBringToFrontCallbackWrapper cb)
    connectSignalFunPtr obj "bring-to-front" cb' after

-- signal WebInspector::closed
type WebInspectorClosedCallback =
    IO ()

noWebInspectorClosedCallback :: Maybe WebInspectorClosedCallback
noWebInspectorClosedCallback = Nothing

type WebInspectorClosedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebInspectorClosedCallback :: WebInspectorClosedCallbackC -> IO (FunPtr WebInspectorClosedCallbackC)

webInspectorClosedClosure :: WebInspectorClosedCallback -> IO Closure
webInspectorClosedClosure cb = newCClosure =<< mkWebInspectorClosedCallback wrapped
    where wrapped = webInspectorClosedCallbackWrapper cb

webInspectorClosedCallbackWrapper ::
    WebInspectorClosedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webInspectorClosedCallbackWrapper _cb _ _ = do
    _cb 

onWebInspectorClosed :: (GObject a, MonadIO m) => a -> WebInspectorClosedCallback -> m SignalHandlerId
onWebInspectorClosed obj cb = liftIO $ connectWebInspectorClosed obj cb SignalConnectBefore
afterWebInspectorClosed :: (GObject a, MonadIO m) => a -> WebInspectorClosedCallback -> m SignalHandlerId
afterWebInspectorClosed obj cb = connectWebInspectorClosed obj cb SignalConnectAfter

connectWebInspectorClosed :: (GObject a, MonadIO m) =>
                             a -> WebInspectorClosedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorClosed obj cb after = liftIO $ do
    cb' <- mkWebInspectorClosedCallback (webInspectorClosedCallbackWrapper cb)
    connectSignalFunPtr obj "closed" cb' after

-- signal WebInspector::detach
type WebInspectorDetachCallback =
    IO Bool

noWebInspectorDetachCallback :: Maybe WebInspectorDetachCallback
noWebInspectorDetachCallback = Nothing

type WebInspectorDetachCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebInspectorDetachCallback :: WebInspectorDetachCallbackC -> IO (FunPtr WebInspectorDetachCallbackC)

webInspectorDetachClosure :: WebInspectorDetachCallback -> IO Closure
webInspectorDetachClosure cb = newCClosure =<< mkWebInspectorDetachCallback wrapped
    where wrapped = webInspectorDetachCallbackWrapper cb

webInspectorDetachCallbackWrapper ::
    WebInspectorDetachCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webInspectorDetachCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebInspectorDetach :: (GObject a, MonadIO m) => a -> WebInspectorDetachCallback -> m SignalHandlerId
onWebInspectorDetach obj cb = liftIO $ connectWebInspectorDetach obj cb SignalConnectBefore
afterWebInspectorDetach :: (GObject a, MonadIO m) => a -> WebInspectorDetachCallback -> m SignalHandlerId
afterWebInspectorDetach obj cb = connectWebInspectorDetach obj cb SignalConnectAfter

connectWebInspectorDetach :: (GObject a, MonadIO m) =>
                             a -> WebInspectorDetachCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorDetach obj cb after = liftIO $ do
    cb' <- mkWebInspectorDetachCallback (webInspectorDetachCallbackWrapper cb)
    connectSignalFunPtr obj "detach" cb' after

-- signal WebInspector::open-window
type WebInspectorOpenWindowCallback =
    IO Bool

noWebInspectorOpenWindowCallback :: Maybe WebInspectorOpenWindowCallback
noWebInspectorOpenWindowCallback = Nothing

type WebInspectorOpenWindowCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebInspectorOpenWindowCallback :: WebInspectorOpenWindowCallbackC -> IO (FunPtr WebInspectorOpenWindowCallbackC)

webInspectorOpenWindowClosure :: WebInspectorOpenWindowCallback -> IO Closure
webInspectorOpenWindowClosure cb = newCClosure =<< mkWebInspectorOpenWindowCallback wrapped
    where wrapped = webInspectorOpenWindowCallbackWrapper cb

webInspectorOpenWindowCallbackWrapper ::
    WebInspectorOpenWindowCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webInspectorOpenWindowCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebInspectorOpenWindow :: (GObject a, MonadIO m) => a -> WebInspectorOpenWindowCallback -> m SignalHandlerId
onWebInspectorOpenWindow obj cb = liftIO $ connectWebInspectorOpenWindow obj cb SignalConnectBefore
afterWebInspectorOpenWindow :: (GObject a, MonadIO m) => a -> WebInspectorOpenWindowCallback -> m SignalHandlerId
afterWebInspectorOpenWindow obj cb = connectWebInspectorOpenWindow obj cb SignalConnectAfter

connectWebInspectorOpenWindow :: (GObject a, MonadIO m) =>
                                 a -> WebInspectorOpenWindowCallback -> SignalConnectMode -> m SignalHandlerId
connectWebInspectorOpenWindow obj cb after = liftIO $ do
    cb' <- mkWebInspectorOpenWindowCallback (webInspectorOpenWindowCallbackWrapper cb)
    connectSignalFunPtr obj "open-window" cb' after

-- object WebResource 
newtype WebResource = WebResource (ForeignPtr WebResource)
noWebResource :: Maybe WebResource
noWebResource = Nothing

foreign import ccall "webkit_web_resource_get_type"
    c_webkit_web_resource_get_type :: IO GType

type instance ParentTypes WebResource = '[GObject.Object]

instance GObject WebResource where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_web_resource_get_type
    

class GObject o => WebResourceK o
instance (GObject o, IsDescendantOf WebResource o) => WebResourceK o

toWebResource :: WebResourceK o => o -> IO WebResource
toWebResource = unsafeCastTo WebResource

-- method WebResource::get_data
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 3, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_resource_get_data" webkit_web_resource_get_data :: 
    Ptr WebResource ->                      -- _obj : TInterface "WebKit2" "WebResource"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webResourceGetData ::
    (MonadIO m, WebResourceK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webResourceGetData _obj cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_resource_get_data _obj' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method WebResource::get_data_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : [Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray False (-1) 2 (TBasicType TUInt8)
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_resource_get_data_finish" webkit_web_resource_get_data_finish :: 
    Ptr WebResource ->                      -- _obj : TInterface "WebKit2" "WebResource"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr Word64 ->                           -- length : TBasicType TUInt64
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Word8)


webResourceGetDataFinish ::
    (MonadIO m, WebResourceK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m ByteString
webResourceGetDataFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    length_ <- allocMem :: IO (Ptr Word64)
    onException (do
        result <- propagateGError $ webkit_web_resource_get_data_finish _obj' result_' length_
        length_' <- peek length_
        checkUnexpectedReturnNULL "webkit_web_resource_get_data_finish" result
        result' <- (unpackByteStringWithLength length_') result
        freeMem result
        touchManagedPtr _obj
        touchManagedPtr result_
        freeMem length_
        return result'
     ) (do
        freeMem length_
     )

-- method WebResource::get_response
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebResource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "URIResponse"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_resource_get_response" webkit_web_resource_get_response :: 
    Ptr WebResource ->                      -- _obj : TInterface "WebKit2" "WebResource"
    IO (Ptr URIResponse)


webResourceGetResponse ::
    (MonadIO m, WebResourceK a) =>
    a ->                                    -- _obj
    m URIResponse
webResourceGetResponse _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_resource_get_response _obj'
    checkUnexpectedReturnNULL "webkit_web_resource_get_response" result
    result' <- (newObject URIResponse) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_resource_get_uri" webkit_web_resource_get_uri :: 
    Ptr WebResource ->                      -- _obj : TInterface "WebKit2" "WebResource"
    IO CString


webResourceGetUri ::
    (MonadIO m, WebResourceK a) =>
    a ->                                    -- _obj
    m T.Text
webResourceGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_resource_get_uri _obj'
    checkUnexpectedReturnNULL "webkit_web_resource_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- signal WebResource::failed
type WebResourceFailedCallback =
    Ptr () ->
    IO ()

noWebResourceFailedCallback :: Maybe WebResourceFailedCallback
noWebResourceFailedCallback = Nothing

type WebResourceFailedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebResourceFailedCallback :: WebResourceFailedCallbackC -> IO (FunPtr WebResourceFailedCallbackC)

webResourceFailedClosure :: WebResourceFailedCallback -> IO Closure
webResourceFailedClosure cb = newCClosure =<< mkWebResourceFailedCallback wrapped
    where wrapped = webResourceFailedCallbackWrapper cb

webResourceFailedCallbackWrapper ::
    WebResourceFailedCallback ->
    Ptr () ->
    Ptr () ->
    Ptr () ->
    IO ()
webResourceFailedCallbackWrapper _cb _ error_ _ = do
    _cb  error_

onWebResourceFailed :: (GObject a, MonadIO m) => a -> WebResourceFailedCallback -> m SignalHandlerId
onWebResourceFailed obj cb = liftIO $ connectWebResourceFailed obj cb SignalConnectBefore
afterWebResourceFailed :: (GObject a, MonadIO m) => a -> WebResourceFailedCallback -> m SignalHandlerId
afterWebResourceFailed obj cb = connectWebResourceFailed obj cb SignalConnectAfter

connectWebResourceFailed :: (GObject a, MonadIO m) =>
                            a -> WebResourceFailedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebResourceFailed obj cb after = liftIO $ do
    cb' <- mkWebResourceFailedCallback (webResourceFailedCallbackWrapper cb)
    connectSignalFunPtr obj "failed" cb' after

-- signal WebResource::failed-with-tls-errors
type WebResourceFailedWithTlsErrorsCallback =
    Gio.TlsCertificate ->
    [Gio.TlsCertificateFlags] ->
    IO ()

noWebResourceFailedWithTlsErrorsCallback :: Maybe WebResourceFailedWithTlsErrorsCallback
noWebResourceFailedWithTlsErrorsCallback = Nothing

type WebResourceFailedWithTlsErrorsCallbackC =
    Ptr () ->                               -- object
    Ptr Gio.TlsCertificate ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebResourceFailedWithTlsErrorsCallback :: WebResourceFailedWithTlsErrorsCallbackC -> IO (FunPtr WebResourceFailedWithTlsErrorsCallbackC)

webResourceFailedWithTlsErrorsClosure :: WebResourceFailedWithTlsErrorsCallback -> IO Closure
webResourceFailedWithTlsErrorsClosure cb = newCClosure =<< mkWebResourceFailedWithTlsErrorsCallback wrapped
    where wrapped = webResourceFailedWithTlsErrorsCallbackWrapper cb

webResourceFailedWithTlsErrorsCallbackWrapper ::
    WebResourceFailedWithTlsErrorsCallback ->
    Ptr () ->
    Ptr Gio.TlsCertificate ->
    CUInt ->
    Ptr () ->
    IO ()
webResourceFailedWithTlsErrorsCallbackWrapper _cb _ certificate errors _ = do
    certificate' <- (newObject Gio.TlsCertificate) certificate
    let errors' = wordToGFlags errors
    _cb  certificate' errors'

onWebResourceFailedWithTlsErrors :: (GObject a, MonadIO m) => a -> WebResourceFailedWithTlsErrorsCallback -> m SignalHandlerId
onWebResourceFailedWithTlsErrors obj cb = liftIO $ connectWebResourceFailedWithTlsErrors obj cb SignalConnectBefore
afterWebResourceFailedWithTlsErrors :: (GObject a, MonadIO m) => a -> WebResourceFailedWithTlsErrorsCallback -> m SignalHandlerId
afterWebResourceFailedWithTlsErrors obj cb = connectWebResourceFailedWithTlsErrors obj cb SignalConnectAfter

connectWebResourceFailedWithTlsErrors :: (GObject a, MonadIO m) =>
                                         a -> WebResourceFailedWithTlsErrorsCallback -> SignalConnectMode -> m SignalHandlerId
connectWebResourceFailedWithTlsErrors obj cb after = liftIO $ do
    cb' <- mkWebResourceFailedWithTlsErrorsCallback (webResourceFailedWithTlsErrorsCallbackWrapper cb)
    connectSignalFunPtr obj "failed-with-tls-errors" cb' after

-- signal WebResource::finished
type WebResourceFinishedCallback =
    IO ()

noWebResourceFinishedCallback :: Maybe WebResourceFinishedCallback
noWebResourceFinishedCallback = Nothing

type WebResourceFinishedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebResourceFinishedCallback :: WebResourceFinishedCallbackC -> IO (FunPtr WebResourceFinishedCallbackC)

webResourceFinishedClosure :: WebResourceFinishedCallback -> IO Closure
webResourceFinishedClosure cb = newCClosure =<< mkWebResourceFinishedCallback wrapped
    where wrapped = webResourceFinishedCallbackWrapper cb

webResourceFinishedCallbackWrapper ::
    WebResourceFinishedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webResourceFinishedCallbackWrapper _cb _ _ = do
    _cb 

onWebResourceFinished :: (GObject a, MonadIO m) => a -> WebResourceFinishedCallback -> m SignalHandlerId
onWebResourceFinished obj cb = liftIO $ connectWebResourceFinished obj cb SignalConnectBefore
afterWebResourceFinished :: (GObject a, MonadIO m) => a -> WebResourceFinishedCallback -> m SignalHandlerId
afterWebResourceFinished obj cb = connectWebResourceFinished obj cb SignalConnectAfter

connectWebResourceFinished :: (GObject a, MonadIO m) =>
                              a -> WebResourceFinishedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebResourceFinished obj cb after = liftIO $ do
    cb' <- mkWebResourceFinishedCallback (webResourceFinishedCallbackWrapper cb)
    connectSignalFunPtr obj "finished" cb' after

-- signal WebResource::received-data
type WebResourceReceivedDataCallback =
    Word64 ->
    IO ()

noWebResourceReceivedDataCallback :: Maybe WebResourceReceivedDataCallback
noWebResourceReceivedDataCallback = Nothing

type WebResourceReceivedDataCallbackC =
    Ptr () ->                               -- object
    Word64 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebResourceReceivedDataCallback :: WebResourceReceivedDataCallbackC -> IO (FunPtr WebResourceReceivedDataCallbackC)

webResourceReceivedDataClosure :: WebResourceReceivedDataCallback -> IO Closure
webResourceReceivedDataClosure cb = newCClosure =<< mkWebResourceReceivedDataCallback wrapped
    where wrapped = webResourceReceivedDataCallbackWrapper cb

webResourceReceivedDataCallbackWrapper ::
    WebResourceReceivedDataCallback ->
    Ptr () ->
    Word64 ->
    Ptr () ->
    IO ()
webResourceReceivedDataCallbackWrapper _cb _ data_length _ = do
    _cb  data_length

onWebResourceReceivedData :: (GObject a, MonadIO m) => a -> WebResourceReceivedDataCallback -> m SignalHandlerId
onWebResourceReceivedData obj cb = liftIO $ connectWebResourceReceivedData obj cb SignalConnectBefore
afterWebResourceReceivedData :: (GObject a, MonadIO m) => a -> WebResourceReceivedDataCallback -> m SignalHandlerId
afterWebResourceReceivedData obj cb = connectWebResourceReceivedData obj cb SignalConnectAfter

connectWebResourceReceivedData :: (GObject a, MonadIO m) =>
                                  a -> WebResourceReceivedDataCallback -> SignalConnectMode -> m SignalHandlerId
connectWebResourceReceivedData obj cb after = liftIO $ do
    cb' <- mkWebResourceReceivedDataCallback (webResourceReceivedDataCallbackWrapper cb)
    connectSignalFunPtr obj "received-data" cb' after

-- signal WebResource::sent-request
type WebResourceSentRequestCallback =
    URIRequest ->
    URIResponse ->
    IO ()

noWebResourceSentRequestCallback :: Maybe WebResourceSentRequestCallback
noWebResourceSentRequestCallback = Nothing

type WebResourceSentRequestCallbackC =
    Ptr () ->                               -- object
    Ptr URIRequest ->
    Ptr URIResponse ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebResourceSentRequestCallback :: WebResourceSentRequestCallbackC -> IO (FunPtr WebResourceSentRequestCallbackC)

webResourceSentRequestClosure :: WebResourceSentRequestCallback -> IO Closure
webResourceSentRequestClosure cb = newCClosure =<< mkWebResourceSentRequestCallback wrapped
    where wrapped = webResourceSentRequestCallbackWrapper cb

webResourceSentRequestCallbackWrapper ::
    WebResourceSentRequestCallback ->
    Ptr () ->
    Ptr URIRequest ->
    Ptr URIResponse ->
    Ptr () ->
    IO ()
webResourceSentRequestCallbackWrapper _cb _ request redirected_response _ = do
    request' <- (newObject URIRequest) request
    redirected_response' <- (newObject URIResponse) redirected_response
    _cb  request' redirected_response'

onWebResourceSentRequest :: (GObject a, MonadIO m) => a -> WebResourceSentRequestCallback -> m SignalHandlerId
onWebResourceSentRequest obj cb = liftIO $ connectWebResourceSentRequest obj cb SignalConnectBefore
afterWebResourceSentRequest :: (GObject a, MonadIO m) => a -> WebResourceSentRequestCallback -> m SignalHandlerId
afterWebResourceSentRequest obj cb = connectWebResourceSentRequest obj cb SignalConnectAfter

connectWebResourceSentRequest :: (GObject a, MonadIO m) =>
                                 a -> WebResourceSentRequestCallback -> SignalConnectMode -> m SignalHandlerId
connectWebResourceSentRequest obj cb after = liftIO $ do
    cb' <- mkWebResourceSentRequestCallback (webResourceSentRequestCallbackWrapper cb)
    connectSignalFunPtr obj "sent-request" cb' after

-- object WebView 
newtype WebView = WebView (ForeignPtr WebView)
noWebView :: Maybe WebView
noWebView = Nothing

foreign import ccall "webkit_web_view_get_type"
    c_webkit_web_view_get_type :: IO GType

type instance ParentTypes WebView = '[WebViewBase, Gtk.Container, Gtk.Widget, GObject.Object, Atk.ImplementorIface, Gtk.Buildable]

instance GObject WebView where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_webkit_web_view_get_type
    

class GObject o => WebViewK o
instance (GObject o, IsDescendantOf WebView o) => WebViewK o

toWebView :: WebViewK o => o -> IO WebView
toWebView = unsafeCastTo WebView

-- method WebView::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new" webkit_web_view_new :: 
    IO (Ptr WebView)


webViewNew ::
    (MonadIO m) =>
    m WebView
webViewNew  = liftIO $ do
    result <- webkit_web_view_new
    checkUnexpectedReturnNULL "webkit_web_view_new" result
    result' <- (newObject WebView) result
    return result'

-- method WebView::new_with_context
-- method type : Constructor
-- Args : [Arg {argName = "context", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "context", argType = TInterface "WebKit2" "WebContext", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_context" webkit_web_view_new_with_context :: 
    Ptr WebContext ->                       -- context : TInterface "WebKit2" "WebContext"
    IO (Ptr WebView)


webViewNewWithContext ::
    (MonadIO m, WebContextK a) =>
    a ->                                    -- context
    m WebView
webViewNewWithContext context = liftIO $ do
    let context' = unsafeManagedPtrCastPtr context
    result <- webkit_web_view_new_with_context context'
    checkUnexpectedReturnNULL "webkit_web_view_new_with_context" result
    result' <- (newObject WebView) result
    touchManagedPtr context
    return result'

-- method WebView::new_with_settings
-- method type : Constructor
-- Args : [Arg {argName = "settings", argType = TInterface "WebKit2" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "settings", argType = TInterface "WebKit2" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_settings" webkit_web_view_new_with_settings :: 
    Ptr Settings ->                         -- settings : TInterface "WebKit2" "Settings"
    IO (Ptr WebView)


webViewNewWithSettings ::
    (MonadIO m, SettingsK a) =>
    a ->                                    -- settings
    m WebView
webViewNewWithSettings settings = liftIO $ do
    let settings' = unsafeManagedPtrCastPtr settings
    result <- webkit_web_view_new_with_settings settings'
    checkUnexpectedReturnNULL "webkit_web_view_new_with_settings" result
    result' <- (newObject WebView) result
    touchManagedPtr settings
    return result'

-- method WebView::new_with_user_content_manager
-- method type : Constructor
-- Args : [Arg {argName = "user_content_manager", argType = TInterface "WebKit2" "UserContentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "user_content_manager", argType = TInterface "WebKit2" "UserContentManager", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebView"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_user_content_manager" webkit_web_view_new_with_user_content_manager :: 
    Ptr UserContentManager ->               -- user_content_manager : TInterface "WebKit2" "UserContentManager"
    IO (Ptr WebView)


webViewNewWithUserContentManager ::
    (MonadIO m, UserContentManagerK a) =>
    a ->                                    -- user_content_manager
    m WebView
webViewNewWithUserContentManager user_content_manager = liftIO $ do
    let user_content_manager' = unsafeManagedPtrCastPtr user_content_manager
    result <- webkit_web_view_new_with_user_content_manager user_content_manager'
    checkUnexpectedReturnNULL "webkit_web_view_new_with_user_content_manager" result
    result' <- (newObject WebView) result
    touchManagedPtr user_content_manager
    return result'

-- method WebView::can_execute_editing_command
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "command", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "command", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_can_execute_editing_command" webkit_web_view_can_execute_editing_command :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- command : TBasicType TUTF8
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webViewCanExecuteEditingCommand ::
    (MonadIO m, WebViewK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- command
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webViewCanExecuteEditingCommand _obj command cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    command' <- textToCString command
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_view_can_execute_editing_command _obj' command' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    freeMem command'
    return ()

-- method WebView::can_execute_editing_command_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_can_execute_editing_command_finish" webkit_web_view_can_execute_editing_command_finish :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


webViewCanExecuteEditingCommandFinish ::
    (MonadIO m, WebViewK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m ()
webViewCanExecuteEditingCommandFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        _ <- propagateGError $ webkit_web_view_can_execute_editing_command_finish _obj' result_'
        touchManagedPtr _obj
        touchManagedPtr result_
        return ()
     ) (do
        return ()
     )

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

foreign import ccall "webkit_web_view_can_go_back" webkit_web_view_can_go_back :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CInt


webViewCanGoBack ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Bool
webViewCanGoBack _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_can_go_back _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_can_go_forward" webkit_web_view_can_go_forward :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CInt


webViewCanGoForward ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Bool
webViewCanGoForward _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_can_go_forward _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WebView::can_show_mime_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_can_show_mime_type" webkit_web_view_can_show_mime_type :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- mime_type : TBasicType TUTF8
    IO CInt


webViewCanShowMimeType ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- mime_type
    m Bool
webViewCanShowMimeType _obj mime_type = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    mime_type' <- textToCString mime_type
    result <- webkit_web_view_can_show_mime_type _obj' mime_type'
    let result' = (/= 0) result
    touchManagedPtr _obj
    freeMem mime_type'
    return result'

-- method WebView::download_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "Download"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_download_uri" webkit_web_view_download_uri :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- uri : TBasicType TUTF8
    IO (Ptr Download)


webViewDownloadUri ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m Download
webViewDownloadUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    result <- webkit_web_view_download_uri _obj' uri'
    checkUnexpectedReturnNULL "webkit_web_view_download_uri" result
    result' <- (wrapObject Download) result
    touchManagedPtr _obj
    freeMem uri'
    return result'

-- method WebView::execute_editing_command
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "command", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "command", argType = TBasicType TUTF8, 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_view_execute_editing_command" webkit_web_view_execute_editing_command :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- command : TBasicType TUTF8
    IO ()


webViewExecuteEditingCommand ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- command
    m ()
webViewExecuteEditingCommand _obj command = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    command' <- textToCString command
    webkit_web_view_execute_editing_command _obj' command'
    touchManagedPtr _obj
    freeMem command'
    return ()

-- method WebView::get_back_forward_list
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "BackForwardList"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_back_forward_list" webkit_web_view_get_back_forward_list :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr BackForwardList)


webViewGetBackForwardList ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m BackForwardList
webViewGetBackForwardList _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_back_forward_list _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_back_forward_list" result
    result' <- (newObject BackForwardList) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", 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_view_get_background_color" webkit_web_view_get_background_color :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


webViewGetBackgroundColor ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m (Gdk.RGBA)
webViewGetBackgroundColor _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    rgba <- callocBoxedBytes 32 :: IO (Ptr Gdk.RGBA)
    webkit_web_view_get_background_color _obj' rgba
    rgba' <- (wrapBoxed Gdk.RGBA) rgba
    touchManagedPtr _obj
    return rgba'

-- method WebView::get_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebContext"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_context" webkit_web_view_get_context :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr WebContext)


webViewGetContext ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m WebContext
webViewGetContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_context _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_context" result
    result' <- (newObject WebContext) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_get_custom_charset" webkit_web_view_get_custom_charset :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CString


webViewGetCustomCharset ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m T.Text
webViewGetCustomCharset _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_custom_charset _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_custom_charset" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_get_estimated_load_progress" webkit_web_view_get_estimated_load_progress :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CDouble


webViewGetEstimatedLoadProgress ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Double
webViewGetEstimatedLoadProgress _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_estimated_load_progress _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method WebView::get_favicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_favicon" webkit_web_view_get_favicon :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr Cairo.Surface)


webViewGetFavicon ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Cairo.Surface
webViewGetFavicon _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_favicon _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_favicon" result
    result' <- (newBoxed Cairo.Surface) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_find_controller
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "FindController"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_find_controller" webkit_web_view_get_find_controller :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr FindController)


webViewGetFindController ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m FindController
webViewGetFindController _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_find_controller _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_find_controller" result
    result' <- (newObject FindController) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_inspector
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebInspector"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_inspector" webkit_web_view_get_inspector :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr WebInspector)


webViewGetInspector ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m WebInspector
webViewGetInspector _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_inspector _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_inspector" result
    result' <- (newObject WebInspector) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_javascript_global_context
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "JavaScriptCore" "GlobalContext"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_javascript_global_context" webkit_web_view_get_javascript_global_context :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr JavaScriptCore.GlobalContext)


webViewGetJavascriptGlobalContext ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m JavaScriptCore.GlobalContext
webViewGetJavascriptGlobalContext _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_javascript_global_context _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_javascript_global_context" result
    -- XXX Wrapping a foreign struct/union with no known destructor, leak?
    result' <- (\x -> JavaScriptCore.GlobalContext <$> newForeignPtr_ x) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_main_resource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WebResource"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_main_resource" webkit_web_view_get_main_resource :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr WebResource)


webViewGetMainResource ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m WebResource
webViewGetMainResource _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_main_resource _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_main_resource" result
    result' <- (newObject WebResource) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_get_page_id" webkit_web_view_get_page_id :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO Word64


webViewGetPageId ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Word64
webViewGetPageId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_page_id _obj'
    touchManagedPtr _obj
    return result

-- method WebView::get_settings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "Settings"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_settings" webkit_web_view_get_settings :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr Settings)


webViewGetSettings ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Settings
webViewGetSettings _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_settings _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_settings" result
    result' <- (newObject Settings) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_snapshot
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "WebKit2" "SnapshotRegion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "options", argType = TInterface "WebKit2" "SnapshotOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "region", argType = TInterface "WebKit2" "SnapshotRegion", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "options", argType = TInterface "WebKit2" "SnapshotOptions", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_snapshot" webkit_web_view_get_snapshot :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CUInt ->                                -- region : TInterface "WebKit2" "SnapshotRegion"
    CUInt ->                                -- options : TInterface "WebKit2" "SnapshotOptions"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webViewGetSnapshot ::
    (MonadIO m, WebViewK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    SnapshotRegion ->                       -- region
    [SnapshotOptions] ->                    -- options
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webViewGetSnapshot _obj region options cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let region' = (fromIntegral . fromEnum) region
    let options' = gflagsToWord options
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_view_get_snapshot _obj' region' options' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method WebView::get_snapshot_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "cairo" "Surface"
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_get_snapshot_finish" webkit_web_view_get_snapshot_finish :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Cairo.Surface)


webViewGetSnapshotFinish ::
    (MonadIO m, WebViewK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m Cairo.Surface
webViewGetSnapshotFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_web_view_get_snapshot_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_web_view_get_snapshot_finish" result
        result' <- (wrapBoxed Cairo.Surface) result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

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

foreign import ccall "webkit_web_view_get_title" webkit_web_view_get_title :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CString


webViewGetTitle ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m T.Text
webViewGetTitle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_title _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_title" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method WebView::get_tls_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "certificate", argType = TInterface "Gio" "TlsCertificate", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "errors", argType = TInterface "Gio" "TlsCertificateFlags", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_tls_info" webkit_web_view_get_tls_info :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr (Ptr Gio.TlsCertificate) ->         -- certificate : TInterface "Gio" "TlsCertificate"
    Ptr CUInt ->                            -- errors : TInterface "Gio" "TlsCertificateFlags"
    IO CInt


webViewGetTlsInfo ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m (Bool,Gio.TlsCertificate,[Gio.TlsCertificateFlags])
webViewGetTlsInfo _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    certificate <- allocMem :: IO (Ptr (Ptr Gio.TlsCertificate))
    errors <- allocMem :: IO (Ptr CUInt)
    result <- webkit_web_view_get_tls_info _obj' certificate errors
    let result' = (/= 0) result
    certificate' <- peek certificate
    certificate'' <- (newObject Gio.TlsCertificate) certificate'
    errors' <- peek errors
    let errors'' = wordToGFlags errors'
    touchManagedPtr _obj
    freeMem certificate
    freeMem errors
    return (result', certificate'', errors'')

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

foreign import ccall "webkit_web_view_get_uri" webkit_web_view_get_uri :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CString


webViewGetUri ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m T.Text
webViewGetUri _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_uri _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_uri" result
    result' <- cstringToText result
    touchManagedPtr _obj
    return result'

-- method WebView::get_user_content_manager
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "UserContentManager"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_user_content_manager" webkit_web_view_get_user_content_manager :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr UserContentManager)


webViewGetUserContentManager ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m UserContentManager
webViewGetUserContentManager _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_user_content_manager _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_user_content_manager" result
    result' <- (newObject UserContentManager) result
    touchManagedPtr _obj
    return result'

-- method WebView::get_window_properties
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "WindowProperties"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_get_window_properties" webkit_web_view_get_window_properties :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr WindowProperties)


webViewGetWindowProperties ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m WindowProperties
webViewGetWindowProperties _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_window_properties _obj'
    checkUnexpectedReturnNULL "webkit_web_view_get_window_properties" result
    result' <- (newObject WindowProperties) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_get_zoom_level" webkit_web_view_get_zoom_level :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CDouble


webViewGetZoomLevel ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Double
webViewGetZoomLevel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_get_zoom_level _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method WebView::go_back
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", 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_view_go_back" webkit_web_view_go_back :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO ()


webViewGoBack ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m ()
webViewGoBack _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_view_go_back _obj'
    touchManagedPtr _obj
    return ()

-- method WebView::go_forward
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", 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_view_go_forward" webkit_web_view_go_forward :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO ()


webViewGoForward ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m ()
webViewGoForward _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_view_go_forward _obj'
    touchManagedPtr _obj
    return ()

-- method WebView::go_to_back_forward_list_item
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "list_item", argType = TInterface "WebKit2" "BackForwardListItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "list_item", argType = TInterface "WebKit2" "BackForwardListItem", 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_view_go_to_back_forward_list_item" webkit_web_view_go_to_back_forward_list_item :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr BackForwardListItem ->              -- list_item : TInterface "WebKit2" "BackForwardListItem"
    IO ()


webViewGoToBackForwardListItem ::
    (MonadIO m, WebViewK a, BackForwardListItemK b) =>
    a ->                                    -- _obj
    b ->                                    -- list_item
    m ()
webViewGoToBackForwardListItem _obj list_item = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let list_item' = unsafeManagedPtrCastPtr list_item
    webkit_web_view_go_to_back_forward_list_item _obj' list_item'
    touchManagedPtr _obj
    touchManagedPtr list_item
    return ()

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

foreign import ccall "webkit_web_view_is_editable" webkit_web_view_is_editable :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CInt


webViewIsEditable ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Bool
webViewIsEditable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_is_editable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_is_loading" webkit_web_view_is_loading :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CInt


webViewIsLoading ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Bool
webViewIsLoading _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_is_loading _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_web_view_is_playing_audio" webkit_web_view_is_playing_audio :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO CInt


webViewIsPlayingAudio ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Bool
webViewIsPlayingAudio _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_is_playing_audio _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WebView::load_alternate_html
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_alternate_html" webkit_web_view_load_alternate_html :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- content : TBasicType TUTF8
    CString ->                              -- content_uri : TBasicType TUTF8
    CString ->                              -- base_uri : TBasicType TUTF8
    IO ()


webViewLoadAlternateHtml ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- content
    T.Text ->                               -- content_uri
    Maybe (T.Text) ->                       -- base_uri
    m ()
webViewLoadAlternateHtml _obj content content_uri base_uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    content' <- textToCString content
    content_uri' <- textToCString content_uri
    maybeBase_uri <- case base_uri of
        Nothing -> return nullPtr
        Just jBase_uri -> do
            jBase_uri' <- textToCString jBase_uri
            return jBase_uri'
    webkit_web_view_load_alternate_html _obj' content' content_uri' maybeBase_uri
    touchManagedPtr _obj
    freeMem content'
    freeMem content_uri'
    freeMem maybeBase_uri
    return ()

-- method WebView::load_bytes
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bytes", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "encoding", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "bytes", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "mime_type", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "encoding", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_bytes" webkit_web_view_load_bytes :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr GLib.Bytes ->                       -- bytes : TInterface "GLib" "Bytes"
    CString ->                              -- mime_type : TBasicType TUTF8
    CString ->                              -- encoding : TBasicType TUTF8
    CString ->                              -- base_uri : TBasicType TUTF8
    IO ()


webViewLoadBytes ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    GLib.Bytes ->                           -- bytes
    Maybe (T.Text) ->                       -- mime_type
    Maybe (T.Text) ->                       -- encoding
    Maybe (T.Text) ->                       -- base_uri
    m ()
webViewLoadBytes _obj bytes mime_type encoding base_uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let bytes' = unsafeManagedPtrGetPtr bytes
    maybeMime_type <- case mime_type of
        Nothing -> return nullPtr
        Just jMime_type -> do
            jMime_type' <- textToCString jMime_type
            return jMime_type'
    maybeEncoding <- case encoding of
        Nothing -> return nullPtr
        Just jEncoding -> do
            jEncoding' <- textToCString jEncoding
            return jEncoding'
    maybeBase_uri <- case base_uri of
        Nothing -> return nullPtr
        Just jBase_uri -> do
            jBase_uri' <- textToCString jBase_uri
            return jBase_uri'
    webkit_web_view_load_bytes _obj' bytes' maybeMime_type maybeEncoding maybeBase_uri
    touchManagedPtr _obj
    touchManagedPtr bytes
    freeMem maybeMime_type
    freeMem maybeEncoding
    freeMem maybeBase_uri
    return ()

-- method WebView::load_html
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "content", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "base_uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_load_html" webkit_web_view_load_html :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- content : TBasicType TUTF8
    CString ->                              -- base_uri : TBasicType TUTF8
    IO ()


webViewLoadHtml ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- content
    Maybe (T.Text) ->                       -- base_uri
    m ()
webViewLoadHtml _obj content base_uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    content' <- textToCString content
    maybeBase_uri <- case base_uri of
        Nothing -> return nullPtr
        Just jBase_uri -> do
            jBase_uri' <- textToCString jBase_uri
            return jBase_uri'
    webkit_web_view_load_html _obj' content' maybeBase_uri
    touchManagedPtr _obj
    freeMem content'
    freeMem maybeBase_uri
    return ()

-- method WebView::load_plain_text
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "plain_text", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "plain_text", argType = TBasicType TUTF8, 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_view_load_plain_text" webkit_web_view_load_plain_text :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- plain_text : TBasicType TUTF8
    IO ()


webViewLoadPlainText ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- plain_text
    m ()
webViewLoadPlainText _obj plain_text = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    plain_text' <- textToCString plain_text
    webkit_web_view_load_plain_text _obj' plain_text'
    touchManagedPtr _obj
    freeMem plain_text'
    return ()

-- method WebView::load_request
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "request", argType = TInterface "WebKit2" "URIRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "request", argType = TInterface "WebKit2" "URIRequest", 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_view_load_request" webkit_web_view_load_request :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr URIRequest ->                       -- request : TInterface "WebKit2" "URIRequest"
    IO ()


webViewLoadRequest ::
    (MonadIO m, WebViewK a, URIRequestK b) =>
    a ->                                    -- _obj
    b ->                                    -- request
    m ()
webViewLoadRequest _obj request = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let request' = unsafeManagedPtrCastPtr request
    webkit_web_view_load_request _obj' request'
    touchManagedPtr _obj
    touchManagedPtr request
    return ()

-- method WebView::load_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "uri", argType = TBasicType TUTF8, 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_view_load_uri" webkit_web_view_load_uri :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- uri : TBasicType TUTF8
    IO ()


webViewLoadUri ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    T.Text ->                               -- uri
    m ()
webViewLoadUri _obj uri = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    uri' <- textToCString uri
    webkit_web_view_load_uri _obj' uri'
    touchManagedPtr _obj
    freeMem uri'
    return ()

-- method WebView::new_with_related_view
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Widget"
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_new_with_related_view" webkit_web_view_new_with_related_view :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO (Ptr Gtk.Widget)


webViewNewWithRelatedView ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m Gtk.Widget
webViewNewWithRelatedView _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_web_view_new_with_related_view _obj'
    checkUnexpectedReturnNULL "webkit_web_view_new_with_related_view" result
    result' <- (wrapObject Gtk.Widget) result
    touchManagedPtr _obj
    return result'

-- method WebView::reload
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", 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_view_reload" webkit_web_view_reload :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO ()


webViewReload ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m ()
webViewReload _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_view_reload _obj'
    touchManagedPtr _obj
    return ()

-- method WebView::reload_bypass_cache
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", 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_view_reload_bypass_cache" webkit_web_view_reload_bypass_cache :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO ()


webViewReloadBypassCache ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m ()
webViewReloadBypassCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_view_reload_bypass_cache _obj'
    touchManagedPtr _obj
    return ()

-- method WebView::run_javascript
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "script", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "script", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript" webkit_web_view_run_javascript :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- script : TBasicType TUTF8
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webViewRunJavascript ::
    (MonadIO m, WebViewK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- script
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webViewRunJavascript _obj script cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    script' <- textToCString script
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_view_run_javascript _obj' script' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    freeMem script'
    return ()

-- method WebView::run_javascript_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "JavascriptResult"
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_finish" webkit_web_view_run_javascript_finish :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr JavascriptResult)


webViewRunJavascriptFinish ::
    (MonadIO m, WebViewK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m JavascriptResult
webViewRunJavascriptFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_web_view_run_javascript_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_web_view_run_javascript_finish" result
        result' <- (wrapBoxed JavascriptResult) result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

-- method WebView::run_javascript_from_gresource
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "resource", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_from_gresource" webkit_web_view_run_javascript_from_gresource :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- resource : TBasicType TUTF8
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webViewRunJavascriptFromGresource ::
    (MonadIO m, WebViewK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    T.Text ->                               -- resource
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webViewRunJavascriptFromGresource _obj resource cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    resource' <- textToCString resource
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_view_run_javascript_from_gresource _obj' resource' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    freeMem resource'
    return ()

-- method WebView::run_javascript_from_gresource_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2" "JavascriptResult"
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_run_javascript_from_gresource_finish" webkit_web_view_run_javascript_from_gresource_finish :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr JavascriptResult)


webViewRunJavascriptFromGresourceFinish ::
    (MonadIO m, WebViewK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m JavascriptResult
webViewRunJavascriptFromGresourceFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_web_view_run_javascript_from_gresource_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_web_view_run_javascript_from_gresource_finish" result
        result' <- (wrapBoxed JavascriptResult) result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

-- method WebView::save
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "save_mode", argType = TInterface "WebKit2" "SaveMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "save_mode", argType = TInterface "WebKit2" "SaveMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 4, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_save" webkit_web_view_save :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CUInt ->                                -- save_mode : TInterface "WebKit2" "SaveMode"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webViewSave ::
    (MonadIO m, WebViewK a, Gio.CancellableK b) =>
    a ->                                    -- _obj
    SaveMode ->                             -- save_mode
    Maybe (b) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webViewSave _obj save_mode cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let save_mode' = (fromIntegral . fromEnum) save_mode
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_view_save _obj' save_mode' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    whenJust cancellable touchManagedPtr
    return ()

-- method WebView::save_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "InputStream"
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_save_finish" webkit_web_view_save_finish :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Gio.InputStream)


webViewSaveFinish ::
    (MonadIO m, WebViewK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m Gio.InputStream
webViewSaveFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        result <- propagateGError $ webkit_web_view_save_finish _obj' result_'
        checkUnexpectedReturnNULL "webkit_web_view_save_finish" result
        result' <- (wrapObject Gio.InputStream) result
        touchManagedPtr _obj
        touchManagedPtr result_
        return result'
     ) (do
        return ()
     )

-- method WebView::save_to_file
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "save_mode", argType = TInterface "WebKit2" "SaveMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "file", argType = TInterface "Gio" "File", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "save_mode", argType = TInterface "WebKit2" "SaveMode", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "cancellable", argType = TInterface "Gio" "Cancellable", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "callback", argType = TInterface "Gio" "AsyncReadyCallback", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = 5, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_web_view_save_to_file" webkit_web_view_save_to_file :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.File ->                         -- file : TInterface "Gio" "File"
    CUInt ->                                -- save_mode : TInterface "WebKit2" "SaveMode"
    Ptr Gio.Cancellable ->                  -- cancellable : TInterface "Gio" "Cancellable"
    FunPtr Gio.AsyncReadyCallbackC ->       -- callback : TInterface "Gio" "AsyncReadyCallback"
    Ptr () ->                               -- user_data : TBasicType TVoid
    IO ()


webViewSaveToFile ::
    (MonadIO m, WebViewK a, Gio.FileK b, Gio.CancellableK c) =>
    a ->                                    -- _obj
    b ->                                    -- file
    SaveMode ->                             -- save_mode
    Maybe (c) ->                            -- cancellable
    Maybe (Gio.AsyncReadyCallback) ->       -- callback
    m ()
webViewSaveToFile _obj file save_mode cancellable callback = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let file' = unsafeManagedPtrCastPtr file
    let save_mode' = (fromIntegral . fromEnum) save_mode
    maybeCancellable <- case cancellable of
        Nothing -> return nullPtr
        Just jCancellable -> do
            let jCancellable' = unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.AsyncReadyCallbackC))
    maybeCallback <- case callback of
        Nothing -> return (castPtrToFunPtr nullPtr)
        Just jCallback -> do
            jCallback' <- Gio.mkAsyncReadyCallback (Gio.asyncReadyCallbackWrapper (Just ptrcallback) jCallback)
            poke ptrcallback jCallback'
            return jCallback'
    let user_data = nullPtr
    webkit_web_view_save_to_file _obj' file' save_mode' maybeCancellable maybeCallback user_data
    touchManagedPtr _obj
    touchManagedPtr file
    whenJust cancellable touchManagedPtr
    return ()

-- method WebView::save_to_file_finish
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "result", argType = TInterface "Gio" "AsyncResult", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : True
-- Skip return : False

foreign import ccall "webkit_web_view_save_to_file_finish" webkit_web_view_save_to_file_finish :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gio.AsyncResult ->                  -- result : TInterface "Gio" "AsyncResult"
    Ptr (Ptr GError) ->                     -- error
    IO CInt


webViewSaveToFileFinish ::
    (MonadIO m, WebViewK a, Gio.AsyncResultK b) =>
    a ->                                    -- _obj
    b ->                                    -- result
    m ()
webViewSaveToFileFinish _obj result_ = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let result_' = unsafeManagedPtrCastPtr result_
    onException (do
        _ <- propagateGError $ webkit_web_view_save_to_file_finish _obj' result_'
        touchManagedPtr _obj
        touchManagedPtr result_
        return ()
     ) (do
        return ()
     )

-- method WebView::set_background_color
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "rgba", argType = TInterface "Gdk" "RGBA", 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_view_set_background_color" webkit_web_view_set_background_color :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Gdk.RGBA ->                         -- rgba : TInterface "Gdk" "RGBA"
    IO ()


webViewSetBackgroundColor ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    Gdk.RGBA ->                             -- rgba
    m ()
webViewSetBackgroundColor _obj rgba = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let rgba' = unsafeManagedPtrGetPtr rgba
    webkit_web_view_set_background_color _obj' rgba'
    touchManagedPtr _obj
    touchManagedPtr rgba
    return ()

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

foreign import ccall "webkit_web_view_set_custom_charset" webkit_web_view_set_custom_charset :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CString ->                              -- charset : TBasicType TUTF8
    IO ()


webViewSetCustomCharset ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    Maybe (T.Text) ->                       -- charset
    m ()
webViewSetCustomCharset _obj charset = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    maybeCharset <- case charset of
        Nothing -> return nullPtr
        Just jCharset -> do
            jCharset' <- textToCString jCharset
            return jCharset'
    webkit_web_view_set_custom_charset _obj' maybeCharset
    touchManagedPtr _obj
    freeMem maybeCharset
    return ()

-- method WebView::set_editable
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "editable", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "editable", argType = TBasicType TBoolean, 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_view_set_editable" webkit_web_view_set_editable :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CInt ->                                 -- editable : TBasicType TBoolean
    IO ()


webViewSetEditable ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    Bool ->                                 -- editable
    m ()
webViewSetEditable _obj editable = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let editable' = (fromIntegral . fromEnum) editable
    webkit_web_view_set_editable _obj' editable'
    touchManagedPtr _obj
    return ()

-- method WebView::set_settings
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "settings", argType = TInterface "WebKit2" "Settings", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "settings", argType = TInterface "WebKit2" "Settings", 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_view_set_settings" webkit_web_view_set_settings :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    Ptr Settings ->                         -- settings : TInterface "WebKit2" "Settings"
    IO ()


webViewSetSettings ::
    (MonadIO m, WebViewK a, SettingsK b) =>
    a ->                                    -- _obj
    b ->                                    -- settings
    m ()
webViewSetSettings _obj settings = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let settings' = unsafeManagedPtrCastPtr settings
    webkit_web_view_set_settings _obj' settings'
    touchManagedPtr _obj
    touchManagedPtr settings
    return ()

-- method WebView::set_zoom_level
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "zoom_level", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "zoom_level", argType = TBasicType TDouble, 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_view_set_zoom_level" webkit_web_view_set_zoom_level :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    CDouble ->                              -- zoom_level : TBasicType TDouble
    IO ()


webViewSetZoomLevel ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    Double ->                               -- zoom_level
    m ()
webViewSetZoomLevel _obj zoom_level = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let zoom_level' = realToFrac zoom_level
    webkit_web_view_set_zoom_level _obj' zoom_level'
    touchManagedPtr _obj
    return ()

-- method WebView::stop_loading
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WebView", 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_view_stop_loading" webkit_web_view_stop_loading :: 
    Ptr WebView ->                          -- _obj : TInterface "WebKit2" "WebView"
    IO ()


webViewStopLoading ::
    (MonadIO m, WebViewK a) =>
    a ->                                    -- _obj
    m ()
webViewStopLoading _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    webkit_web_view_stop_loading _obj'
    touchManagedPtr _obj
    return ()

-- signal WebView::authenticate
type WebViewAuthenticateCallback =
    AuthenticationRequest ->
    IO Bool

noWebViewAuthenticateCallback :: Maybe WebViewAuthenticateCallback
noWebViewAuthenticateCallback = Nothing

type WebViewAuthenticateCallbackC =
    Ptr () ->                               -- object
    Ptr AuthenticationRequest ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewAuthenticateCallback :: WebViewAuthenticateCallbackC -> IO (FunPtr WebViewAuthenticateCallbackC)

webViewAuthenticateClosure :: WebViewAuthenticateCallback -> IO Closure
webViewAuthenticateClosure cb = newCClosure =<< mkWebViewAuthenticateCallback wrapped
    where wrapped = webViewAuthenticateCallbackWrapper cb

webViewAuthenticateCallbackWrapper ::
    WebViewAuthenticateCallback ->
    Ptr () ->
    Ptr AuthenticationRequest ->
    Ptr () ->
    IO CInt
webViewAuthenticateCallbackWrapper _cb _ request _ = do
    request' <- (newObject AuthenticationRequest) request
    result <- _cb  request'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewAuthenticate :: (GObject a, MonadIO m) => a -> WebViewAuthenticateCallback -> m SignalHandlerId
onWebViewAuthenticate obj cb = liftIO $ connectWebViewAuthenticate obj cb SignalConnectBefore
afterWebViewAuthenticate :: (GObject a, MonadIO m) => a -> WebViewAuthenticateCallback -> m SignalHandlerId
afterWebViewAuthenticate obj cb = connectWebViewAuthenticate obj cb SignalConnectAfter

connectWebViewAuthenticate :: (GObject a, MonadIO m) =>
                              a -> WebViewAuthenticateCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewAuthenticate obj cb after = liftIO $ do
    cb' <- mkWebViewAuthenticateCallback (webViewAuthenticateCallbackWrapper cb)
    connectSignalFunPtr obj "authenticate" cb' after

-- signal WebView::close
type WebViewCloseCallback =
    IO ()

noWebViewCloseCallback :: Maybe WebViewCloseCallback
noWebViewCloseCallback = Nothing

type WebViewCloseCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewCloseCallback :: WebViewCloseCallbackC -> IO (FunPtr WebViewCloseCallbackC)

webViewCloseClosure :: WebViewCloseCallback -> IO Closure
webViewCloseClosure cb = newCClosure =<< mkWebViewCloseCallback wrapped
    where wrapped = webViewCloseCallbackWrapper cb

webViewCloseCallbackWrapper ::
    WebViewCloseCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webViewCloseCallbackWrapper _cb _ _ = do
    _cb 

onWebViewClose :: (GObject a, MonadIO m) => a -> WebViewCloseCallback -> m SignalHandlerId
onWebViewClose obj cb = liftIO $ connectWebViewClose obj cb SignalConnectBefore
afterWebViewClose :: (GObject a, MonadIO m) => a -> WebViewCloseCallback -> m SignalHandlerId
afterWebViewClose obj cb = connectWebViewClose obj cb SignalConnectAfter

connectWebViewClose :: (GObject a, MonadIO m) =>
                       a -> WebViewCloseCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewClose obj cb after = liftIO $ do
    cb' <- mkWebViewCloseCallback (webViewCloseCallbackWrapper cb)
    connectSignalFunPtr obj "close" cb' after

-- signal WebView::context-menu
type WebViewContextMenuCallback =
    ContextMenu ->
    Gdk.Event ->
    HitTestResult ->
    IO Bool

noWebViewContextMenuCallback :: Maybe WebViewContextMenuCallback
noWebViewContextMenuCallback = Nothing

type WebViewContextMenuCallbackC =
    Ptr () ->                               -- object
    Ptr ContextMenu ->
    Ptr Gdk.Event ->
    Ptr HitTestResult ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewContextMenuCallback :: WebViewContextMenuCallbackC -> IO (FunPtr WebViewContextMenuCallbackC)

webViewContextMenuClosure :: WebViewContextMenuCallback -> IO Closure
webViewContextMenuClosure cb = newCClosure =<< mkWebViewContextMenuCallback wrapped
    where wrapped = webViewContextMenuCallbackWrapper cb

webViewContextMenuCallbackWrapper ::
    WebViewContextMenuCallback ->
    Ptr () ->
    Ptr ContextMenu ->
    Ptr Gdk.Event ->
    Ptr HitTestResult ->
    Ptr () ->
    IO CInt
webViewContextMenuCallbackWrapper _cb _ context_menu event hit_test_result _ = do
    context_menu' <- (newObject ContextMenu) context_menu
    event' <- (newBoxed Gdk.Event) event
    hit_test_result' <- (newObject HitTestResult) hit_test_result
    result <- _cb  context_menu' event' hit_test_result'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewContextMenu :: (GObject a, MonadIO m) => a -> WebViewContextMenuCallback -> m SignalHandlerId
onWebViewContextMenu obj cb = liftIO $ connectWebViewContextMenu obj cb SignalConnectBefore
afterWebViewContextMenu :: (GObject a, MonadIO m) => a -> WebViewContextMenuCallback -> m SignalHandlerId
afterWebViewContextMenu obj cb = connectWebViewContextMenu obj cb SignalConnectAfter

connectWebViewContextMenu :: (GObject a, MonadIO m) =>
                             a -> WebViewContextMenuCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewContextMenu obj cb after = liftIO $ do
    cb' <- mkWebViewContextMenuCallback (webViewContextMenuCallbackWrapper cb)
    connectSignalFunPtr obj "context-menu" cb' after

-- signal WebView::context-menu-dismissed
type WebViewContextMenuDismissedCallback =
    IO ()

noWebViewContextMenuDismissedCallback :: Maybe WebViewContextMenuDismissedCallback
noWebViewContextMenuDismissedCallback = Nothing

type WebViewContextMenuDismissedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewContextMenuDismissedCallback :: WebViewContextMenuDismissedCallbackC -> IO (FunPtr WebViewContextMenuDismissedCallbackC)

webViewContextMenuDismissedClosure :: WebViewContextMenuDismissedCallback -> IO Closure
webViewContextMenuDismissedClosure cb = newCClosure =<< mkWebViewContextMenuDismissedCallback wrapped
    where wrapped = webViewContextMenuDismissedCallbackWrapper cb

webViewContextMenuDismissedCallbackWrapper ::
    WebViewContextMenuDismissedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webViewContextMenuDismissedCallbackWrapper _cb _ _ = do
    _cb 

onWebViewContextMenuDismissed :: (GObject a, MonadIO m) => a -> WebViewContextMenuDismissedCallback -> m SignalHandlerId
onWebViewContextMenuDismissed obj cb = liftIO $ connectWebViewContextMenuDismissed obj cb SignalConnectBefore
afterWebViewContextMenuDismissed :: (GObject a, MonadIO m) => a -> WebViewContextMenuDismissedCallback -> m SignalHandlerId
afterWebViewContextMenuDismissed obj cb = connectWebViewContextMenuDismissed obj cb SignalConnectAfter

connectWebViewContextMenuDismissed :: (GObject a, MonadIO m) =>
                                      a -> WebViewContextMenuDismissedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewContextMenuDismissed obj cb after = liftIO $ do
    cb' <- mkWebViewContextMenuDismissedCallback (webViewContextMenuDismissedCallbackWrapper cb)
    connectSignalFunPtr obj "context-menu-dismissed" cb' after

-- signal WebView::create
type WebViewCreateCallback =
    NavigationAction ->
    IO Gtk.Widget

noWebViewCreateCallback :: Maybe WebViewCreateCallback
noWebViewCreateCallback = Nothing

type WebViewCreateCallbackC =
    Ptr () ->                               -- object
    Ptr NavigationAction ->
    Ptr () ->                               -- user_data
    IO (Ptr Gtk.Widget)

foreign import ccall "wrapper"
    mkWebViewCreateCallback :: WebViewCreateCallbackC -> IO (FunPtr WebViewCreateCallbackC)

webViewCreateClosure :: WebViewCreateCallback -> IO Closure
webViewCreateClosure cb = newCClosure =<< mkWebViewCreateCallback wrapped
    where wrapped = webViewCreateCallbackWrapper cb

webViewCreateCallbackWrapper ::
    WebViewCreateCallback ->
    Ptr () ->
    Ptr NavigationAction ->
    Ptr () ->
    IO (Ptr Gtk.Widget)
webViewCreateCallbackWrapper _cb _ navigation_action _ = do
    navigation_action' <- (newBoxed NavigationAction) navigation_action
    result <- _cb  navigation_action'
    result' <- refObject result
    return result'

onWebViewCreate :: (GObject a, MonadIO m) => a -> WebViewCreateCallback -> m SignalHandlerId
onWebViewCreate obj cb = liftIO $ connectWebViewCreate obj cb SignalConnectBefore
afterWebViewCreate :: (GObject a, MonadIO m) => a -> WebViewCreateCallback -> m SignalHandlerId
afterWebViewCreate obj cb = connectWebViewCreate obj cb SignalConnectAfter

connectWebViewCreate :: (GObject a, MonadIO m) =>
                        a -> WebViewCreateCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewCreate obj cb after = liftIO $ do
    cb' <- mkWebViewCreateCallback (webViewCreateCallbackWrapper cb)
    connectSignalFunPtr obj "create" cb' after

-- signal WebView::decide-policy
type WebViewDecidePolicyCallback =
    PolicyDecision ->
    PolicyDecisionType ->
    IO Bool

noWebViewDecidePolicyCallback :: Maybe WebViewDecidePolicyCallback
noWebViewDecidePolicyCallback = Nothing

type WebViewDecidePolicyCallbackC =
    Ptr () ->                               -- object
    Ptr PolicyDecision ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewDecidePolicyCallback :: WebViewDecidePolicyCallbackC -> IO (FunPtr WebViewDecidePolicyCallbackC)

webViewDecidePolicyClosure :: WebViewDecidePolicyCallback -> IO Closure
webViewDecidePolicyClosure cb = newCClosure =<< mkWebViewDecidePolicyCallback wrapped
    where wrapped = webViewDecidePolicyCallbackWrapper cb

webViewDecidePolicyCallbackWrapper ::
    WebViewDecidePolicyCallback ->
    Ptr () ->
    Ptr PolicyDecision ->
    CUInt ->
    Ptr () ->
    IO CInt
webViewDecidePolicyCallbackWrapper _cb _ decision decision_type _ = do
    decision' <- (newObject PolicyDecision) decision
    let decision_type' = (toEnum . fromIntegral) decision_type
    result <- _cb  decision' decision_type'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewDecidePolicy :: (GObject a, MonadIO m) => a -> WebViewDecidePolicyCallback -> m SignalHandlerId
onWebViewDecidePolicy obj cb = liftIO $ connectWebViewDecidePolicy obj cb SignalConnectBefore
afterWebViewDecidePolicy :: (GObject a, MonadIO m) => a -> WebViewDecidePolicyCallback -> m SignalHandlerId
afterWebViewDecidePolicy obj cb = connectWebViewDecidePolicy obj cb SignalConnectAfter

connectWebViewDecidePolicy :: (GObject a, MonadIO m) =>
                              a -> WebViewDecidePolicyCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewDecidePolicy obj cb after = liftIO $ do
    cb' <- mkWebViewDecidePolicyCallback (webViewDecidePolicyCallbackWrapper cb)
    connectSignalFunPtr obj "decide-policy" cb' after

-- signal WebView::enter-fullscreen
type WebViewEnterFullscreenCallback =
    IO Bool

noWebViewEnterFullscreenCallback :: Maybe WebViewEnterFullscreenCallback
noWebViewEnterFullscreenCallback = Nothing

type WebViewEnterFullscreenCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewEnterFullscreenCallback :: WebViewEnterFullscreenCallbackC -> IO (FunPtr WebViewEnterFullscreenCallbackC)

webViewEnterFullscreenClosure :: WebViewEnterFullscreenCallback -> IO Closure
webViewEnterFullscreenClosure cb = newCClosure =<< mkWebViewEnterFullscreenCallback wrapped
    where wrapped = webViewEnterFullscreenCallbackWrapper cb

webViewEnterFullscreenCallbackWrapper ::
    WebViewEnterFullscreenCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webViewEnterFullscreenCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewEnterFullscreen :: (GObject a, MonadIO m) => a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
onWebViewEnterFullscreen obj cb = liftIO $ connectWebViewEnterFullscreen obj cb SignalConnectBefore
afterWebViewEnterFullscreen :: (GObject a, MonadIO m) => a -> WebViewEnterFullscreenCallback -> m SignalHandlerId
afterWebViewEnterFullscreen obj cb = connectWebViewEnterFullscreen obj cb SignalConnectAfter

connectWebViewEnterFullscreen :: (GObject a, MonadIO m) =>
                                 a -> WebViewEnterFullscreenCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewEnterFullscreen obj cb after = liftIO $ do
    cb' <- mkWebViewEnterFullscreenCallback (webViewEnterFullscreenCallbackWrapper cb)
    connectSignalFunPtr obj "enter-fullscreen" cb' after

-- signal WebView::insecure-content-detected
type WebViewInsecureContentDetectedCallback =
    InsecureContentEvent ->
    IO ()

noWebViewInsecureContentDetectedCallback :: Maybe WebViewInsecureContentDetectedCallback
noWebViewInsecureContentDetectedCallback = Nothing

type WebViewInsecureContentDetectedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewInsecureContentDetectedCallback :: WebViewInsecureContentDetectedCallbackC -> IO (FunPtr WebViewInsecureContentDetectedCallbackC)

webViewInsecureContentDetectedClosure :: WebViewInsecureContentDetectedCallback -> IO Closure
webViewInsecureContentDetectedClosure cb = newCClosure =<< mkWebViewInsecureContentDetectedCallback wrapped
    where wrapped = webViewInsecureContentDetectedCallbackWrapper cb

webViewInsecureContentDetectedCallbackWrapper ::
    WebViewInsecureContentDetectedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
webViewInsecureContentDetectedCallbackWrapper _cb _ event _ = do
    let event' = (toEnum . fromIntegral) event
    _cb  event'

onWebViewInsecureContentDetected :: (GObject a, MonadIO m) => a -> WebViewInsecureContentDetectedCallback -> m SignalHandlerId
onWebViewInsecureContentDetected obj cb = liftIO $ connectWebViewInsecureContentDetected obj cb SignalConnectBefore
afterWebViewInsecureContentDetected :: (GObject a, MonadIO m) => a -> WebViewInsecureContentDetectedCallback -> m SignalHandlerId
afterWebViewInsecureContentDetected obj cb = connectWebViewInsecureContentDetected obj cb SignalConnectAfter

connectWebViewInsecureContentDetected :: (GObject a, MonadIO m) =>
                                         a -> WebViewInsecureContentDetectedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewInsecureContentDetected obj cb after = liftIO $ do
    cb' <- mkWebViewInsecureContentDetectedCallback (webViewInsecureContentDetectedCallbackWrapper cb)
    connectSignalFunPtr obj "insecure-content-detected" cb' after

-- signal WebView::leave-fullscreen
type WebViewLeaveFullscreenCallback =
    IO Bool

noWebViewLeaveFullscreenCallback :: Maybe WebViewLeaveFullscreenCallback
noWebViewLeaveFullscreenCallback = Nothing

type WebViewLeaveFullscreenCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewLeaveFullscreenCallback :: WebViewLeaveFullscreenCallbackC -> IO (FunPtr WebViewLeaveFullscreenCallbackC)

webViewLeaveFullscreenClosure :: WebViewLeaveFullscreenCallback -> IO Closure
webViewLeaveFullscreenClosure cb = newCClosure =<< mkWebViewLeaveFullscreenCallback wrapped
    where wrapped = webViewLeaveFullscreenCallbackWrapper cb

webViewLeaveFullscreenCallbackWrapper ::
    WebViewLeaveFullscreenCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webViewLeaveFullscreenCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewLeaveFullscreen :: (GObject a, MonadIO m) => a -> WebViewLeaveFullscreenCallback -> m SignalHandlerId
onWebViewLeaveFullscreen obj cb = liftIO $ connectWebViewLeaveFullscreen obj cb SignalConnectBefore
afterWebViewLeaveFullscreen :: (GObject a, MonadIO m) => a -> WebViewLeaveFullscreenCallback -> m SignalHandlerId
afterWebViewLeaveFullscreen obj cb = connectWebViewLeaveFullscreen obj cb SignalConnectAfter

connectWebViewLeaveFullscreen :: (GObject a, MonadIO m) =>
                                 a -> WebViewLeaveFullscreenCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewLeaveFullscreen obj cb after = liftIO $ do
    cb' <- mkWebViewLeaveFullscreenCallback (webViewLeaveFullscreenCallbackWrapper cb)
    connectSignalFunPtr obj "leave-fullscreen" cb' after

-- signal WebView::load-changed
type WebViewLoadChangedCallback =
    LoadEvent ->
    IO ()

noWebViewLoadChangedCallback :: Maybe WebViewLoadChangedCallback
noWebViewLoadChangedCallback = Nothing

type WebViewLoadChangedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewLoadChangedCallback :: WebViewLoadChangedCallbackC -> IO (FunPtr WebViewLoadChangedCallbackC)

webViewLoadChangedClosure :: WebViewLoadChangedCallback -> IO Closure
webViewLoadChangedClosure cb = newCClosure =<< mkWebViewLoadChangedCallback wrapped
    where wrapped = webViewLoadChangedCallbackWrapper cb

webViewLoadChangedCallbackWrapper ::
    WebViewLoadChangedCallback ->
    Ptr () ->
    CUInt ->
    Ptr () ->
    IO ()
webViewLoadChangedCallbackWrapper _cb _ load_event _ = do
    let load_event' = (toEnum . fromIntegral) load_event
    _cb  load_event'

onWebViewLoadChanged :: (GObject a, MonadIO m) => a -> WebViewLoadChangedCallback -> m SignalHandlerId
onWebViewLoadChanged obj cb = liftIO $ connectWebViewLoadChanged obj cb SignalConnectBefore
afterWebViewLoadChanged :: (GObject a, MonadIO m) => a -> WebViewLoadChangedCallback -> m SignalHandlerId
afterWebViewLoadChanged obj cb = connectWebViewLoadChanged obj cb SignalConnectAfter

connectWebViewLoadChanged :: (GObject a, MonadIO m) =>
                             a -> WebViewLoadChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewLoadChanged obj cb after = liftIO $ do
    cb' <- mkWebViewLoadChangedCallback (webViewLoadChangedCallbackWrapper cb)
    connectSignalFunPtr obj "load-changed" cb' after

-- signal WebView::load-failed
type WebViewLoadFailedCallback =
    LoadEvent ->
    T.Text ->
    Ptr () ->
    IO Bool

noWebViewLoadFailedCallback :: Maybe WebViewLoadFailedCallback
noWebViewLoadFailedCallback = Nothing

type WebViewLoadFailedCallbackC =
    Ptr () ->                               -- object
    CUInt ->
    CString ->
    Ptr () ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewLoadFailedCallback :: WebViewLoadFailedCallbackC -> IO (FunPtr WebViewLoadFailedCallbackC)

webViewLoadFailedClosure :: WebViewLoadFailedCallback -> IO Closure
webViewLoadFailedClosure cb = newCClosure =<< mkWebViewLoadFailedCallback wrapped
    where wrapped = webViewLoadFailedCallbackWrapper cb

webViewLoadFailedCallbackWrapper ::
    WebViewLoadFailedCallback ->
    Ptr () ->
    CUInt ->
    CString ->
    Ptr () ->
    Ptr () ->
    IO CInt
webViewLoadFailedCallbackWrapper _cb _ load_event failing_uri error_ _ = do
    let load_event' = (toEnum . fromIntegral) load_event
    failing_uri' <- cstringToText failing_uri
    result <- _cb  load_event' failing_uri' error_
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewLoadFailed :: (GObject a, MonadIO m) => a -> WebViewLoadFailedCallback -> m SignalHandlerId
onWebViewLoadFailed obj cb = liftIO $ connectWebViewLoadFailed obj cb SignalConnectBefore
afterWebViewLoadFailed :: (GObject a, MonadIO m) => a -> WebViewLoadFailedCallback -> m SignalHandlerId
afterWebViewLoadFailed obj cb = connectWebViewLoadFailed obj cb SignalConnectAfter

connectWebViewLoadFailed :: (GObject a, MonadIO m) =>
                            a -> WebViewLoadFailedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewLoadFailed obj cb after = liftIO $ do
    cb' <- mkWebViewLoadFailedCallback (webViewLoadFailedCallbackWrapper cb)
    connectSignalFunPtr obj "load-failed" cb' after

-- signal WebView::load-failed-with-tls-errors
type WebViewLoadFailedWithTlsErrorsCallback =
    T.Text ->
    Gio.TlsCertificate ->
    [Gio.TlsCertificateFlags] ->
    IO Bool

noWebViewLoadFailedWithTlsErrorsCallback :: Maybe WebViewLoadFailedWithTlsErrorsCallback
noWebViewLoadFailedWithTlsErrorsCallback = Nothing

type WebViewLoadFailedWithTlsErrorsCallbackC =
    Ptr () ->                               -- object
    CString ->
    Ptr Gio.TlsCertificate ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewLoadFailedWithTlsErrorsCallback :: WebViewLoadFailedWithTlsErrorsCallbackC -> IO (FunPtr WebViewLoadFailedWithTlsErrorsCallbackC)

webViewLoadFailedWithTlsErrorsClosure :: WebViewLoadFailedWithTlsErrorsCallback -> IO Closure
webViewLoadFailedWithTlsErrorsClosure cb = newCClosure =<< mkWebViewLoadFailedWithTlsErrorsCallback wrapped
    where wrapped = webViewLoadFailedWithTlsErrorsCallbackWrapper cb

webViewLoadFailedWithTlsErrorsCallbackWrapper ::
    WebViewLoadFailedWithTlsErrorsCallback ->
    Ptr () ->
    CString ->
    Ptr Gio.TlsCertificate ->
    CUInt ->
    Ptr () ->
    IO CInt
webViewLoadFailedWithTlsErrorsCallbackWrapper _cb _ failing_uri certificate errors _ = do
    failing_uri' <- cstringToText failing_uri
    certificate' <- (newObject Gio.TlsCertificate) certificate
    let errors' = wordToGFlags errors
    result <- _cb  failing_uri' certificate' errors'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewLoadFailedWithTlsErrors :: (GObject a, MonadIO m) => a -> WebViewLoadFailedWithTlsErrorsCallback -> m SignalHandlerId
onWebViewLoadFailedWithTlsErrors obj cb = liftIO $ connectWebViewLoadFailedWithTlsErrors obj cb SignalConnectBefore
afterWebViewLoadFailedWithTlsErrors :: (GObject a, MonadIO m) => a -> WebViewLoadFailedWithTlsErrorsCallback -> m SignalHandlerId
afterWebViewLoadFailedWithTlsErrors obj cb = connectWebViewLoadFailedWithTlsErrors obj cb SignalConnectAfter

connectWebViewLoadFailedWithTlsErrors :: (GObject a, MonadIO m) =>
                                         a -> WebViewLoadFailedWithTlsErrorsCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewLoadFailedWithTlsErrors obj cb after = liftIO $ do
    cb' <- mkWebViewLoadFailedWithTlsErrorsCallback (webViewLoadFailedWithTlsErrorsCallbackWrapper cb)
    connectSignalFunPtr obj "load-failed-with-tls-errors" cb' after

-- signal WebView::mouse-target-changed
type WebViewMouseTargetChangedCallback =
    HitTestResult ->
    Word32 ->
    IO ()

noWebViewMouseTargetChangedCallback :: Maybe WebViewMouseTargetChangedCallback
noWebViewMouseTargetChangedCallback = Nothing

type WebViewMouseTargetChangedCallbackC =
    Ptr () ->                               -- object
    Ptr HitTestResult ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewMouseTargetChangedCallback :: WebViewMouseTargetChangedCallbackC -> IO (FunPtr WebViewMouseTargetChangedCallbackC)

webViewMouseTargetChangedClosure :: WebViewMouseTargetChangedCallback -> IO Closure
webViewMouseTargetChangedClosure cb = newCClosure =<< mkWebViewMouseTargetChangedCallback wrapped
    where wrapped = webViewMouseTargetChangedCallbackWrapper cb

webViewMouseTargetChangedCallbackWrapper ::
    WebViewMouseTargetChangedCallback ->
    Ptr () ->
    Ptr HitTestResult ->
    Word32 ->
    Ptr () ->
    IO ()
webViewMouseTargetChangedCallbackWrapper _cb _ hit_test_result modifiers _ = do
    hit_test_result' <- (newObject HitTestResult) hit_test_result
    _cb  hit_test_result' modifiers

onWebViewMouseTargetChanged :: (GObject a, MonadIO m) => a -> WebViewMouseTargetChangedCallback -> m SignalHandlerId
onWebViewMouseTargetChanged obj cb = liftIO $ connectWebViewMouseTargetChanged obj cb SignalConnectBefore
afterWebViewMouseTargetChanged :: (GObject a, MonadIO m) => a -> WebViewMouseTargetChangedCallback -> m SignalHandlerId
afterWebViewMouseTargetChanged obj cb = connectWebViewMouseTargetChanged obj cb SignalConnectAfter

connectWebViewMouseTargetChanged :: (GObject a, MonadIO m) =>
                                    a -> WebViewMouseTargetChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewMouseTargetChanged obj cb after = liftIO $ do
    cb' <- mkWebViewMouseTargetChangedCallback (webViewMouseTargetChangedCallbackWrapper cb)
    connectSignalFunPtr obj "mouse-target-changed" cb' after

-- signal WebView::permission-request
type WebViewPermissionRequestCallback =
    PermissionRequest ->
    IO Bool

noWebViewPermissionRequestCallback :: Maybe WebViewPermissionRequestCallback
noWebViewPermissionRequestCallback = Nothing

type WebViewPermissionRequestCallbackC =
    Ptr () ->                               -- object
    Ptr PermissionRequest ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewPermissionRequestCallback :: WebViewPermissionRequestCallbackC -> IO (FunPtr WebViewPermissionRequestCallbackC)

webViewPermissionRequestClosure :: WebViewPermissionRequestCallback -> IO Closure
webViewPermissionRequestClosure cb = newCClosure =<< mkWebViewPermissionRequestCallback wrapped
    where wrapped = webViewPermissionRequestCallbackWrapper cb

webViewPermissionRequestCallbackWrapper ::
    WebViewPermissionRequestCallback ->
    Ptr () ->
    Ptr PermissionRequest ->
    Ptr () ->
    IO CInt
webViewPermissionRequestCallbackWrapper _cb _ request _ = do
    request' <- (newObject PermissionRequest) request
    result <- _cb  request'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewPermissionRequest :: (GObject a, MonadIO m) => a -> WebViewPermissionRequestCallback -> m SignalHandlerId
onWebViewPermissionRequest obj cb = liftIO $ connectWebViewPermissionRequest obj cb SignalConnectBefore
afterWebViewPermissionRequest :: (GObject a, MonadIO m) => a -> WebViewPermissionRequestCallback -> m SignalHandlerId
afterWebViewPermissionRequest obj cb = connectWebViewPermissionRequest obj cb SignalConnectAfter

connectWebViewPermissionRequest :: (GObject a, MonadIO m) =>
                                   a -> WebViewPermissionRequestCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewPermissionRequest obj cb after = liftIO $ do
    cb' <- mkWebViewPermissionRequestCallback (webViewPermissionRequestCallbackWrapper cb)
    connectSignalFunPtr obj "permission-request" cb' after

-- signal WebView::print
type WebViewPrintCallback =
    PrintOperation ->
    IO Bool

noWebViewPrintCallback :: Maybe WebViewPrintCallback
noWebViewPrintCallback = Nothing

type WebViewPrintCallbackC =
    Ptr () ->                               -- object
    Ptr PrintOperation ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewPrintCallback :: WebViewPrintCallbackC -> IO (FunPtr WebViewPrintCallbackC)

webViewPrintClosure :: WebViewPrintCallback -> IO Closure
webViewPrintClosure cb = newCClosure =<< mkWebViewPrintCallback wrapped
    where wrapped = webViewPrintCallbackWrapper cb

webViewPrintCallbackWrapper ::
    WebViewPrintCallback ->
    Ptr () ->
    Ptr PrintOperation ->
    Ptr () ->
    IO CInt
webViewPrintCallbackWrapper _cb _ print_operation _ = do
    print_operation' <- (newObject PrintOperation) print_operation
    result <- _cb  print_operation'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewPrint :: (GObject a, MonadIO m) => a -> WebViewPrintCallback -> m SignalHandlerId
onWebViewPrint obj cb = liftIO $ connectWebViewPrint obj cb SignalConnectBefore
afterWebViewPrint :: (GObject a, MonadIO m) => a -> WebViewPrintCallback -> m SignalHandlerId
afterWebViewPrint obj cb = connectWebViewPrint obj cb SignalConnectAfter

connectWebViewPrint :: (GObject a, MonadIO m) =>
                       a -> WebViewPrintCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewPrint obj cb after = liftIO $ do
    cb' <- mkWebViewPrintCallback (webViewPrintCallbackWrapper cb)
    connectSignalFunPtr obj "print" cb' after

-- signal WebView::ready-to-show
type WebViewReadyToShowCallback =
    IO ()

noWebViewReadyToShowCallback :: Maybe WebViewReadyToShowCallback
noWebViewReadyToShowCallback = Nothing

type WebViewReadyToShowCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewReadyToShowCallback :: WebViewReadyToShowCallbackC -> IO (FunPtr WebViewReadyToShowCallbackC)

webViewReadyToShowClosure :: WebViewReadyToShowCallback -> IO Closure
webViewReadyToShowClosure cb = newCClosure =<< mkWebViewReadyToShowCallback wrapped
    where wrapped = webViewReadyToShowCallbackWrapper cb

webViewReadyToShowCallbackWrapper ::
    WebViewReadyToShowCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webViewReadyToShowCallbackWrapper _cb _ _ = do
    _cb 

onWebViewReadyToShow :: (GObject a, MonadIO m) => a -> WebViewReadyToShowCallback -> m SignalHandlerId
onWebViewReadyToShow obj cb = liftIO $ connectWebViewReadyToShow obj cb SignalConnectBefore
afterWebViewReadyToShow :: (GObject a, MonadIO m) => a -> WebViewReadyToShowCallback -> m SignalHandlerId
afterWebViewReadyToShow obj cb = connectWebViewReadyToShow obj cb SignalConnectAfter

connectWebViewReadyToShow :: (GObject a, MonadIO m) =>
                             a -> WebViewReadyToShowCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewReadyToShow obj cb after = liftIO $ do
    cb' <- mkWebViewReadyToShowCallback (webViewReadyToShowCallbackWrapper cb)
    connectSignalFunPtr obj "ready-to-show" cb' after

-- signal WebView::resource-load-started
type WebViewResourceLoadStartedCallback =
    WebResource ->
    URIRequest ->
    IO ()

noWebViewResourceLoadStartedCallback :: Maybe WebViewResourceLoadStartedCallback
noWebViewResourceLoadStartedCallback = Nothing

type WebViewResourceLoadStartedCallbackC =
    Ptr () ->                               -- object
    Ptr WebResource ->
    Ptr URIRequest ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewResourceLoadStartedCallback :: WebViewResourceLoadStartedCallbackC -> IO (FunPtr WebViewResourceLoadStartedCallbackC)

webViewResourceLoadStartedClosure :: WebViewResourceLoadStartedCallback -> IO Closure
webViewResourceLoadStartedClosure cb = newCClosure =<< mkWebViewResourceLoadStartedCallback wrapped
    where wrapped = webViewResourceLoadStartedCallbackWrapper cb

webViewResourceLoadStartedCallbackWrapper ::
    WebViewResourceLoadStartedCallback ->
    Ptr () ->
    Ptr WebResource ->
    Ptr URIRequest ->
    Ptr () ->
    IO ()
webViewResourceLoadStartedCallbackWrapper _cb _ resource request _ = do
    resource' <- (newObject WebResource) resource
    request' <- (newObject URIRequest) request
    _cb  resource' request'

onWebViewResourceLoadStarted :: (GObject a, MonadIO m) => a -> WebViewResourceLoadStartedCallback -> m SignalHandlerId
onWebViewResourceLoadStarted obj cb = liftIO $ connectWebViewResourceLoadStarted obj cb SignalConnectBefore
afterWebViewResourceLoadStarted :: (GObject a, MonadIO m) => a -> WebViewResourceLoadStartedCallback -> m SignalHandlerId
afterWebViewResourceLoadStarted obj cb = connectWebViewResourceLoadStarted obj cb SignalConnectAfter

connectWebViewResourceLoadStarted :: (GObject a, MonadIO m) =>
                                     a -> WebViewResourceLoadStartedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewResourceLoadStarted obj cb after = liftIO $ do
    cb' <- mkWebViewResourceLoadStartedCallback (webViewResourceLoadStartedCallbackWrapper cb)
    connectSignalFunPtr obj "resource-load-started" cb' after

-- signal WebView::run-as-modal
type WebViewRunAsModalCallback =
    IO ()

noWebViewRunAsModalCallback :: Maybe WebViewRunAsModalCallback
noWebViewRunAsModalCallback = Nothing

type WebViewRunAsModalCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewRunAsModalCallback :: WebViewRunAsModalCallbackC -> IO (FunPtr WebViewRunAsModalCallbackC)

webViewRunAsModalClosure :: WebViewRunAsModalCallback -> IO Closure
webViewRunAsModalClosure cb = newCClosure =<< mkWebViewRunAsModalCallback wrapped
    where wrapped = webViewRunAsModalCallbackWrapper cb

webViewRunAsModalCallbackWrapper ::
    WebViewRunAsModalCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
webViewRunAsModalCallbackWrapper _cb _ _ = do
    _cb 

onWebViewRunAsModal :: (GObject a, MonadIO m) => a -> WebViewRunAsModalCallback -> m SignalHandlerId
onWebViewRunAsModal obj cb = liftIO $ connectWebViewRunAsModal obj cb SignalConnectBefore
afterWebViewRunAsModal :: (GObject a, MonadIO m) => a -> WebViewRunAsModalCallback -> m SignalHandlerId
afterWebViewRunAsModal obj cb = connectWebViewRunAsModal obj cb SignalConnectAfter

connectWebViewRunAsModal :: (GObject a, MonadIO m) =>
                            a -> WebViewRunAsModalCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewRunAsModal obj cb after = liftIO $ do
    cb' <- mkWebViewRunAsModalCallback (webViewRunAsModalCallbackWrapper cb)
    connectSignalFunPtr obj "run-as-modal" cb' after

-- signal WebView::run-color-chooser
type WebViewRunColorChooserCallback =
    ColorChooserRequest ->
    IO Bool

noWebViewRunColorChooserCallback :: Maybe WebViewRunColorChooserCallback
noWebViewRunColorChooserCallback = Nothing

type WebViewRunColorChooserCallbackC =
    Ptr () ->                               -- object
    Ptr ColorChooserRequest ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewRunColorChooserCallback :: WebViewRunColorChooserCallbackC -> IO (FunPtr WebViewRunColorChooserCallbackC)

webViewRunColorChooserClosure :: WebViewRunColorChooserCallback -> IO Closure
webViewRunColorChooserClosure cb = newCClosure =<< mkWebViewRunColorChooserCallback wrapped
    where wrapped = webViewRunColorChooserCallbackWrapper cb

webViewRunColorChooserCallbackWrapper ::
    WebViewRunColorChooserCallback ->
    Ptr () ->
    Ptr ColorChooserRequest ->
    Ptr () ->
    IO CInt
webViewRunColorChooserCallbackWrapper _cb _ request _ = do
    request' <- (newObject ColorChooserRequest) request
    result <- _cb  request'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewRunColorChooser :: (GObject a, MonadIO m) => a -> WebViewRunColorChooserCallback -> m SignalHandlerId
onWebViewRunColorChooser obj cb = liftIO $ connectWebViewRunColorChooser obj cb SignalConnectBefore
afterWebViewRunColorChooser :: (GObject a, MonadIO m) => a -> WebViewRunColorChooserCallback -> m SignalHandlerId
afterWebViewRunColorChooser obj cb = connectWebViewRunColorChooser obj cb SignalConnectAfter

connectWebViewRunColorChooser :: (GObject a, MonadIO m) =>
                                 a -> WebViewRunColorChooserCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewRunColorChooser obj cb after = liftIO $ do
    cb' <- mkWebViewRunColorChooserCallback (webViewRunColorChooserCallbackWrapper cb)
    connectSignalFunPtr obj "run-color-chooser" cb' after

-- signal WebView::run-file-chooser
type WebViewRunFileChooserCallback =
    FileChooserRequest ->
    IO Bool

noWebViewRunFileChooserCallback :: Maybe WebViewRunFileChooserCallback
noWebViewRunFileChooserCallback = Nothing

type WebViewRunFileChooserCallbackC =
    Ptr () ->                               -- object
    Ptr FileChooserRequest ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewRunFileChooserCallback :: WebViewRunFileChooserCallbackC -> IO (FunPtr WebViewRunFileChooserCallbackC)

webViewRunFileChooserClosure :: WebViewRunFileChooserCallback -> IO Closure
webViewRunFileChooserClosure cb = newCClosure =<< mkWebViewRunFileChooserCallback wrapped
    where wrapped = webViewRunFileChooserCallbackWrapper cb

webViewRunFileChooserCallbackWrapper ::
    WebViewRunFileChooserCallback ->
    Ptr () ->
    Ptr FileChooserRequest ->
    Ptr () ->
    IO CInt
webViewRunFileChooserCallbackWrapper _cb _ request _ = do
    request' <- (newObject FileChooserRequest) request
    result <- _cb  request'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewRunFileChooser :: (GObject a, MonadIO m) => a -> WebViewRunFileChooserCallback -> m SignalHandlerId
onWebViewRunFileChooser obj cb = liftIO $ connectWebViewRunFileChooser obj cb SignalConnectBefore
afterWebViewRunFileChooser :: (GObject a, MonadIO m) => a -> WebViewRunFileChooserCallback -> m SignalHandlerId
afterWebViewRunFileChooser obj cb = connectWebViewRunFileChooser obj cb SignalConnectAfter

connectWebViewRunFileChooser :: (GObject a, MonadIO m) =>
                                a -> WebViewRunFileChooserCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewRunFileChooser obj cb after = liftIO $ do
    cb' <- mkWebViewRunFileChooserCallback (webViewRunFileChooserCallbackWrapper cb)
    connectSignalFunPtr obj "run-file-chooser" cb' after

-- signal WebView::script-dialog
type WebViewScriptDialogCallback =
    ScriptDialog ->
    IO Bool

noWebViewScriptDialogCallback :: Maybe WebViewScriptDialogCallback
noWebViewScriptDialogCallback = Nothing

type WebViewScriptDialogCallbackC =
    Ptr () ->                               -- object
    Ptr ScriptDialog ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewScriptDialogCallback :: WebViewScriptDialogCallbackC -> IO (FunPtr WebViewScriptDialogCallbackC)

webViewScriptDialogClosure :: WebViewScriptDialogCallback -> IO Closure
webViewScriptDialogClosure cb = newCClosure =<< mkWebViewScriptDialogCallback wrapped
    where wrapped = webViewScriptDialogCallbackWrapper cb

webViewScriptDialogCallbackWrapper ::
    WebViewScriptDialogCallback ->
    Ptr () ->
    Ptr ScriptDialog ->
    Ptr () ->
    IO CInt
webViewScriptDialogCallbackWrapper _cb _ dialog _ = do
    dialog' <- (newBoxed ScriptDialog) dialog
    result <- _cb  dialog'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewScriptDialog :: (GObject a, MonadIO m) => a -> WebViewScriptDialogCallback -> m SignalHandlerId
onWebViewScriptDialog obj cb = liftIO $ connectWebViewScriptDialog obj cb SignalConnectBefore
afterWebViewScriptDialog :: (GObject a, MonadIO m) => a -> WebViewScriptDialogCallback -> m SignalHandlerId
afterWebViewScriptDialog obj cb = connectWebViewScriptDialog obj cb SignalConnectAfter

connectWebViewScriptDialog :: (GObject a, MonadIO m) =>
                              a -> WebViewScriptDialogCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewScriptDialog obj cb after = liftIO $ do
    cb' <- mkWebViewScriptDialogCallback (webViewScriptDialogCallbackWrapper cb)
    connectSignalFunPtr obj "script-dialog" cb' after

-- signal WebView::show-notification
type WebViewShowNotificationCallback =
    Notification ->
    IO Bool

noWebViewShowNotificationCallback :: Maybe WebViewShowNotificationCallback
noWebViewShowNotificationCallback = Nothing

type WebViewShowNotificationCallbackC =
    Ptr () ->                               -- object
    Ptr Notification ->
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewShowNotificationCallback :: WebViewShowNotificationCallbackC -> IO (FunPtr WebViewShowNotificationCallbackC)

webViewShowNotificationClosure :: WebViewShowNotificationCallback -> IO Closure
webViewShowNotificationClosure cb = newCClosure =<< mkWebViewShowNotificationCallback wrapped
    where wrapped = webViewShowNotificationCallbackWrapper cb

webViewShowNotificationCallbackWrapper ::
    WebViewShowNotificationCallback ->
    Ptr () ->
    Ptr Notification ->
    Ptr () ->
    IO CInt
webViewShowNotificationCallbackWrapper _cb _ notification _ = do
    notification' <- (newObject Notification) notification
    result <- _cb  notification'
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewShowNotification :: (GObject a, MonadIO m) => a -> WebViewShowNotificationCallback -> m SignalHandlerId
onWebViewShowNotification obj cb = liftIO $ connectWebViewShowNotification obj cb SignalConnectBefore
afterWebViewShowNotification :: (GObject a, MonadIO m) => a -> WebViewShowNotificationCallback -> m SignalHandlerId
afterWebViewShowNotification obj cb = connectWebViewShowNotification obj cb SignalConnectAfter

connectWebViewShowNotification :: (GObject a, MonadIO m) =>
                                  a -> WebViewShowNotificationCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewShowNotification obj cb after = liftIO $ do
    cb' <- mkWebViewShowNotificationCallback (webViewShowNotificationCallbackWrapper cb)
    connectSignalFunPtr obj "show-notification" cb' after

-- signal WebView::submit-form
type WebViewSubmitFormCallback =
    FormSubmissionRequest ->
    IO ()

noWebViewSubmitFormCallback :: Maybe WebViewSubmitFormCallback
noWebViewSubmitFormCallback = Nothing

type WebViewSubmitFormCallbackC =
    Ptr () ->                               -- object
    Ptr FormSubmissionRequest ->
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkWebViewSubmitFormCallback :: WebViewSubmitFormCallbackC -> IO (FunPtr WebViewSubmitFormCallbackC)

webViewSubmitFormClosure :: WebViewSubmitFormCallback -> IO Closure
webViewSubmitFormClosure cb = newCClosure =<< mkWebViewSubmitFormCallback wrapped
    where wrapped = webViewSubmitFormCallbackWrapper cb

webViewSubmitFormCallbackWrapper ::
    WebViewSubmitFormCallback ->
    Ptr () ->
    Ptr FormSubmissionRequest ->
    Ptr () ->
    IO ()
webViewSubmitFormCallbackWrapper _cb _ request _ = do
    request' <- (newObject FormSubmissionRequest) request
    _cb  request'

onWebViewSubmitForm :: (GObject a, MonadIO m) => a -> WebViewSubmitFormCallback -> m SignalHandlerId
onWebViewSubmitForm obj cb = liftIO $ connectWebViewSubmitForm obj cb SignalConnectBefore
afterWebViewSubmitForm :: (GObject a, MonadIO m) => a -> WebViewSubmitFormCallback -> m SignalHandlerId
afterWebViewSubmitForm obj cb = connectWebViewSubmitForm obj cb SignalConnectAfter

connectWebViewSubmitForm :: (GObject a, MonadIO m) =>
                            a -> WebViewSubmitFormCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewSubmitForm obj cb after = liftIO $ do
    cb' <- mkWebViewSubmitFormCallback (webViewSubmitFormCallbackWrapper cb)
    connectSignalFunPtr obj "submit-form" cb' after

-- signal WebView::web-process-crashed
type WebViewWebProcessCrashedCallback =
    IO Bool

noWebViewWebProcessCrashedCallback :: Maybe WebViewWebProcessCrashedCallback
noWebViewWebProcessCrashedCallback = Nothing

type WebViewWebProcessCrashedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO CInt

foreign import ccall "wrapper"
    mkWebViewWebProcessCrashedCallback :: WebViewWebProcessCrashedCallbackC -> IO (FunPtr WebViewWebProcessCrashedCallbackC)

webViewWebProcessCrashedClosure :: WebViewWebProcessCrashedCallback -> IO Closure
webViewWebProcessCrashedClosure cb = newCClosure =<< mkWebViewWebProcessCrashedCallback wrapped
    where wrapped = webViewWebProcessCrashedCallbackWrapper cb

webViewWebProcessCrashedCallbackWrapper ::
    WebViewWebProcessCrashedCallback ->
    Ptr () ->
    Ptr () ->
    IO CInt
webViewWebProcessCrashedCallbackWrapper _cb _ _ = do
    result <- _cb 
    let result' = (fromIntegral . fromEnum) result
    return result'

onWebViewWebProcessCrashed :: (GObject a, MonadIO m) => a -> WebViewWebProcessCrashedCallback -> m SignalHandlerId
onWebViewWebProcessCrashed obj cb = liftIO $ connectWebViewWebProcessCrashed obj cb SignalConnectBefore
afterWebViewWebProcessCrashed :: (GObject a, MonadIO m) => a -> WebViewWebProcessCrashedCallback -> m SignalHandlerId
afterWebViewWebProcessCrashed obj cb = connectWebViewWebProcessCrashed obj cb SignalConnectAfter

connectWebViewWebProcessCrashed :: (GObject a, MonadIO m) =>
                                   a -> WebViewWebProcessCrashedCallback -> SignalConnectMode -> m SignalHandlerId
connectWebViewWebProcessCrashed obj cb after = liftIO $ do
    cb' <- mkWebViewWebProcessCrashedCallback (webViewWebProcessCrashedCallbackWrapper cb)
    connectSignalFunPtr obj "web-process-crashed" cb' after

-- object WebViewBase 
newtype WebViewBase = WebViewBase (ForeignPtr WebViewBase)
noWebViewBase :: Maybe WebViewBase
noWebViewBase = Nothing

foreign import ccall "webkit_web_view_base_get_type"
    c_webkit_web_view_base_get_type :: IO GType

type instance ParentTypes WebViewBase = '[Gtk.Container, Gtk.Widget, GObject.Object, Atk.ImplementorIface, Gtk.Buildable]

instance GObject WebViewBase where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_webkit_web_view_base_get_type
    

class GObject o => WebViewBaseK o
instance (GObject o, IsDescendantOf WebViewBase o) => WebViewBaseK o

toWebViewBase :: WebViewBaseK o => o -> IO WebViewBase
toWebViewBase = unsafeCastTo WebViewBase

-- object WindowProperties 
newtype WindowProperties = WindowProperties (ForeignPtr WindowProperties)
noWindowProperties :: Maybe WindowProperties
noWindowProperties = Nothing

foreign import ccall "webkit_window_properties_get_type"
    c_webkit_window_properties_get_type :: IO GType

type instance ParentTypes WindowProperties = '[GObject.Object]

instance GObject WindowProperties where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_webkit_window_properties_get_type
    

class GObject o => WindowPropertiesK o
instance (GObject o, IsDescendantOf WindowProperties o) => WindowPropertiesK o

toWindowProperties :: WindowPropertiesK o => o -> IO WindowProperties
toWindowProperties = unsafeCastTo WindowProperties

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

foreign import ccall "webkit_window_properties_get_fullscreen" webkit_window_properties_get_fullscreen :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetFullscreen ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetFullscreen _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_fullscreen _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method WindowProperties::get_geometry
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WindowProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "geometry", argType = TInterface "cairo" "RectangleInt", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "WindowProperties", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "webkit_window_properties_get_geometry" webkit_window_properties_get_geometry :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    Ptr Cairo.RectangleInt ->               -- geometry : TInterface "cairo" "RectangleInt"
    IO ()


windowPropertiesGetGeometry ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m (Cairo.RectangleInt)
windowPropertiesGetGeometry _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    geometry <- callocBoxedBytes 16 :: IO (Ptr Cairo.RectangleInt)
    webkit_window_properties_get_geometry _obj' geometry
    geometry' <- (wrapBoxed Cairo.RectangleInt) geometry
    touchManagedPtr _obj
    return geometry'

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

foreign import ccall "webkit_window_properties_get_locationbar_visible" webkit_window_properties_get_locationbar_visible :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetLocationbarVisible ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetLocationbarVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_locationbar_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_window_properties_get_menubar_visible" webkit_window_properties_get_menubar_visible :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetMenubarVisible ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetMenubarVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_menubar_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_window_properties_get_resizable" webkit_window_properties_get_resizable :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetResizable ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetResizable _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_resizable _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_window_properties_get_scrollbars_visible" webkit_window_properties_get_scrollbars_visible :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetScrollbarsVisible ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetScrollbarsVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_scrollbars_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_window_properties_get_statusbar_visible" webkit_window_properties_get_statusbar_visible :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetStatusbarVisible ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetStatusbarVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_statusbar_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

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

foreign import ccall "webkit_window_properties_get_toolbar_visible" webkit_window_properties_get_toolbar_visible :: 
    Ptr WindowProperties ->                 -- _obj : TInterface "WebKit2" "WindowProperties"
    IO CInt


windowPropertiesGetToolbarVisible ::
    (MonadIO m, WindowPropertiesK a) =>
    a ->                                    -- _obj
    m Bool
windowPropertiesGetToolbarVisible _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- webkit_window_properties_get_toolbar_visible _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- constant _EDITING_COMMAND_COPY

_EDITING_COMMAND_COPY :: T.Text
_EDITING_COMMAND_COPY = "Copy"
-- constant _EDITING_COMMAND_CUT

_EDITING_COMMAND_CUT :: T.Text
_EDITING_COMMAND_CUT = "Cut"
-- constant _EDITING_COMMAND_PASTE

_EDITING_COMMAND_PASTE :: T.Text
_EDITING_COMMAND_PASTE = "Paste"
-- constant _EDITING_COMMAND_REDO

_EDITING_COMMAND_REDO :: T.Text
_EDITING_COMMAND_REDO = "Redo"
-- constant _EDITING_COMMAND_SELECT_ALL

_EDITING_COMMAND_SELECT_ALL :: T.Text
_EDITING_COMMAND_SELECT_ALL = "SelectAll"
-- constant _EDITING_COMMAND_UNDO

_EDITING_COMMAND_UNDO :: T.Text
_EDITING_COMMAND_UNDO = "Undo"
-- constant _MAJOR_VERSION

_MAJOR_VERSION :: Int32
_MAJOR_VERSION = 2
-- constant _MICRO_VERSION

_MICRO_VERSION :: Int32
_MICRO_VERSION = 5
-- constant _MINOR_VERSION

_MINOR_VERSION :: Int32
_MINOR_VERSION = 8
-- function webkit_download_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_download_error_quark" webkit_download_error_quark :: 
    IO Word32


downloadErrorQuark ::
    (MonadIO m) =>
    m Word32
downloadErrorQuark  = liftIO $ do
    result <- webkit_download_error_quark
    return result

-- function webkit_favicon_database_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_favicon_database_error_quark" webkit_favicon_database_error_quark :: 
    IO Word32


faviconDatabaseErrorQuark ::
    (MonadIO m) =>
    m Word32
faviconDatabaseErrorQuark  = liftIO $ do
    result <- webkit_favicon_database_error_quark
    return result

-- function webkit_get_major_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_get_major_version" webkit_get_major_version :: 
    IO Word32


getMajorVersion ::
    (MonadIO m) =>
    m Word32
getMajorVersion  = liftIO $ do
    result <- webkit_get_major_version
    return result

-- function webkit_get_micro_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_get_micro_version" webkit_get_micro_version :: 
    IO Word32


getMicroVersion ::
    (MonadIO m) =>
    m Word32
getMicroVersion  = liftIO $ do
    result <- webkit_get_micro_version
    return result

-- function webkit_get_minor_version
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_get_minor_version" webkit_get_minor_version :: 
    IO Word32


getMinorVersion ::
    (MonadIO m) =>
    m Word32
getMinorVersion  = liftIO $ do
    result <- webkit_get_minor_version
    return result

-- function webkit_javascript_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_javascript_error_quark" webkit_javascript_error_quark :: 
    IO Word32


javascriptErrorQuark ::
    (MonadIO m) =>
    m Word32
javascriptErrorQuark  = liftIO $ do
    result <- webkit_javascript_error_quark
    return result

-- function webkit_network_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_network_error_quark" webkit_network_error_quark :: 
    IO Word32


networkErrorQuark ::
    (MonadIO m) =>
    m Word32
networkErrorQuark  = liftIO $ do
    result <- webkit_network_error_quark
    return result

-- function webkit_plugin_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_plugin_error_quark" webkit_plugin_error_quark :: 
    IO Word32


pluginErrorQuark ::
    (MonadIO m) =>
    m Word32
pluginErrorQuark  = liftIO $ do
    result <- webkit_plugin_error_quark
    return result

-- function webkit_policy_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_policy_error_quark" webkit_policy_error_quark :: 
    IO Word32


policyErrorQuark ::
    (MonadIO m) =>
    m Word32
policyErrorQuark  = liftIO $ do
    result <- webkit_policy_error_quark
    return result

-- function webkit_print_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_error_quark" webkit_print_error_quark :: 
    IO Word32


printErrorQuark ::
    (MonadIO m) =>
    m Word32
printErrorQuark  = liftIO $ do
    result <- webkit_print_error_quark
    return result

-- function webkit_snapshot_error_quark
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TBasicType TUInt32
-- throws : False
-- Skip return : False

foreign import ccall "webkit_snapshot_error_quark" webkit_snapshot_error_quark :: 
    IO Word32


snapshotErrorQuark ::
    (MonadIO m) =>
    m Word32
snapshotErrorQuark  = liftIO $ do
    result <- webkit_snapshot_error_quark
    return result

-- function webkit_user_media_permission_is_for_audio_device
-- Args : [Arg {argName = "request", argType = TInterface "WebKit2" "UserMediaPermissionRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "request", argType = TInterface "WebKit2" "UserMediaPermissionRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_user_media_permission_is_for_audio_device" webkit_user_media_permission_is_for_audio_device :: 
    Ptr UserMediaPermissionRequest ->       -- request : TInterface "WebKit2" "UserMediaPermissionRequest"
    IO CInt


userMediaPermissionIsForAudioDevice ::
    (MonadIO m, UserMediaPermissionRequestK a) =>
    a ->                                    -- request
    m Bool
userMediaPermissionIsForAudioDevice request = liftIO $ do
    let request' = unsafeManagedPtrCastPtr request
    result <- webkit_user_media_permission_is_for_audio_device request'
    let result' = (/= 0) result
    touchManagedPtr request
    return result'

-- function webkit_user_media_permission_is_for_video_device
-- Args : [Arg {argName = "request", argType = TInterface "WebKit2" "UserMediaPermissionRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "request", argType = TInterface "WebKit2" "UserMediaPermissionRequest", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "webkit_user_media_permission_is_for_video_device" webkit_user_media_permission_is_for_video_device :: 
    Ptr UserMediaPermissionRequest ->       -- request : TInterface "WebKit2" "UserMediaPermissionRequest"
    IO CInt


userMediaPermissionIsForVideoDevice ::
    (MonadIO m, UserMediaPermissionRequestK a) =>
    a ->                                    -- request
    m Bool
userMediaPermissionIsForVideoDevice request = liftIO $ do
    let request' = unsafeManagedPtrCastPtr request
    result <- webkit_user_media_permission_is_for_video_device request'
    let result' = (/= 0) result
    touchManagedPtr request
    return result'