{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2.Objects.WebContext
(
WebContext(..) ,
IsWebContext ,
toWebContext ,
noWebContext ,
#if defined(ENABLE_OVERLOADING)
ResolveWebContextMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
WebContextAllowTlsCertificateForHostMethodInfo,
#endif
webContextAllowTlsCertificateForHost ,
#if defined(ENABLE_OVERLOADING)
WebContextClearCacheMethodInfo ,
#endif
webContextClearCache ,
#if defined(ENABLE_OVERLOADING)
WebContextDownloadUriMethodInfo ,
#endif
webContextDownloadUri ,
#if defined(ENABLE_OVERLOADING)
WebContextGetCacheModelMethodInfo ,
#endif
webContextGetCacheModel ,
#if defined(ENABLE_OVERLOADING)
WebContextGetCookieManagerMethodInfo ,
#endif
webContextGetCookieManager ,
webContextGetDefault ,
#if defined(ENABLE_OVERLOADING)
WebContextGetFaviconDatabaseMethodInfo ,
#endif
webContextGetFaviconDatabase ,
#if defined(ENABLE_OVERLOADING)
WebContextGetFaviconDatabaseDirectoryMethodInfo,
#endif
webContextGetFaviconDatabaseDirectory ,
#if defined(ENABLE_OVERLOADING)
WebContextGetPluginsMethodInfo ,
#endif
webContextGetPlugins ,
#if defined(ENABLE_OVERLOADING)
WebContextGetPluginsFinishMethodInfo ,
#endif
webContextGetPluginsFinish ,
#if defined(ENABLE_OVERLOADING)
WebContextGetProcessModelMethodInfo ,
#endif
webContextGetProcessModel ,
#if defined(ENABLE_OVERLOADING)
WebContextGetSecurityManagerMethodInfo ,
#endif
webContextGetSecurityManager ,
#if defined(ENABLE_OVERLOADING)
WebContextGetSpellCheckingEnabledMethodInfo,
#endif
webContextGetSpellCheckingEnabled ,
#if defined(ENABLE_OVERLOADING)
WebContextGetSpellCheckingLanguagesMethodInfo,
#endif
webContextGetSpellCheckingLanguages ,
#if defined(ENABLE_OVERLOADING)
WebContextGetTlsErrorsPolicyMethodInfo ,
#endif
webContextGetTlsErrorsPolicy ,
#if defined(ENABLE_OVERLOADING)
WebContextGetWebProcessCountLimitMethodInfo,
#endif
webContextGetWebProcessCountLimit ,
#if defined(ENABLE_OVERLOADING)
WebContextGetWebsiteDataManagerMethodInfo,
#endif
webContextGetWebsiteDataManager ,
#if defined(ENABLE_OVERLOADING)
WebContextInitializeNotificationPermissionsMethodInfo,
#endif
webContextInitializeNotificationPermissions,
#if defined(ENABLE_OVERLOADING)
WebContextIsAutomationAllowedMethodInfo ,
#endif
webContextIsAutomationAllowed ,
#if defined(ENABLE_OVERLOADING)
WebContextIsEphemeralMethodInfo ,
#endif
webContextIsEphemeral ,
webContextNew ,
webContextNewEphemeral ,
webContextNewWithWebsiteDataManager ,
#if defined(ENABLE_OVERLOADING)
WebContextPrefetchDnsMethodInfo ,
#endif
webContextPrefetchDns ,
#if defined(ENABLE_OVERLOADING)
WebContextRegisterUriSchemeMethodInfo ,
#endif
webContextRegisterUriScheme ,
#if defined(ENABLE_OVERLOADING)
WebContextSetAdditionalPluginsDirectoryMethodInfo,
#endif
webContextSetAdditionalPluginsDirectory ,
#if defined(ENABLE_OVERLOADING)
WebContextSetAutomationAllowedMethodInfo,
#endif
webContextSetAutomationAllowed ,
#if defined(ENABLE_OVERLOADING)
WebContextSetCacheModelMethodInfo ,
#endif
webContextSetCacheModel ,
#if defined(ENABLE_OVERLOADING)
WebContextSetDiskCacheDirectoryMethodInfo,
#endif
webContextSetDiskCacheDirectory ,
#if defined(ENABLE_OVERLOADING)
WebContextSetFaviconDatabaseDirectoryMethodInfo,
#endif
webContextSetFaviconDatabaseDirectory ,
#if defined(ENABLE_OVERLOADING)
WebContextSetNetworkProxySettingsMethodInfo,
#endif
webContextSetNetworkProxySettings ,
#if defined(ENABLE_OVERLOADING)
WebContextSetPreferredLanguagesMethodInfo,
#endif
webContextSetPreferredLanguages ,
#if defined(ENABLE_OVERLOADING)
WebContextSetProcessModelMethodInfo ,
#endif
webContextSetProcessModel ,
#if defined(ENABLE_OVERLOADING)
WebContextSetSpellCheckingEnabledMethodInfo,
#endif
webContextSetSpellCheckingEnabled ,
#if defined(ENABLE_OVERLOADING)
WebContextSetSpellCheckingLanguagesMethodInfo,
#endif
webContextSetSpellCheckingLanguages ,
#if defined(ENABLE_OVERLOADING)
WebContextSetTlsErrorsPolicyMethodInfo ,
#endif
webContextSetTlsErrorsPolicy ,
#if defined(ENABLE_OVERLOADING)
WebContextSetWebExtensionsDirectoryMethodInfo,
#endif
webContextSetWebExtensionsDirectory ,
#if defined(ENABLE_OVERLOADING)
WebContextSetWebExtensionsInitializationUserDataMethodInfo,
#endif
webContextSetWebExtensionsInitializationUserData,
#if defined(ENABLE_OVERLOADING)
WebContextSetWebProcessCountLimitMethodInfo,
#endif
webContextSetWebProcessCountLimit ,
#if defined(ENABLE_OVERLOADING)
WebContextLocalStorageDirectoryPropertyInfo,
#endif
constructWebContextLocalStorageDirectory,
getWebContextLocalStorageDirectory ,
#if defined(ENABLE_OVERLOADING)
webContextLocalStorageDirectory ,
#endif
#if defined(ENABLE_OVERLOADING)
WebContextWebsiteDataManagerPropertyInfo,
#endif
constructWebContextWebsiteDataManager ,
getWebContextWebsiteDataManager ,
#if defined(ENABLE_OVERLOADING)
webContextWebsiteDataManager ,
#endif
C_WebContextAutomationStartedCallback ,
WebContextAutomationStartedCallback ,
#if defined(ENABLE_OVERLOADING)
WebContextAutomationStartedSignalInfo ,
#endif
afterWebContextAutomationStarted ,
genClosure_WebContextAutomationStarted ,
mk_WebContextAutomationStartedCallback ,
noWebContextAutomationStartedCallback ,
onWebContextAutomationStarted ,
wrap_WebContextAutomationStartedCallback,
C_WebContextDownloadStartedCallback ,
WebContextDownloadStartedCallback ,
#if defined(ENABLE_OVERLOADING)
WebContextDownloadStartedSignalInfo ,
#endif
afterWebContextDownloadStarted ,
genClosure_WebContextDownloadStarted ,
mk_WebContextDownloadStartedCallback ,
noWebContextDownloadStartedCallback ,
onWebContextDownloadStarted ,
wrap_WebContextDownloadStartedCallback ,
C_WebContextInitializeNotificationPermissionsCallback,
WebContextInitializeNotificationPermissionsCallback,
#if defined(ENABLE_OVERLOADING)
WebContextInitializeNotificationPermissionsSignalInfo,
#endif
afterWebContextInitializeNotificationPermissions,
genClosure_WebContextInitializeNotificationPermissions,
mk_WebContextInitializeNotificationPermissionsCallback,
noWebContextInitializeNotificationPermissionsCallback,
onWebContextInitializeNotificationPermissions,
wrap_WebContextInitializeNotificationPermissionsCallback,
C_WebContextInitializeWebExtensionsCallback,
WebContextInitializeWebExtensionsCallback,
#if defined(ENABLE_OVERLOADING)
WebContextInitializeWebExtensionsSignalInfo,
#endif
afterWebContextInitializeWebExtensions ,
genClosure_WebContextInitializeWebExtensions,
mk_WebContextInitializeWebExtensionsCallback,
noWebContextInitializeWebExtensionsCallback,
onWebContextInitializeWebExtensions ,
wrap_WebContextInitializeWebExtensionsCallback,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.TlsCertificate as Gio.TlsCertificate
import qualified GI.WebKit2.Callbacks as WebKit2.Callbacks
import {-# SOURCE #-} qualified GI.WebKit2.Enums as WebKit2.Enums
import {-# SOURCE #-} qualified GI.WebKit2.Objects.AutomationSession as WebKit2.AutomationSession
import {-# SOURCE #-} qualified GI.WebKit2.Objects.CookieManager as WebKit2.CookieManager
import {-# SOURCE #-} qualified GI.WebKit2.Objects.Download as WebKit2.Download
import {-# SOURCE #-} qualified GI.WebKit2.Objects.FaviconDatabase as WebKit2.FaviconDatabase
import {-# SOURCE #-} qualified GI.WebKit2.Objects.Plugin as WebKit2.Plugin
import {-# SOURCE #-} qualified GI.WebKit2.Objects.SecurityManager as WebKit2.SecurityManager
import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebsiteDataManager as WebKit2.WebsiteDataManager
import {-# SOURCE #-} qualified GI.WebKit2.Structs.NetworkProxySettings as WebKit2.NetworkProxySettings
import {-# SOURCE #-} qualified GI.WebKit2.Structs.SecurityOrigin as WebKit2.SecurityOrigin
newtype WebContext = WebContext (ManagedPtr WebContext)
deriving (WebContext -> WebContext -> Bool
(WebContext -> WebContext -> Bool)
-> (WebContext -> WebContext -> Bool) -> Eq WebContext
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebContext -> WebContext -> Bool
$c/= :: WebContext -> WebContext -> Bool
== :: WebContext -> WebContext -> Bool
$c== :: WebContext -> WebContext -> Bool
Eq)
foreign import ccall "webkit_web_context_get_type"
c_webkit_web_context_get_type :: IO GType
instance GObject WebContext where
gobjectType :: IO GType
gobjectType = IO GType
c_webkit_web_context_get_type
instance B.GValue.IsGValue WebContext where
toGValue :: WebContext -> IO GValue
toGValue o :: WebContext
o = do
GType
gtype <- IO GType
c_webkit_web_context_get_type
WebContext -> (Ptr WebContext -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WebContext
o (GType
-> (GValue -> Ptr WebContext -> IO ())
-> Ptr WebContext
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr WebContext -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO WebContext
fromGValue gv :: GValue
gv = do
Ptr WebContext
ptr <- GValue -> IO (Ptr WebContext)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr WebContext)
(ManagedPtr WebContext -> WebContext)
-> Ptr WebContext -> IO WebContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WebContext -> WebContext
WebContext Ptr WebContext
ptr
class (GObject o, O.IsDescendantOf WebContext o) => IsWebContext o
instance (GObject o, O.IsDescendantOf WebContext o) => IsWebContext o
instance O.HasParentTypes WebContext
type instance O.ParentTypes WebContext = '[GObject.Object.Object]
toWebContext :: (MonadIO m, IsWebContext o) => o -> m WebContext
toWebContext :: o -> m WebContext
toWebContext = IO WebContext -> m WebContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebContext -> m WebContext)
-> (o -> IO WebContext) -> o -> m WebContext
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WebContext -> WebContext) -> o -> IO WebContext
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr WebContext -> WebContext
WebContext
noWebContext :: Maybe WebContext
noWebContext :: Maybe WebContext
noWebContext = Maybe WebContext
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveWebContextMethod (t :: Symbol) (o :: *) :: * where
ResolveWebContextMethod "allowTlsCertificateForHost" o = WebContextAllowTlsCertificateForHostMethodInfo
ResolveWebContextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWebContextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWebContextMethod "clearCache" o = WebContextClearCacheMethodInfo
ResolveWebContextMethod "downloadUri" o = WebContextDownloadUriMethodInfo
ResolveWebContextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWebContextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWebContextMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWebContextMethod "initializeNotificationPermissions" o = WebContextInitializeNotificationPermissionsMethodInfo
ResolveWebContextMethod "isAutomationAllowed" o = WebContextIsAutomationAllowedMethodInfo
ResolveWebContextMethod "isEphemeral" o = WebContextIsEphemeralMethodInfo
ResolveWebContextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWebContextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWebContextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWebContextMethod "prefetchDns" o = WebContextPrefetchDnsMethodInfo
ResolveWebContextMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWebContextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWebContextMethod "registerUriScheme" o = WebContextRegisterUriSchemeMethodInfo
ResolveWebContextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWebContextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWebContextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWebContextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWebContextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWebContextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWebContextMethod "getCacheModel" o = WebContextGetCacheModelMethodInfo
ResolveWebContextMethod "getCookieManager" o = WebContextGetCookieManagerMethodInfo
ResolveWebContextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWebContextMethod "getFaviconDatabase" o = WebContextGetFaviconDatabaseMethodInfo
ResolveWebContextMethod "getFaviconDatabaseDirectory" o = WebContextGetFaviconDatabaseDirectoryMethodInfo
ResolveWebContextMethod "getPlugins" o = WebContextGetPluginsMethodInfo
ResolveWebContextMethod "getPluginsFinish" o = WebContextGetPluginsFinishMethodInfo
ResolveWebContextMethod "getProcessModel" o = WebContextGetProcessModelMethodInfo
ResolveWebContextMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWebContextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWebContextMethod "getSecurityManager" o = WebContextGetSecurityManagerMethodInfo
ResolveWebContextMethod "getSpellCheckingEnabled" o = WebContextGetSpellCheckingEnabledMethodInfo
ResolveWebContextMethod "getSpellCheckingLanguages" o = WebContextGetSpellCheckingLanguagesMethodInfo
ResolveWebContextMethod "getTlsErrorsPolicy" o = WebContextGetTlsErrorsPolicyMethodInfo
ResolveWebContextMethod "getWebProcessCountLimit" o = WebContextGetWebProcessCountLimitMethodInfo
ResolveWebContextMethod "getWebsiteDataManager" o = WebContextGetWebsiteDataManagerMethodInfo
ResolveWebContextMethod "setAdditionalPluginsDirectory" o = WebContextSetAdditionalPluginsDirectoryMethodInfo
ResolveWebContextMethod "setAutomationAllowed" o = WebContextSetAutomationAllowedMethodInfo
ResolveWebContextMethod "setCacheModel" o = WebContextSetCacheModelMethodInfo
ResolveWebContextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWebContextMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWebContextMethod "setDiskCacheDirectory" o = WebContextSetDiskCacheDirectoryMethodInfo
ResolveWebContextMethod "setFaviconDatabaseDirectory" o = WebContextSetFaviconDatabaseDirectoryMethodInfo
ResolveWebContextMethod "setNetworkProxySettings" o = WebContextSetNetworkProxySettingsMethodInfo
ResolveWebContextMethod "setPreferredLanguages" o = WebContextSetPreferredLanguagesMethodInfo
ResolveWebContextMethod "setProcessModel" o = WebContextSetProcessModelMethodInfo
ResolveWebContextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWebContextMethod "setSpellCheckingEnabled" o = WebContextSetSpellCheckingEnabledMethodInfo
ResolveWebContextMethod "setSpellCheckingLanguages" o = WebContextSetSpellCheckingLanguagesMethodInfo
ResolveWebContextMethod "setTlsErrorsPolicy" o = WebContextSetTlsErrorsPolicyMethodInfo
ResolveWebContextMethod "setWebExtensionsDirectory" o = WebContextSetWebExtensionsDirectoryMethodInfo
ResolveWebContextMethod "setWebExtensionsInitializationUserData" o = WebContextSetWebExtensionsInitializationUserDataMethodInfo
ResolveWebContextMethod "setWebProcessCountLimit" o = WebContextSetWebProcessCountLimitMethodInfo
ResolveWebContextMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWebContextMethod t WebContext, O.MethodInfo info WebContext p) => OL.IsLabel t (WebContext -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type WebContextAutomationStartedCallback =
WebKit2.AutomationSession.AutomationSession
-> IO ()
noWebContextAutomationStartedCallback :: Maybe WebContextAutomationStartedCallback
noWebContextAutomationStartedCallback :: Maybe WebContextAutomationStartedCallback
noWebContextAutomationStartedCallback = Maybe WebContextAutomationStartedCallback
forall a. Maybe a
Nothing
type C_WebContextAutomationStartedCallback =
Ptr () ->
Ptr WebKit2.AutomationSession.AutomationSession ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebContextAutomationStartedCallback :: C_WebContextAutomationStartedCallback -> IO (FunPtr C_WebContextAutomationStartedCallback)
genClosure_WebContextAutomationStarted :: MonadIO m => WebContextAutomationStartedCallback -> m (GClosure C_WebContextAutomationStartedCallback)
genClosure_WebContextAutomationStarted :: WebContextAutomationStartedCallback
-> m (GClosure C_WebContextAutomationStartedCallback)
genClosure_WebContextAutomationStarted cb :: WebContextAutomationStartedCallback
cb = IO (GClosure C_WebContextAutomationStartedCallback)
-> m (GClosure C_WebContextAutomationStartedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebContextAutomationStartedCallback)
-> m (GClosure C_WebContextAutomationStartedCallback))
-> IO (GClosure C_WebContextAutomationStartedCallback)
-> m (GClosure C_WebContextAutomationStartedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextAutomationStartedCallback
cb' = WebContextAutomationStartedCallback
-> C_WebContextAutomationStartedCallback
wrap_WebContextAutomationStartedCallback WebContextAutomationStartedCallback
cb
C_WebContextAutomationStartedCallback
-> IO (FunPtr C_WebContextAutomationStartedCallback)
mk_WebContextAutomationStartedCallback C_WebContextAutomationStartedCallback
cb' IO (FunPtr C_WebContextAutomationStartedCallback)
-> (FunPtr C_WebContextAutomationStartedCallback
-> IO (GClosure C_WebContextAutomationStartedCallback))
-> IO (GClosure C_WebContextAutomationStartedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebContextAutomationStartedCallback
-> IO (GClosure C_WebContextAutomationStartedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WebContextAutomationStartedCallback ::
WebContextAutomationStartedCallback ->
C_WebContextAutomationStartedCallback
wrap_WebContextAutomationStartedCallback :: WebContextAutomationStartedCallback
-> C_WebContextAutomationStartedCallback
wrap_WebContextAutomationStartedCallback _cb :: WebContextAutomationStartedCallback
_cb _ session :: Ptr AutomationSession
session _ = do
AutomationSession
session' <- ((ManagedPtr AutomationSession -> AutomationSession)
-> Ptr AutomationSession -> IO AutomationSession
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AutomationSession -> AutomationSession
WebKit2.AutomationSession.AutomationSession) Ptr AutomationSession
session
WebContextAutomationStartedCallback
_cb AutomationSession
session'
onWebContextAutomationStarted :: (IsWebContext a, MonadIO m) => a -> WebContextAutomationStartedCallback -> m SignalHandlerId
onWebContextAutomationStarted :: a -> WebContextAutomationStartedCallback -> m SignalHandlerId
onWebContextAutomationStarted obj :: a
obj cb :: WebContextAutomationStartedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextAutomationStartedCallback
cb' = WebContextAutomationStartedCallback
-> C_WebContextAutomationStartedCallback
wrap_WebContextAutomationStartedCallback WebContextAutomationStartedCallback
cb
FunPtr C_WebContextAutomationStartedCallback
cb'' <- C_WebContextAutomationStartedCallback
-> IO (FunPtr C_WebContextAutomationStartedCallback)
mk_WebContextAutomationStartedCallback C_WebContextAutomationStartedCallback
cb'
a
-> Text
-> FunPtr C_WebContextAutomationStartedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "automation-started" FunPtr C_WebContextAutomationStartedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWebContextAutomationStarted :: (IsWebContext a, MonadIO m) => a -> WebContextAutomationStartedCallback -> m SignalHandlerId
afterWebContextAutomationStarted :: a -> WebContextAutomationStartedCallback -> m SignalHandlerId
afterWebContextAutomationStarted obj :: a
obj cb :: WebContextAutomationStartedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextAutomationStartedCallback
cb' = WebContextAutomationStartedCallback
-> C_WebContextAutomationStartedCallback
wrap_WebContextAutomationStartedCallback WebContextAutomationStartedCallback
cb
FunPtr C_WebContextAutomationStartedCallback
cb'' <- C_WebContextAutomationStartedCallback
-> IO (FunPtr C_WebContextAutomationStartedCallback)
mk_WebContextAutomationStartedCallback C_WebContextAutomationStartedCallback
cb'
a
-> Text
-> FunPtr C_WebContextAutomationStartedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "automation-started" FunPtr C_WebContextAutomationStartedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WebContextAutomationStartedSignalInfo
instance SignalInfo WebContextAutomationStartedSignalInfo where
type HaskellCallbackType WebContextAutomationStartedSignalInfo = WebContextAutomationStartedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WebContextAutomationStartedCallback cb
cb'' <- mk_WebContextAutomationStartedCallback cb'
connectSignalFunPtr obj "automation-started" cb'' connectMode detail
#endif
type WebContextDownloadStartedCallback =
WebKit2.Download.Download
-> IO ()
noWebContextDownloadStartedCallback :: Maybe WebContextDownloadStartedCallback
noWebContextDownloadStartedCallback :: Maybe WebContextDownloadStartedCallback
noWebContextDownloadStartedCallback = Maybe WebContextDownloadStartedCallback
forall a. Maybe a
Nothing
type C_WebContextDownloadStartedCallback =
Ptr () ->
Ptr WebKit2.Download.Download ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebContextDownloadStartedCallback :: C_WebContextDownloadStartedCallback -> IO (FunPtr C_WebContextDownloadStartedCallback)
genClosure_WebContextDownloadStarted :: MonadIO m => WebContextDownloadStartedCallback -> m (GClosure C_WebContextDownloadStartedCallback)
genClosure_WebContextDownloadStarted :: WebContextDownloadStartedCallback
-> m (GClosure C_WebContextDownloadStartedCallback)
genClosure_WebContextDownloadStarted cb :: WebContextDownloadStartedCallback
cb = IO (GClosure C_WebContextDownloadStartedCallback)
-> m (GClosure C_WebContextDownloadStartedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WebContextDownloadStartedCallback)
-> m (GClosure C_WebContextDownloadStartedCallback))
-> IO (GClosure C_WebContextDownloadStartedCallback)
-> m (GClosure C_WebContextDownloadStartedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextDownloadStartedCallback
cb' = WebContextDownloadStartedCallback
-> C_WebContextDownloadStartedCallback
wrap_WebContextDownloadStartedCallback WebContextDownloadStartedCallback
cb
C_WebContextDownloadStartedCallback
-> IO (FunPtr C_WebContextDownloadStartedCallback)
mk_WebContextDownloadStartedCallback C_WebContextDownloadStartedCallback
cb' IO (FunPtr C_WebContextDownloadStartedCallback)
-> (FunPtr C_WebContextDownloadStartedCallback
-> IO (GClosure C_WebContextDownloadStartedCallback))
-> IO (GClosure C_WebContextDownloadStartedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebContextDownloadStartedCallback
-> IO (GClosure C_WebContextDownloadStartedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WebContextDownloadStartedCallback ::
WebContextDownloadStartedCallback ->
C_WebContextDownloadStartedCallback
wrap_WebContextDownloadStartedCallback :: WebContextDownloadStartedCallback
-> C_WebContextDownloadStartedCallback
wrap_WebContextDownloadStartedCallback _cb :: WebContextDownloadStartedCallback
_cb _ download :: Ptr Download
download _ = do
Download
download' <- ((ManagedPtr Download -> Download) -> Ptr Download -> IO Download
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Download -> Download
WebKit2.Download.Download) Ptr Download
download
WebContextDownloadStartedCallback
_cb Download
download'
onWebContextDownloadStarted :: (IsWebContext a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId
onWebContextDownloadStarted :: a -> WebContextDownloadStartedCallback -> m SignalHandlerId
onWebContextDownloadStarted obj :: a
obj cb :: WebContextDownloadStartedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextDownloadStartedCallback
cb' = WebContextDownloadStartedCallback
-> C_WebContextDownloadStartedCallback
wrap_WebContextDownloadStartedCallback WebContextDownloadStartedCallback
cb
FunPtr C_WebContextDownloadStartedCallback
cb'' <- C_WebContextDownloadStartedCallback
-> IO (FunPtr C_WebContextDownloadStartedCallback)
mk_WebContextDownloadStartedCallback C_WebContextDownloadStartedCallback
cb'
a
-> Text
-> FunPtr C_WebContextDownloadStartedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "download-started" FunPtr C_WebContextDownloadStartedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWebContextDownloadStarted :: (IsWebContext a, MonadIO m) => a -> WebContextDownloadStartedCallback -> m SignalHandlerId
afterWebContextDownloadStarted :: a -> WebContextDownloadStartedCallback -> m SignalHandlerId
afterWebContextDownloadStarted obj :: a
obj cb :: WebContextDownloadStartedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextDownloadStartedCallback
cb' = WebContextDownloadStartedCallback
-> C_WebContextDownloadStartedCallback
wrap_WebContextDownloadStartedCallback WebContextDownloadStartedCallback
cb
FunPtr C_WebContextDownloadStartedCallback
cb'' <- C_WebContextDownloadStartedCallback
-> IO (FunPtr C_WebContextDownloadStartedCallback)
mk_WebContextDownloadStartedCallback C_WebContextDownloadStartedCallback
cb'
a
-> Text
-> FunPtr C_WebContextDownloadStartedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "download-started" FunPtr C_WebContextDownloadStartedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WebContextDownloadStartedSignalInfo
instance SignalInfo WebContextDownloadStartedSignalInfo where
type HaskellCallbackType WebContextDownloadStartedSignalInfo = WebContextDownloadStartedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WebContextDownloadStartedCallback cb
cb'' <- mk_WebContextDownloadStartedCallback cb'
connectSignalFunPtr obj "download-started" cb'' connectMode detail
#endif
type WebContextInitializeNotificationPermissionsCallback =
IO ()
noWebContextInitializeNotificationPermissionsCallback :: Maybe WebContextInitializeNotificationPermissionsCallback
noWebContextInitializeNotificationPermissionsCallback :: Maybe (IO ())
noWebContextInitializeNotificationPermissionsCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_WebContextInitializeNotificationPermissionsCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebContextInitializeNotificationPermissionsCallback :: C_WebContextInitializeNotificationPermissionsCallback -> IO (FunPtr C_WebContextInitializeNotificationPermissionsCallback)
genClosure_WebContextInitializeNotificationPermissions :: MonadIO m => WebContextInitializeNotificationPermissionsCallback -> m (GClosure C_WebContextInitializeNotificationPermissionsCallback)
genClosure_WebContextInitializeNotificationPermissions :: IO ()
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback)
genClosure_WebContextInitializeNotificationPermissions cb :: IO ()
cb = IO (GClosure C_WebContextInitializeNotificationPermissionsCallback)
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback))
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextInitializeNotificationPermissionsCallback
cb' = IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeNotificationPermissionsCallback IO ()
cb
C_WebContextInitializeNotificationPermissionsCallback
-> IO
(FunPtr C_WebContextInitializeNotificationPermissionsCallback)
mk_WebContextInitializeNotificationPermissionsCallback C_WebContextInitializeNotificationPermissionsCallback
cb' IO (FunPtr C_WebContextInitializeNotificationPermissionsCallback)
-> (FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback))
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WebContextInitializeNotificationPermissionsCallback ::
WebContextInitializeNotificationPermissionsCallback ->
C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeNotificationPermissionsCallback :: IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeNotificationPermissionsCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onWebContextInitializeNotificationPermissions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeNotificationPermissionsCallback -> m SignalHandlerId
onWebContextInitializeNotificationPermissions :: a -> IO () -> m SignalHandlerId
onWebContextInitializeNotificationPermissions obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextInitializeNotificationPermissionsCallback
cb' = IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeNotificationPermissionsCallback IO ()
cb
FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' <- C_WebContextInitializeNotificationPermissionsCallback
-> IO
(FunPtr C_WebContextInitializeNotificationPermissionsCallback)
mk_WebContextInitializeNotificationPermissionsCallback C_WebContextInitializeNotificationPermissionsCallback
cb'
a
-> Text
-> FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "initialize-notification-permissions" FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWebContextInitializeNotificationPermissions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeNotificationPermissionsCallback -> m SignalHandlerId
afterWebContextInitializeNotificationPermissions :: a -> IO () -> m SignalHandlerId
afterWebContextInitializeNotificationPermissions obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextInitializeNotificationPermissionsCallback
cb' = IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeNotificationPermissionsCallback IO ()
cb
FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' <- C_WebContextInitializeNotificationPermissionsCallback
-> IO
(FunPtr C_WebContextInitializeNotificationPermissionsCallback)
mk_WebContextInitializeNotificationPermissionsCallback C_WebContextInitializeNotificationPermissionsCallback
cb'
a
-> Text
-> FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "initialize-notification-permissions" FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WebContextInitializeNotificationPermissionsSignalInfo
instance SignalInfo WebContextInitializeNotificationPermissionsSignalInfo where
type HaskellCallbackType WebContextInitializeNotificationPermissionsSignalInfo = WebContextInitializeNotificationPermissionsCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WebContextInitializeNotificationPermissionsCallback cb
cb'' <- mk_WebContextInitializeNotificationPermissionsCallback cb'
connectSignalFunPtr obj "initialize-notification-permissions" cb'' connectMode detail
#endif
type WebContextInitializeWebExtensionsCallback =
IO ()
noWebContextInitializeWebExtensionsCallback :: Maybe WebContextInitializeWebExtensionsCallback
noWebContextInitializeWebExtensionsCallback :: Maybe (IO ())
noWebContextInitializeWebExtensionsCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_WebContextInitializeWebExtensionsCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WebContextInitializeWebExtensionsCallback :: C_WebContextInitializeWebExtensionsCallback -> IO (FunPtr C_WebContextInitializeWebExtensionsCallback)
genClosure_WebContextInitializeWebExtensions :: MonadIO m => WebContextInitializeWebExtensionsCallback -> m (GClosure C_WebContextInitializeWebExtensionsCallback)
genClosure_WebContextInitializeWebExtensions :: IO ()
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback)
genClosure_WebContextInitializeWebExtensions cb :: IO ()
cb = IO (GClosure C_WebContextInitializeNotificationPermissionsCallback)
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback))
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
-> m (GClosure
C_WebContextInitializeNotificationPermissionsCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextInitializeNotificationPermissionsCallback
cb' = IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeWebExtensionsCallback IO ()
cb
C_WebContextInitializeNotificationPermissionsCallback
-> IO
(FunPtr C_WebContextInitializeNotificationPermissionsCallback)
mk_WebContextInitializeWebExtensionsCallback C_WebContextInitializeNotificationPermissionsCallback
cb' IO (FunPtr C_WebContextInitializeNotificationPermissionsCallback)
-> (FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback))
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> IO
(GClosure C_WebContextInitializeNotificationPermissionsCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WebContextInitializeWebExtensionsCallback ::
WebContextInitializeWebExtensionsCallback ->
C_WebContextInitializeWebExtensionsCallback
wrap_WebContextInitializeWebExtensionsCallback :: IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeWebExtensionsCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onWebContextInitializeWebExtensions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId
onWebContextInitializeWebExtensions :: a -> IO () -> m SignalHandlerId
onWebContextInitializeWebExtensions obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextInitializeNotificationPermissionsCallback
cb' = IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeWebExtensionsCallback IO ()
cb
FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' <- C_WebContextInitializeNotificationPermissionsCallback
-> IO
(FunPtr C_WebContextInitializeNotificationPermissionsCallback)
mk_WebContextInitializeWebExtensionsCallback C_WebContextInitializeNotificationPermissionsCallback
cb'
a
-> Text
-> FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "initialize-web-extensions" FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWebContextInitializeWebExtensions :: (IsWebContext a, MonadIO m) => a -> WebContextInitializeWebExtensionsCallback -> m SignalHandlerId
afterWebContextInitializeWebExtensions :: a -> IO () -> m SignalHandlerId
afterWebContextInitializeWebExtensions obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WebContextInitializeNotificationPermissionsCallback
cb' = IO () -> C_WebContextInitializeNotificationPermissionsCallback
wrap_WebContextInitializeWebExtensionsCallback IO ()
cb
FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' <- C_WebContextInitializeNotificationPermissionsCallback
-> IO
(FunPtr C_WebContextInitializeNotificationPermissionsCallback)
mk_WebContextInitializeWebExtensionsCallback C_WebContextInitializeNotificationPermissionsCallback
cb'
a
-> Text
-> FunPtr C_WebContextInitializeNotificationPermissionsCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "initialize-web-extensions" FunPtr C_WebContextInitializeNotificationPermissionsCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WebContextInitializeWebExtensionsSignalInfo
instance SignalInfo WebContextInitializeWebExtensionsSignalInfo where
type HaskellCallbackType WebContextInitializeWebExtensionsSignalInfo = WebContextInitializeWebExtensionsCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WebContextInitializeWebExtensionsCallback cb
cb'' <- mk_WebContextInitializeWebExtensionsCallback cb'
connectSignalFunPtr obj "initialize-web-extensions" cb'' connectMode detail
#endif
getWebContextLocalStorageDirectory :: (MonadIO m, IsWebContext o) => o -> m (Maybe T.Text)
getWebContextLocalStorageDirectory :: o -> m (Maybe Text)
getWebContextLocalStorageDirectory obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "local-storage-directory"
constructWebContextLocalStorageDirectory :: (IsWebContext o) => T.Text -> IO (GValueConstruct o)
constructWebContextLocalStorageDirectory :: Text -> IO (GValueConstruct o)
constructWebContextLocalStorageDirectory val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "local-storage-directory" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
#if defined(ENABLE_OVERLOADING)
data WebContextLocalStorageDirectoryPropertyInfo
instance AttrInfo WebContextLocalStorageDirectoryPropertyInfo where
type AttrAllowedOps WebContextLocalStorageDirectoryPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint WebContextLocalStorageDirectoryPropertyInfo = IsWebContext
type AttrSetTypeConstraint WebContextLocalStorageDirectoryPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint WebContextLocalStorageDirectoryPropertyInfo = (~) T.Text
type AttrTransferType WebContextLocalStorageDirectoryPropertyInfo = T.Text
type AttrGetType WebContextLocalStorageDirectoryPropertyInfo = (Maybe T.Text)
type AttrLabel WebContextLocalStorageDirectoryPropertyInfo = "local-storage-directory"
type AttrOrigin WebContextLocalStorageDirectoryPropertyInfo = WebContext
attrGet = getWebContextLocalStorageDirectory
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructWebContextLocalStorageDirectory
attrClear = undefined
#endif
getWebContextWebsiteDataManager :: (MonadIO m, IsWebContext o) => o -> m WebKit2.WebsiteDataManager.WebsiteDataManager
getWebContextWebsiteDataManager :: o -> m WebsiteDataManager
getWebContextWebsiteDataManager obj :: o
obj = IO WebsiteDataManager -> m WebsiteDataManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebsiteDataManager -> m WebsiteDataManager)
-> IO WebsiteDataManager -> m WebsiteDataManager
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe WebsiteDataManager) -> IO WebsiteDataManager
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getWebContextWebsiteDataManager" (IO (Maybe WebsiteDataManager) -> IO WebsiteDataManager)
-> IO (Maybe WebsiteDataManager) -> IO WebsiteDataManager
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr WebsiteDataManager -> WebsiteDataManager)
-> IO (Maybe WebsiteDataManager)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "website-data-manager" ManagedPtr WebsiteDataManager -> WebsiteDataManager
WebKit2.WebsiteDataManager.WebsiteDataManager
constructWebContextWebsiteDataManager :: (IsWebContext o, WebKit2.WebsiteDataManager.IsWebsiteDataManager a) => a -> IO (GValueConstruct o)
constructWebContextWebsiteDataManager :: a -> IO (GValueConstruct o)
constructWebContextWebsiteDataManager val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "website-data-manager" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
#if defined(ENABLE_OVERLOADING)
data WebContextWebsiteDataManagerPropertyInfo
instance AttrInfo WebContextWebsiteDataManagerPropertyInfo where
type AttrAllowedOps WebContextWebsiteDataManagerPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint WebContextWebsiteDataManagerPropertyInfo = IsWebContext
type AttrSetTypeConstraint WebContextWebsiteDataManagerPropertyInfo = WebKit2.WebsiteDataManager.IsWebsiteDataManager
type AttrTransferTypeConstraint WebContextWebsiteDataManagerPropertyInfo = WebKit2.WebsiteDataManager.IsWebsiteDataManager
type AttrTransferType WebContextWebsiteDataManagerPropertyInfo = WebKit2.WebsiteDataManager.WebsiteDataManager
type AttrGetType WebContextWebsiteDataManagerPropertyInfo = WebKit2.WebsiteDataManager.WebsiteDataManager
type AttrLabel WebContextWebsiteDataManagerPropertyInfo = "website-data-manager"
type AttrOrigin WebContextWebsiteDataManagerPropertyInfo = WebContext
attrGet = getWebContextWebsiteDataManager
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo WebKit2.WebsiteDataManager.WebsiteDataManager v
attrConstruct = constructWebContextWebsiteDataManager
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WebContext
type instance O.AttributeList WebContext = WebContextAttributeList
type WebContextAttributeList = ('[ '("localStorageDirectory", WebContextLocalStorageDirectoryPropertyInfo), '("websiteDataManager", WebContextWebsiteDataManagerPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
webContextLocalStorageDirectory :: AttrLabelProxy "localStorageDirectory"
webContextLocalStorageDirectory = AttrLabelProxy
webContextWebsiteDataManager :: AttrLabelProxy "websiteDataManager"
webContextWebsiteDataManager = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WebContext = WebContextSignalList
type WebContextSignalList = ('[ '("automationStarted", WebContextAutomationStartedSignalInfo), '("downloadStarted", WebContextDownloadStartedSignalInfo), '("initializeNotificationPermissions", WebContextInitializeNotificationPermissionsSignalInfo), '("initializeWebExtensions", WebContextInitializeWebExtensionsSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_web_context_new" webkit_web_context_new ::
IO (Ptr WebContext)
webContextNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m WebContext
webContextNew :: m WebContext
webContextNew = IO WebContext -> m WebContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebContext -> m WebContext) -> IO WebContext -> m WebContext
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
result <- IO (Ptr WebContext)
webkit_web_context_new
Text -> Ptr WebContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextNew" Ptr WebContext
result
WebContext
result' <- ((ManagedPtr WebContext -> WebContext)
-> Ptr WebContext -> IO WebContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr WebContext -> WebContext
WebContext) Ptr WebContext
result
WebContext -> IO WebContext
forall (m :: * -> *) a. Monad m => a -> m a
return WebContext
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "webkit_web_context_new_ephemeral" webkit_web_context_new_ephemeral ::
IO (Ptr WebContext)
webContextNewEphemeral ::
(B.CallStack.HasCallStack, MonadIO m) =>
m WebContext
webContextNewEphemeral :: m WebContext
webContextNewEphemeral = IO WebContext -> m WebContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebContext -> m WebContext) -> IO WebContext -> m WebContext
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
result <- IO (Ptr WebContext)
webkit_web_context_new_ephemeral
Text -> Ptr WebContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextNewEphemeral" Ptr WebContext
result
WebContext
result' <- ((ManagedPtr WebContext -> WebContext)
-> Ptr WebContext -> IO WebContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr WebContext -> WebContext
WebContext) Ptr WebContext
result
WebContext -> IO WebContext
forall (m :: * -> *) a. Monad m => a -> m a
return WebContext
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "webkit_web_context_new_with_website_data_manager" webkit_web_context_new_with_website_data_manager ::
Ptr WebKit2.WebsiteDataManager.WebsiteDataManager ->
IO (Ptr WebContext)
webContextNewWithWebsiteDataManager ::
(B.CallStack.HasCallStack, MonadIO m, WebKit2.WebsiteDataManager.IsWebsiteDataManager a) =>
a
-> m WebContext
webContextNewWithWebsiteDataManager :: a -> m WebContext
webContextNewWithWebsiteDataManager manager :: a
manager = IO WebContext -> m WebContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebContext -> m WebContext) -> IO WebContext -> m WebContext
forall a b. (a -> b) -> a -> b
$ do
Ptr WebsiteDataManager
manager' <- a -> IO (Ptr WebsiteDataManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr WebContext
result <- Ptr WebsiteDataManager -> IO (Ptr WebContext)
webkit_web_context_new_with_website_data_manager Ptr WebsiteDataManager
manager'
Text -> Ptr WebContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextNewWithWebsiteDataManager" Ptr WebContext
result
WebContext
result' <- ((ManagedPtr WebContext -> WebContext)
-> Ptr WebContext -> IO WebContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr WebContext -> WebContext
WebContext) Ptr WebContext
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
WebContext -> IO WebContext
forall (m :: * -> *) a. Monad m => a -> m a
return WebContext
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "webkit_web_context_allow_tls_certificate_for_host" webkit_web_context_allow_tls_certificate_for_host ::
Ptr WebContext ->
Ptr Gio.TlsCertificate.TlsCertificate ->
CString ->
IO ()
webContextAllowTlsCertificateForHost ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a, Gio.TlsCertificate.IsTlsCertificate b) =>
a
-> b
-> T.Text
-> m ()
webContextAllowTlsCertificateForHost :: a -> b -> Text -> m ()
webContextAllowTlsCertificateForHost context :: a
context certificate :: b
certificate host :: Text
host = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr TlsCertificate
certificate' <- b -> IO (Ptr TlsCertificate)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
certificate
CString
host' <- Text -> IO CString
textToCString Text
host
Ptr WebContext -> Ptr TlsCertificate -> CString -> IO ()
webkit_web_context_allow_tls_certificate_for_host Ptr WebContext
context' Ptr TlsCertificate
certificate' CString
host'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
certificate
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
host'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextAllowTlsCertificateForHostMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsWebContext a, Gio.TlsCertificate.IsTlsCertificate b) => O.MethodInfo WebContextAllowTlsCertificateForHostMethodInfo a signature where
overloadedMethod = webContextAllowTlsCertificateForHost
#endif
foreign import ccall "webkit_web_context_clear_cache" webkit_web_context_clear_cache ::
Ptr WebContext ->
IO ()
webContextClearCache ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m ()
webContextClearCache :: a -> m ()
webContextClearCache context :: a
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr WebContext -> IO ()
webkit_web_context_clear_cache Ptr WebContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextClearCacheMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextClearCacheMethodInfo a signature where
overloadedMethod = webContextClearCache
#endif
foreign import ccall "webkit_web_context_download_uri" webkit_web_context_download_uri ::
Ptr WebContext ->
CString ->
IO (Ptr WebKit2.Download.Download)
webContextDownloadUri ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> T.Text
-> m WebKit2.Download.Download
webContextDownloadUri :: a -> Text -> m Download
webContextDownloadUri context :: a
context uri :: Text
uri = IO Download -> m Download
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Download -> m Download) -> IO Download -> m Download
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr Download
result <- Ptr WebContext -> CString -> IO (Ptr Download)
webkit_web_context_download_uri Ptr WebContext
context' CString
uri'
Text -> Ptr Download -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextDownloadUri" Ptr Download
result
Download
result' <- ((ManagedPtr Download -> Download) -> Ptr Download -> IO Download
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Download -> Download
WebKit2.Download.Download) Ptr Download
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Download -> IO Download
forall (m :: * -> *) a. Monad m => a -> m a
return Download
result'
#if defined(ENABLE_OVERLOADING)
data WebContextDownloadUriMethodInfo
instance (signature ~ (T.Text -> m WebKit2.Download.Download), MonadIO m, IsWebContext a) => O.MethodInfo WebContextDownloadUriMethodInfo a signature where
overloadedMethod = webContextDownloadUri
#endif
foreign import ccall "webkit_web_context_get_cache_model" webkit_web_context_get_cache_model ::
Ptr WebContext ->
IO CUInt
webContextGetCacheModel ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.Enums.CacheModel
webContextGetCacheModel :: a -> m CacheModel
webContextGetCacheModel context :: a
context = IO CacheModel -> m CacheModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CacheModel -> m CacheModel) -> IO CacheModel -> m CacheModel
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CUInt
result <- Ptr WebContext -> IO CUInt
webkit_web_context_get_cache_model Ptr WebContext
context'
let result' :: CacheModel
result' = (Int -> CacheModel
forall a. Enum a => Int -> a
toEnum (Int -> CacheModel) -> (CUInt -> Int) -> CUInt -> CacheModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CacheModel -> IO CacheModel
forall (m :: * -> *) a. Monad m => a -> m a
return CacheModel
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetCacheModelMethodInfo
instance (signature ~ (m WebKit2.Enums.CacheModel), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetCacheModelMethodInfo a signature where
overloadedMethod = webContextGetCacheModel
#endif
foreign import ccall "webkit_web_context_get_cookie_manager" webkit_web_context_get_cookie_manager ::
Ptr WebContext ->
IO (Ptr WebKit2.CookieManager.CookieManager)
webContextGetCookieManager ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.CookieManager.CookieManager
webContextGetCookieManager :: a -> m CookieManager
webContextGetCookieManager context :: a
context = IO CookieManager -> m CookieManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CookieManager -> m CookieManager)
-> IO CookieManager -> m CookieManager
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr CookieManager
result <- Ptr WebContext -> IO (Ptr CookieManager)
webkit_web_context_get_cookie_manager Ptr WebContext
context'
Text -> Ptr CookieManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextGetCookieManager" Ptr CookieManager
result
CookieManager
result' <- ((ManagedPtr CookieManager -> CookieManager)
-> Ptr CookieManager -> IO CookieManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr CookieManager -> CookieManager
WebKit2.CookieManager.CookieManager) Ptr CookieManager
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CookieManager -> IO CookieManager
forall (m :: * -> *) a. Monad m => a -> m a
return CookieManager
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetCookieManagerMethodInfo
instance (signature ~ (m WebKit2.CookieManager.CookieManager), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetCookieManagerMethodInfo a signature where
overloadedMethod = webContextGetCookieManager
#endif
foreign import ccall "webkit_web_context_get_favicon_database" webkit_web_context_get_favicon_database ::
Ptr WebContext ->
IO (Ptr WebKit2.FaviconDatabase.FaviconDatabase)
webContextGetFaviconDatabase ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.FaviconDatabase.FaviconDatabase
webContextGetFaviconDatabase :: a -> m FaviconDatabase
webContextGetFaviconDatabase context :: a
context = IO FaviconDatabase -> m FaviconDatabase
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FaviconDatabase -> m FaviconDatabase)
-> IO FaviconDatabase -> m FaviconDatabase
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr FaviconDatabase
result <- Ptr WebContext -> IO (Ptr FaviconDatabase)
webkit_web_context_get_favicon_database Ptr WebContext
context'
Text -> Ptr FaviconDatabase -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextGetFaviconDatabase" Ptr FaviconDatabase
result
FaviconDatabase
result' <- ((ManagedPtr FaviconDatabase -> FaviconDatabase)
-> Ptr FaviconDatabase -> IO FaviconDatabase
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FaviconDatabase -> FaviconDatabase
WebKit2.FaviconDatabase.FaviconDatabase) Ptr FaviconDatabase
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
FaviconDatabase -> IO FaviconDatabase
forall (m :: * -> *) a. Monad m => a -> m a
return FaviconDatabase
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetFaviconDatabaseMethodInfo
instance (signature ~ (m WebKit2.FaviconDatabase.FaviconDatabase), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetFaviconDatabaseMethodInfo a signature where
overloadedMethod = webContextGetFaviconDatabase
#endif
foreign import ccall "webkit_web_context_get_favicon_database_directory" webkit_web_context_get_favicon_database_directory ::
Ptr WebContext ->
IO CString
webContextGetFaviconDatabaseDirectory ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m (Maybe T.Text)
webContextGetFaviconDatabaseDirectory :: a -> m (Maybe Text)
webContextGetFaviconDatabaseDirectory context :: a
context = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
result <- Ptr WebContext -> IO CString
webkit_web_context_get_favicon_database_directory Ptr WebContext
context'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data WebContextGetFaviconDatabaseDirectoryMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetFaviconDatabaseDirectoryMethodInfo a signature where
overloadedMethod = webContextGetFaviconDatabaseDirectory
#endif
foreign import ccall "webkit_web_context_get_plugins" webkit_web_context_get_plugins ::
Ptr WebContext ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
webContextGetPlugins ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
webContextGetPlugins :: a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
webContextGetPlugins context :: a
context cancellable :: Maybe b
cancellable callback :: Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just jCancellable :: b
jCancellable -> do
Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just jCallback :: AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr WebContext
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_web_context_get_plugins Ptr WebContext
context' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextGetPluginsMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsWebContext a, Gio.Cancellable.IsCancellable b) => O.MethodInfo WebContextGetPluginsMethodInfo a signature where
overloadedMethod = webContextGetPlugins
#endif
foreign import ccall "webkit_web_context_get_plugins_finish" webkit_web_context_get_plugins_finish ::
Ptr WebContext ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr (GList (Ptr WebKit2.Plugin.Plugin)))
webContextGetPluginsFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m [WebKit2.Plugin.Plugin]
webContextGetPluginsFinish :: a -> b -> m [Plugin]
webContextGetPluginsFinish context :: a
context result_ :: b
result_ = IO [Plugin] -> m [Plugin]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Plugin] -> m [Plugin]) -> IO [Plugin] -> m [Plugin]
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO [Plugin] -> IO () -> IO [Plugin]
forall a b. IO a -> IO b -> IO a
onException (do
Ptr (GList (Ptr Plugin))
result <- (Ptr (Ptr GError) -> IO (Ptr (GList (Ptr Plugin))))
-> IO (Ptr (GList (Ptr Plugin)))
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr (GList (Ptr Plugin))))
-> IO (Ptr (GList (Ptr Plugin))))
-> (Ptr (Ptr GError) -> IO (Ptr (GList (Ptr Plugin))))
-> IO (Ptr (GList (Ptr Plugin)))
forall a b. (a -> b) -> a -> b
$ Ptr WebContext
-> Ptr AsyncResult
-> Ptr (Ptr GError)
-> IO (Ptr (GList (Ptr Plugin)))
webkit_web_context_get_plugins_finish Ptr WebContext
context' Ptr AsyncResult
result_'
[Ptr Plugin]
result' <- Ptr (GList (Ptr Plugin)) -> IO [Ptr Plugin]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Plugin))
result
[Plugin]
result'' <- (Ptr Plugin -> IO Plugin) -> [Ptr Plugin] -> IO [Plugin]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Plugin -> Plugin) -> Ptr Plugin -> IO Plugin
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Plugin -> Plugin
WebKit2.Plugin.Plugin) [Ptr Plugin]
result'
Ptr (GList (Ptr Plugin)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Plugin))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
[Plugin] -> IO [Plugin]
forall (m :: * -> *) a. Monad m => a -> m a
return [Plugin]
result''
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data WebContextGetPluginsFinishMethodInfo
instance (signature ~ (b -> m [WebKit2.Plugin.Plugin]), MonadIO m, IsWebContext a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo WebContextGetPluginsFinishMethodInfo a signature where
overloadedMethod = webContextGetPluginsFinish
#endif
foreign import ccall "webkit_web_context_get_process_model" webkit_web_context_get_process_model ::
Ptr WebContext ->
IO CUInt
webContextGetProcessModel ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.Enums.ProcessModel
webContextGetProcessModel :: a -> m ProcessModel
webContextGetProcessModel context :: a
context = IO ProcessModel -> m ProcessModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ProcessModel -> m ProcessModel)
-> IO ProcessModel -> m ProcessModel
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CUInt
result <- Ptr WebContext -> IO CUInt
webkit_web_context_get_process_model Ptr WebContext
context'
let result' :: ProcessModel
result' = (Int -> ProcessModel
forall a. Enum a => Int -> a
toEnum (Int -> ProcessModel) -> (CUInt -> Int) -> CUInt -> ProcessModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
ProcessModel -> IO ProcessModel
forall (m :: * -> *) a. Monad m => a -> m a
return ProcessModel
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetProcessModelMethodInfo
instance (signature ~ (m WebKit2.Enums.ProcessModel), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetProcessModelMethodInfo a signature where
overloadedMethod = webContextGetProcessModel
#endif
foreign import ccall "webkit_web_context_get_security_manager" webkit_web_context_get_security_manager ::
Ptr WebContext ->
IO (Ptr WebKit2.SecurityManager.SecurityManager)
webContextGetSecurityManager ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.SecurityManager.SecurityManager
webContextGetSecurityManager :: a -> m SecurityManager
webContextGetSecurityManager context :: a
context = IO SecurityManager -> m SecurityManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SecurityManager -> m SecurityManager)
-> IO SecurityManager -> m SecurityManager
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr SecurityManager
result <- Ptr WebContext -> IO (Ptr SecurityManager)
webkit_web_context_get_security_manager Ptr WebContext
context'
Text -> Ptr SecurityManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextGetSecurityManager" Ptr SecurityManager
result
SecurityManager
result' <- ((ManagedPtr SecurityManager -> SecurityManager)
-> Ptr SecurityManager -> IO SecurityManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SecurityManager -> SecurityManager
WebKit2.SecurityManager.SecurityManager) Ptr SecurityManager
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
SecurityManager -> IO SecurityManager
forall (m :: * -> *) a. Monad m => a -> m a
return SecurityManager
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetSecurityManagerMethodInfo
instance (signature ~ (m WebKit2.SecurityManager.SecurityManager), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetSecurityManagerMethodInfo a signature where
overloadedMethod = webContextGetSecurityManager
#endif
foreign import ccall "webkit_web_context_get_spell_checking_enabled" webkit_web_context_get_spell_checking_enabled ::
Ptr WebContext ->
IO CInt
webContextGetSpellCheckingEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m Bool
webContextGetSpellCheckingEnabled :: a -> m Bool
webContextGetSpellCheckingEnabled context :: a
context = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CInt
result <- Ptr WebContext -> IO CInt
webkit_web_context_get_spell_checking_enabled Ptr WebContext
context'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetSpellCheckingEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetSpellCheckingEnabledMethodInfo a signature where
overloadedMethod = webContextGetSpellCheckingEnabled
#endif
foreign import ccall "webkit_web_context_get_spell_checking_languages" webkit_web_context_get_spell_checking_languages ::
Ptr WebContext ->
IO (Ptr CString)
webContextGetSpellCheckingLanguages ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m (Maybe [T.Text])
webContextGetSpellCheckingLanguages :: a -> m (Maybe [Text])
webContextGetSpellCheckingLanguages context :: a
context = IO (Maybe [Text]) -> m (Maybe [Text])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr CString
result <- Ptr WebContext -> IO (Ptr CString)
webkit_web_context_get_spell_checking_languages Ptr WebContext
context'
Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr CString
result' -> do
[Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
#if defined(ENABLE_OVERLOADING)
data WebContextGetSpellCheckingLanguagesMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetSpellCheckingLanguagesMethodInfo a signature where
overloadedMethod = webContextGetSpellCheckingLanguages
#endif
foreign import ccall "webkit_web_context_get_tls_errors_policy" webkit_web_context_get_tls_errors_policy ::
Ptr WebContext ->
IO CUInt
webContextGetTlsErrorsPolicy ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.Enums.TLSErrorsPolicy
webContextGetTlsErrorsPolicy :: a -> m TLSErrorsPolicy
webContextGetTlsErrorsPolicy context :: a
context = IO TLSErrorsPolicy -> m TLSErrorsPolicy
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TLSErrorsPolicy -> m TLSErrorsPolicy)
-> IO TLSErrorsPolicy -> m TLSErrorsPolicy
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CUInt
result <- Ptr WebContext -> IO CUInt
webkit_web_context_get_tls_errors_policy Ptr WebContext
context'
let result' :: TLSErrorsPolicy
result' = (Int -> TLSErrorsPolicy
forall a. Enum a => Int -> a
toEnum (Int -> TLSErrorsPolicy)
-> (CUInt -> Int) -> CUInt -> TLSErrorsPolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
TLSErrorsPolicy -> IO TLSErrorsPolicy
forall (m :: * -> *) a. Monad m => a -> m a
return TLSErrorsPolicy
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetTlsErrorsPolicyMethodInfo
instance (signature ~ (m WebKit2.Enums.TLSErrorsPolicy), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetTlsErrorsPolicyMethodInfo a signature where
overloadedMethod = webContextGetTlsErrorsPolicy
#endif
foreign import ccall "webkit_web_context_get_web_process_count_limit" webkit_web_context_get_web_process_count_limit ::
Ptr WebContext ->
IO Word32
webContextGetWebProcessCountLimit ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m Word32
webContextGetWebProcessCountLimit :: a -> m Word32
webContextGetWebProcessCountLimit context :: a
context = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Word32
result <- Ptr WebContext -> IO Word32
webkit_web_context_get_web_process_count_limit Ptr WebContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data WebContextGetWebProcessCountLimitMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetWebProcessCountLimitMethodInfo a signature where
overloadedMethod = webContextGetWebProcessCountLimit
#endif
foreign import ccall "webkit_web_context_get_website_data_manager" webkit_web_context_get_website_data_manager ::
Ptr WebContext ->
IO (Ptr WebKit2.WebsiteDataManager.WebsiteDataManager)
webContextGetWebsiteDataManager ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m WebKit2.WebsiteDataManager.WebsiteDataManager
webContextGetWebsiteDataManager :: a -> m WebsiteDataManager
webContextGetWebsiteDataManager context :: a
context = IO WebsiteDataManager -> m WebsiteDataManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebsiteDataManager -> m WebsiteDataManager)
-> IO WebsiteDataManager -> m WebsiteDataManager
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr WebsiteDataManager
result <- Ptr WebContext -> IO (Ptr WebsiteDataManager)
webkit_web_context_get_website_data_manager Ptr WebContext
context'
Text -> Ptr WebsiteDataManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextGetWebsiteDataManager" Ptr WebsiteDataManager
result
WebsiteDataManager
result' <- ((ManagedPtr WebsiteDataManager -> WebsiteDataManager)
-> Ptr WebsiteDataManager -> IO WebsiteDataManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebsiteDataManager -> WebsiteDataManager
WebKit2.WebsiteDataManager.WebsiteDataManager) Ptr WebsiteDataManager
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
WebsiteDataManager -> IO WebsiteDataManager
forall (m :: * -> *) a. Monad m => a -> m a
return WebsiteDataManager
result'
#if defined(ENABLE_OVERLOADING)
data WebContextGetWebsiteDataManagerMethodInfo
instance (signature ~ (m WebKit2.WebsiteDataManager.WebsiteDataManager), MonadIO m, IsWebContext a) => O.MethodInfo WebContextGetWebsiteDataManagerMethodInfo a signature where
overloadedMethod = webContextGetWebsiteDataManager
#endif
foreign import ccall "webkit_web_context_initialize_notification_permissions" webkit_web_context_initialize_notification_permissions ::
Ptr WebContext ->
Ptr (GList (Ptr WebKit2.SecurityOrigin.SecurityOrigin)) ->
Ptr (GList (Ptr WebKit2.SecurityOrigin.SecurityOrigin)) ->
IO ()
webContextInitializeNotificationPermissions ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> [WebKit2.SecurityOrigin.SecurityOrigin]
-> [WebKit2.SecurityOrigin.SecurityOrigin]
-> m ()
webContextInitializeNotificationPermissions :: a -> [SecurityOrigin] -> [SecurityOrigin] -> m ()
webContextInitializeNotificationPermissions context :: a
context allowedOrigins :: [SecurityOrigin]
allowedOrigins disallowedOrigins :: [SecurityOrigin]
disallowedOrigins = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
[Ptr SecurityOrigin]
allowedOrigins' <- (SecurityOrigin -> IO (Ptr SecurityOrigin))
-> [SecurityOrigin] -> IO [Ptr SecurityOrigin]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM SecurityOrigin -> IO (Ptr SecurityOrigin)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [SecurityOrigin]
allowedOrigins
Ptr (GList (Ptr SecurityOrigin))
allowedOrigins'' <- [Ptr SecurityOrigin] -> IO (Ptr (GList (Ptr SecurityOrigin)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr SecurityOrigin]
allowedOrigins'
[Ptr SecurityOrigin]
disallowedOrigins' <- (SecurityOrigin -> IO (Ptr SecurityOrigin))
-> [SecurityOrigin] -> IO [Ptr SecurityOrigin]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM SecurityOrigin -> IO (Ptr SecurityOrigin)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [SecurityOrigin]
disallowedOrigins
Ptr (GList (Ptr SecurityOrigin))
disallowedOrigins'' <- [Ptr SecurityOrigin] -> IO (Ptr (GList (Ptr SecurityOrigin)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr SecurityOrigin]
disallowedOrigins'
Ptr WebContext
-> Ptr (GList (Ptr SecurityOrigin))
-> Ptr (GList (Ptr SecurityOrigin))
-> IO ()
webkit_web_context_initialize_notification_permissions Ptr WebContext
context' Ptr (GList (Ptr SecurityOrigin))
allowedOrigins'' Ptr (GList (Ptr SecurityOrigin))
disallowedOrigins''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
(SecurityOrigin -> IO ()) -> [SecurityOrigin] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ SecurityOrigin -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [SecurityOrigin]
allowedOrigins
(SecurityOrigin -> IO ()) -> [SecurityOrigin] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ SecurityOrigin -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [SecurityOrigin]
disallowedOrigins
Ptr (GList (Ptr SecurityOrigin)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr SecurityOrigin))
allowedOrigins''
Ptr (GList (Ptr SecurityOrigin)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr SecurityOrigin))
disallowedOrigins''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextInitializeNotificationPermissionsMethodInfo
instance (signature ~ ([WebKit2.SecurityOrigin.SecurityOrigin] -> [WebKit2.SecurityOrigin.SecurityOrigin] -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextInitializeNotificationPermissionsMethodInfo a signature where
overloadedMethod = webContextInitializeNotificationPermissions
#endif
foreign import ccall "webkit_web_context_is_automation_allowed" webkit_web_context_is_automation_allowed ::
Ptr WebContext ->
IO CInt
webContextIsAutomationAllowed ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m Bool
webContextIsAutomationAllowed :: a -> m Bool
webContextIsAutomationAllowed context :: a
context = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CInt
result <- Ptr WebContext -> IO CInt
webkit_web_context_is_automation_allowed Ptr WebContext
context'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WebContextIsAutomationAllowedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebContext a) => O.MethodInfo WebContextIsAutomationAllowedMethodInfo a signature where
overloadedMethod = webContextIsAutomationAllowed
#endif
foreign import ccall "webkit_web_context_is_ephemeral" webkit_web_context_is_ephemeral ::
Ptr WebContext ->
IO CInt
webContextIsEphemeral ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> m Bool
webContextIsEphemeral :: a -> m Bool
webContextIsEphemeral context :: a
context = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CInt
result <- Ptr WebContext -> IO CInt
webkit_web_context_is_ephemeral Ptr WebContext
context'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WebContextIsEphemeralMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWebContext a) => O.MethodInfo WebContextIsEphemeralMethodInfo a signature where
overloadedMethod = webContextIsEphemeral
#endif
foreign import ccall "webkit_web_context_prefetch_dns" webkit_web_context_prefetch_dns ::
Ptr WebContext ->
CString ->
IO ()
webContextPrefetchDns ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> T.Text
-> m ()
webContextPrefetchDns :: a -> Text -> m ()
webContextPrefetchDns context :: a
context hostname :: Text
hostname = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
hostname' <- Text -> IO CString
textToCString Text
hostname
Ptr WebContext -> CString -> IO ()
webkit_web_context_prefetch_dns Ptr WebContext
context' CString
hostname'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
hostname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextPrefetchDnsMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextPrefetchDnsMethodInfo a signature where
overloadedMethod = webContextPrefetchDns
#endif
foreign import ccall "webkit_web_context_register_uri_scheme" webkit_web_context_register_uri_scheme ::
Ptr WebContext ->
CString ->
FunPtr WebKit2.Callbacks.C_URISchemeRequestCallback ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
webContextRegisterUriScheme ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> T.Text
-> WebKit2.Callbacks.URISchemeRequestCallback
-> m ()
webContextRegisterUriScheme :: a -> Text -> URISchemeRequestCallback -> m ()
webContextRegisterUriScheme context :: a
context scheme :: Text
scheme callback :: URISchemeRequestCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
scheme' <- Text -> IO CString
textToCString Text
scheme
FunPtr C_URISchemeRequestCallback
callback' <- C_URISchemeRequestCallback
-> IO (FunPtr C_URISchemeRequestCallback)
WebKit2.Callbacks.mk_URISchemeRequestCallback (Maybe (Ptr (FunPtr C_URISchemeRequestCallback))
-> URISchemeRequestCallback_WithClosures
-> C_URISchemeRequestCallback
WebKit2.Callbacks.wrap_URISchemeRequestCallback Maybe (Ptr (FunPtr C_URISchemeRequestCallback))
forall a. Maybe a
Nothing (URISchemeRequestCallback -> URISchemeRequestCallback_WithClosures
WebKit2.Callbacks.drop_closures_URISchemeRequestCallback URISchemeRequestCallback
callback))
let userData :: Ptr ()
userData = FunPtr C_URISchemeRequestCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_URISchemeRequestCallback
callback'
let userDataDestroyFunc :: FunPtr (Ptr a -> IO ())
userDataDestroyFunc = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
Ptr WebContext
-> CString
-> FunPtr C_URISchemeRequestCallback
-> Ptr ()
-> FunPtr (Ptr () -> IO ())
-> IO ()
webkit_web_context_register_uri_scheme Ptr WebContext
context' CString
scheme' FunPtr C_URISchemeRequestCallback
callback' Ptr ()
userData FunPtr (Ptr () -> IO ())
forall a. FunPtr (Ptr a -> IO ())
userDataDestroyFunc
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
scheme'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextRegisterUriSchemeMethodInfo
instance (signature ~ (T.Text -> WebKit2.Callbacks.URISchemeRequestCallback -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextRegisterUriSchemeMethodInfo a signature where
overloadedMethod = webContextRegisterUriScheme
#endif
foreign import ccall "webkit_web_context_set_additional_plugins_directory" webkit_web_context_set_additional_plugins_directory ::
Ptr WebContext ->
CString ->
IO ()
webContextSetAdditionalPluginsDirectory ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> T.Text
-> m ()
webContextSetAdditionalPluginsDirectory :: a -> Text -> m ()
webContextSetAdditionalPluginsDirectory context :: a
context directory :: Text
directory = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
directory' <- Text -> IO CString
textToCString Text
directory
Ptr WebContext -> CString -> IO ()
webkit_web_context_set_additional_plugins_directory Ptr WebContext
context' CString
directory'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
directory'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetAdditionalPluginsDirectoryMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetAdditionalPluginsDirectoryMethodInfo a signature where
overloadedMethod = webContextSetAdditionalPluginsDirectory
#endif
foreign import ccall "webkit_web_context_set_automation_allowed" webkit_web_context_set_automation_allowed ::
Ptr WebContext ->
CInt ->
IO ()
webContextSetAutomationAllowed ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> Bool
-> m ()
webContextSetAutomationAllowed :: a -> Bool -> m ()
webContextSetAutomationAllowed context :: a
context allowed :: Bool
allowed = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let allowed' :: CInt
allowed' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
allowed
Ptr WebContext -> CInt -> IO ()
webkit_web_context_set_automation_allowed Ptr WebContext
context' CInt
allowed'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetAutomationAllowedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetAutomationAllowedMethodInfo a signature where
overloadedMethod = webContextSetAutomationAllowed
#endif
foreign import ccall "webkit_web_context_set_cache_model" webkit_web_context_set_cache_model ::
Ptr WebContext ->
CUInt ->
IO ()
webContextSetCacheModel ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> WebKit2.Enums.CacheModel
-> m ()
webContextSetCacheModel :: a -> CacheModel -> m ()
webContextSetCacheModel context :: a
context cacheModel :: CacheModel
cacheModel = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let cacheModel' :: CUInt
cacheModel' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (CacheModel -> Int) -> CacheModel -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CacheModel -> Int
forall a. Enum a => a -> Int
fromEnum) CacheModel
cacheModel
Ptr WebContext -> CUInt -> IO ()
webkit_web_context_set_cache_model Ptr WebContext
context' CUInt
cacheModel'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetCacheModelMethodInfo
instance (signature ~ (WebKit2.Enums.CacheModel -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetCacheModelMethodInfo a signature where
overloadedMethod = webContextSetCacheModel
#endif
foreign import ccall "webkit_web_context_set_disk_cache_directory" webkit_web_context_set_disk_cache_directory ::
Ptr WebContext ->
CString ->
IO ()
{-# DEPRECATED webContextSetDiskCacheDirectory ["(Since version 2.10.)","Use 'GI.WebKit2.Objects.WebContext.webContextNewWithWebsiteDataManager' instead."] #-}
webContextSetDiskCacheDirectory ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> T.Text
-> m ()
webContextSetDiskCacheDirectory :: a -> Text -> m ()
webContextSetDiskCacheDirectory context :: a
context directory :: Text
directory = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
directory' <- Text -> IO CString
textToCString Text
directory
Ptr WebContext -> CString -> IO ()
webkit_web_context_set_disk_cache_directory Ptr WebContext
context' CString
directory'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
directory'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetDiskCacheDirectoryMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetDiskCacheDirectoryMethodInfo a signature where
overloadedMethod = webContextSetDiskCacheDirectory
#endif
foreign import ccall "webkit_web_context_set_favicon_database_directory" webkit_web_context_set_favicon_database_directory ::
Ptr WebContext ->
CString ->
IO ()
webContextSetFaviconDatabaseDirectory ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> Maybe (T.Text)
-> m ()
webContextSetFaviconDatabaseDirectory :: a -> Maybe Text -> m ()
webContextSetFaviconDatabaseDirectory context :: a
context path :: Maybe Text
path = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
maybePath <- case Maybe Text
path of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jPath :: Text
jPath -> do
CString
jPath' <- Text -> IO CString
textToCString Text
jPath
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPath'
Ptr WebContext -> CString -> IO ()
webkit_web_context_set_favicon_database_directory Ptr WebContext
context' CString
maybePath
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePath
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetFaviconDatabaseDirectoryMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetFaviconDatabaseDirectoryMethodInfo a signature where
overloadedMethod = webContextSetFaviconDatabaseDirectory
#endif
foreign import ccall "webkit_web_context_set_network_proxy_settings" webkit_web_context_set_network_proxy_settings ::
Ptr WebContext ->
CUInt ->
Ptr WebKit2.NetworkProxySettings.NetworkProxySettings ->
IO ()
webContextSetNetworkProxySettings ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> WebKit2.Enums.NetworkProxyMode
-> Maybe (WebKit2.NetworkProxySettings.NetworkProxySettings)
-> m ()
webContextSetNetworkProxySettings :: a -> NetworkProxyMode -> Maybe NetworkProxySettings -> m ()
webContextSetNetworkProxySettings context :: a
context proxyMode :: NetworkProxyMode
proxyMode proxySettings :: Maybe NetworkProxySettings
proxySettings = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let proxyMode' :: CUInt
proxyMode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (NetworkProxyMode -> Int) -> NetworkProxyMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NetworkProxyMode -> Int
forall a. Enum a => a -> Int
fromEnum) NetworkProxyMode
proxyMode
Ptr NetworkProxySettings
maybeProxySettings <- case Maybe NetworkProxySettings
proxySettings of
Nothing -> Ptr NetworkProxySettings -> IO (Ptr NetworkProxySettings)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr NetworkProxySettings
forall a. Ptr a
nullPtr
Just jProxySettings :: NetworkProxySettings
jProxySettings -> do
Ptr NetworkProxySettings
jProxySettings' <- NetworkProxySettings -> IO (Ptr NetworkProxySettings)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr NetworkProxySettings
jProxySettings
Ptr NetworkProxySettings -> IO (Ptr NetworkProxySettings)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr NetworkProxySettings
jProxySettings'
Ptr WebContext -> CUInt -> Ptr NetworkProxySettings -> IO ()
webkit_web_context_set_network_proxy_settings Ptr WebContext
context' CUInt
proxyMode' Ptr NetworkProxySettings
maybeProxySettings
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
Maybe NetworkProxySettings
-> (NetworkProxySettings -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe NetworkProxySettings
proxySettings NetworkProxySettings -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetNetworkProxySettingsMethodInfo
instance (signature ~ (WebKit2.Enums.NetworkProxyMode -> Maybe (WebKit2.NetworkProxySettings.NetworkProxySettings) -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetNetworkProxySettingsMethodInfo a signature where
overloadedMethod = webContextSetNetworkProxySettings
#endif
foreign import ccall "webkit_web_context_set_preferred_languages" webkit_web_context_set_preferred_languages ::
Ptr WebContext ->
Ptr CString ->
IO ()
webContextSetPreferredLanguages ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> Maybe ([T.Text])
-> m ()
webContextSetPreferredLanguages :: a -> Maybe [Text] -> m ()
webContextSetPreferredLanguages context :: a
context languages :: Maybe [Text]
languages = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr CString
maybeLanguages <- case Maybe [Text]
languages of
Nothing -> Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just jLanguages :: [Text]
jLanguages -> do
Ptr CString
jLanguages' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jLanguages
Ptr CString -> IO (Ptr CString)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jLanguages'
Ptr WebContext -> Ptr CString -> IO ()
webkit_web_context_set_preferred_languages Ptr WebContext
context' Ptr CString
maybeLanguages
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeLanguages
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeLanguages
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetPreferredLanguagesMethodInfo
instance (signature ~ (Maybe ([T.Text]) -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetPreferredLanguagesMethodInfo a signature where
overloadedMethod = webContextSetPreferredLanguages
#endif
foreign import ccall "webkit_web_context_set_process_model" webkit_web_context_set_process_model ::
Ptr WebContext ->
CUInt ->
IO ()
webContextSetProcessModel ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> WebKit2.Enums.ProcessModel
-> m ()
webContextSetProcessModel :: a -> ProcessModel -> m ()
webContextSetProcessModel context :: a
context processModel :: ProcessModel
processModel = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let processModel' :: CUInt
processModel' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ProcessModel -> Int) -> ProcessModel -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ProcessModel -> Int
forall a. Enum a => a -> Int
fromEnum) ProcessModel
processModel
Ptr WebContext -> CUInt -> IO ()
webkit_web_context_set_process_model Ptr WebContext
context' CUInt
processModel'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetProcessModelMethodInfo
instance (signature ~ (WebKit2.Enums.ProcessModel -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetProcessModelMethodInfo a signature where
overloadedMethod = webContextSetProcessModel
#endif
foreign import ccall "webkit_web_context_set_spell_checking_enabled" webkit_web_context_set_spell_checking_enabled ::
Ptr WebContext ->
CInt ->
IO ()
webContextSetSpellCheckingEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> Bool
-> m ()
webContextSetSpellCheckingEnabled :: a -> Bool -> m ()
webContextSetSpellCheckingEnabled context :: a
context enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let enabled' :: CInt
enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
enabled
Ptr WebContext -> CInt -> IO ()
webkit_web_context_set_spell_checking_enabled Ptr WebContext
context' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetSpellCheckingEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetSpellCheckingEnabledMethodInfo a signature where
overloadedMethod = webContextSetSpellCheckingEnabled
#endif
foreign import ccall "webkit_web_context_set_spell_checking_languages" webkit_web_context_set_spell_checking_languages ::
Ptr WebContext ->
Ptr CString ->
IO ()
webContextSetSpellCheckingLanguages ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> [T.Text]
-> m ()
webContextSetSpellCheckingLanguages :: a -> [Text] -> m ()
webContextSetSpellCheckingLanguages context :: a
context languages :: [Text]
languages = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr CString
languages' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
languages
Ptr WebContext -> Ptr CString -> IO ()
webkit_web_context_set_spell_checking_languages Ptr WebContext
context' Ptr CString
languages'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
languages'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
languages'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetSpellCheckingLanguagesMethodInfo
instance (signature ~ ([T.Text] -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetSpellCheckingLanguagesMethodInfo a signature where
overloadedMethod = webContextSetSpellCheckingLanguages
#endif
foreign import ccall "webkit_web_context_set_tls_errors_policy" webkit_web_context_set_tls_errors_policy ::
Ptr WebContext ->
CUInt ->
IO ()
webContextSetTlsErrorsPolicy ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> WebKit2.Enums.TLSErrorsPolicy
-> m ()
webContextSetTlsErrorsPolicy :: a -> TLSErrorsPolicy -> m ()
webContextSetTlsErrorsPolicy context :: a
context policy :: TLSErrorsPolicy
policy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
let policy' :: CUInt
policy' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (TLSErrorsPolicy -> Int) -> TLSErrorsPolicy -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TLSErrorsPolicy -> Int
forall a. Enum a => a -> Int
fromEnum) TLSErrorsPolicy
policy
Ptr WebContext -> CUInt -> IO ()
webkit_web_context_set_tls_errors_policy Ptr WebContext
context' CUInt
policy'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetTlsErrorsPolicyMethodInfo
instance (signature ~ (WebKit2.Enums.TLSErrorsPolicy -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetTlsErrorsPolicyMethodInfo a signature where
overloadedMethod = webContextSetTlsErrorsPolicy
#endif
foreign import ccall "webkit_web_context_set_web_extensions_directory" webkit_web_context_set_web_extensions_directory ::
Ptr WebContext ->
CString ->
IO ()
webContextSetWebExtensionsDirectory ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> T.Text
-> m ()
webContextSetWebExtensionsDirectory :: a -> Text -> m ()
webContextSetWebExtensionsDirectory context :: a
context directory :: Text
directory = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
CString
directory' <- Text -> IO CString
textToCString Text
directory
Ptr WebContext -> CString -> IO ()
webkit_web_context_set_web_extensions_directory Ptr WebContext
context' CString
directory'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
directory'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetWebExtensionsDirectoryMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetWebExtensionsDirectoryMethodInfo a signature where
overloadedMethod = webContextSetWebExtensionsDirectory
#endif
foreign import ccall "webkit_web_context_set_web_extensions_initialization_user_data" webkit_web_context_set_web_extensions_initialization_user_data ::
Ptr WebContext ->
Ptr GVariant ->
IO ()
webContextSetWebExtensionsInitializationUserData ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> GVariant
-> m ()
webContextSetWebExtensionsInitializationUserData :: a -> GVariant -> m ()
webContextSetWebExtensionsInitializationUserData context :: a
context userData :: GVariant
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr GVariant
userData' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
userData
Ptr WebContext -> Ptr GVariant -> IO ()
webkit_web_context_set_web_extensions_initialization_user_data Ptr WebContext
context' Ptr GVariant
userData'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
userData
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetWebExtensionsInitializationUserDataMethodInfo
instance (signature ~ (GVariant -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetWebExtensionsInitializationUserDataMethodInfo a signature where
overloadedMethod = webContextSetWebExtensionsInitializationUserData
#endif
foreign import ccall "webkit_web_context_set_web_process_count_limit" webkit_web_context_set_web_process_count_limit ::
Ptr WebContext ->
Word32 ->
IO ()
webContextSetWebProcessCountLimit ::
(B.CallStack.HasCallStack, MonadIO m, IsWebContext a) =>
a
-> Word32
-> m ()
webContextSetWebProcessCountLimit :: a -> Word32 -> m ()
webContextSetWebProcessCountLimit context :: a
context limit :: Word32
limit = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
context' <- a -> IO (Ptr WebContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
context
Ptr WebContext -> Word32 -> IO ()
webkit_web_context_set_web_process_count_limit Ptr WebContext
context' Word32
limit
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WebContextSetWebProcessCountLimitMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWebContext a) => O.MethodInfo WebContextSetWebProcessCountLimitMethodInfo a signature where
overloadedMethod = webContextSetWebProcessCountLimit
#endif
foreign import ccall "webkit_web_context_get_default" webkit_web_context_get_default ::
IO (Ptr WebContext)
webContextGetDefault ::
(B.CallStack.HasCallStack, MonadIO m) =>
m WebContext
webContextGetDefault :: m WebContext
webContextGetDefault = IO WebContext -> m WebContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WebContext -> m WebContext) -> IO WebContext -> m WebContext
forall a b. (a -> b) -> a -> b
$ do
Ptr WebContext
result <- IO (Ptr WebContext)
webkit_web_context_get_default
Text -> Ptr WebContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "webContextGetDefault" Ptr WebContext
result
WebContext
result' <- ((ManagedPtr WebContext -> WebContext)
-> Ptr WebContext -> IO WebContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr WebContext -> WebContext
WebContext) Ptr WebContext
result
WebContext -> IO WebContext
forall (m :: * -> *) a. Monad m => a -> m a
return WebContext
result'
#if defined(ENABLE_OVERLOADING)
#endif