{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2.Objects.UserContentFilterStore
(
UserContentFilterStore(..) ,
IsUserContentFilterStore ,
toUserContentFilterStore ,
#if defined(ENABLE_OVERLOADING)
ResolveUserContentFilterStoreMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreFetchIdentifiersMethodInfo,
#endif
userContentFilterStoreFetchIdentifiers ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreFetchIdentifiersFinishMethodInfo,
#endif
userContentFilterStoreFetchIdentifiersFinish,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreGetPathMethodInfo ,
#endif
userContentFilterStoreGetPath ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreLoadMethodInfo ,
#endif
userContentFilterStoreLoad ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreLoadFinishMethodInfo,
#endif
userContentFilterStoreLoadFinish ,
userContentFilterStoreNew ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreRemoveMethodInfo ,
#endif
userContentFilterStoreRemove ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreRemoveFinishMethodInfo,
#endif
userContentFilterStoreRemoveFinish ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreSaveMethodInfo ,
#endif
userContentFilterStoreSave ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreSaveFinishMethodInfo,
#endif
userContentFilterStoreSaveFinish ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreSaveFromFileMethodInfo,
#endif
userContentFilterStoreSaveFromFile ,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStoreSaveFromFileFinishMethodInfo,
#endif
userContentFilterStoreSaveFromFileFinish,
#if defined(ENABLE_OVERLOADING)
UserContentFilterStorePathPropertyInfo ,
#endif
constructUserContentFilterStorePath ,
getUserContentFilterStorePath ,
#if defined(ENABLE_OVERLOADING)
userContentFilterStorePath ,
#endif
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
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 Control.Monad.IO.Class as MIO
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 GHC.Records as R
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
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.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.WebKit2.Structs.UserContentFilter as WebKit2.UserContentFilter
newtype UserContentFilterStore = UserContentFilterStore (SP.ManagedPtr UserContentFilterStore)
deriving (UserContentFilterStore -> UserContentFilterStore -> Bool
(UserContentFilterStore -> UserContentFilterStore -> Bool)
-> (UserContentFilterStore -> UserContentFilterStore -> Bool)
-> Eq UserContentFilterStore
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserContentFilterStore -> UserContentFilterStore -> Bool
$c/= :: UserContentFilterStore -> UserContentFilterStore -> Bool
== :: UserContentFilterStore -> UserContentFilterStore -> Bool
$c== :: UserContentFilterStore -> UserContentFilterStore -> Bool
Eq)
instance SP.ManagedPtrNewtype UserContentFilterStore where
toManagedPtr :: UserContentFilterStore -> ManagedPtr UserContentFilterStore
toManagedPtr (UserContentFilterStore ManagedPtr UserContentFilterStore
p) = ManagedPtr UserContentFilterStore
p
foreign import ccall "webkit_user_content_filter_store_get_type"
c_webkit_user_content_filter_store_get_type :: IO B.Types.GType
instance B.Types.TypedObject UserContentFilterStore where
glibType :: IO GType
glibType = IO GType
c_webkit_user_content_filter_store_get_type
instance B.Types.GObject UserContentFilterStore
class (SP.GObject o, O.IsDescendantOf UserContentFilterStore o) => IsUserContentFilterStore o
instance (SP.GObject o, O.IsDescendantOf UserContentFilterStore o) => IsUserContentFilterStore o
instance O.HasParentTypes UserContentFilterStore
type instance O.ParentTypes UserContentFilterStore = '[GObject.Object.Object]
toUserContentFilterStore :: (MIO.MonadIO m, IsUserContentFilterStore o) => o -> m UserContentFilterStore
toUserContentFilterStore :: forall (m :: * -> *) o.
(MonadIO m, IsUserContentFilterStore o) =>
o -> m UserContentFilterStore
toUserContentFilterStore = IO UserContentFilterStore -> m UserContentFilterStore
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO UserContentFilterStore -> m UserContentFilterStore)
-> (o -> IO UserContentFilterStore)
-> o
-> m UserContentFilterStore
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr UserContentFilterStore -> UserContentFilterStore)
-> o -> IO UserContentFilterStore
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr UserContentFilterStore -> UserContentFilterStore
UserContentFilterStore
instance B.GValue.IsGValue (Maybe UserContentFilterStore) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_user_content_filter_store_get_type
gvalueSet_ :: Ptr GValue -> Maybe UserContentFilterStore -> IO ()
gvalueSet_ Ptr GValue
gv Maybe UserContentFilterStore
P.Nothing = Ptr GValue -> Ptr UserContentFilterStore -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr UserContentFilterStore
forall a. Ptr a
FP.nullPtr :: FP.Ptr UserContentFilterStore)
gvalueSet_ Ptr GValue
gv (P.Just UserContentFilterStore
obj) = UserContentFilterStore
-> (Ptr UserContentFilterStore -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr UserContentFilterStore
obj (Ptr GValue -> Ptr UserContentFilterStore -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe UserContentFilterStore)
gvalueGet_ Ptr GValue
gv = do
Ptr UserContentFilterStore
ptr <- Ptr GValue -> IO (Ptr UserContentFilterStore)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr UserContentFilterStore)
if Ptr UserContentFilterStore
ptr Ptr UserContentFilterStore -> Ptr UserContentFilterStore -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr UserContentFilterStore
forall a. Ptr a
FP.nullPtr
then UserContentFilterStore -> Maybe UserContentFilterStore
forall a. a -> Maybe a
P.Just (UserContentFilterStore -> Maybe UserContentFilterStore)
-> IO UserContentFilterStore -> IO (Maybe UserContentFilterStore)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr UserContentFilterStore -> UserContentFilterStore)
-> Ptr UserContentFilterStore -> IO UserContentFilterStore
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr UserContentFilterStore -> UserContentFilterStore
UserContentFilterStore Ptr UserContentFilterStore
ptr
else Maybe UserContentFilterStore -> IO (Maybe UserContentFilterStore)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe UserContentFilterStore
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveUserContentFilterStoreMethod (t :: Symbol) (o :: *) :: * where
ResolveUserContentFilterStoreMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveUserContentFilterStoreMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveUserContentFilterStoreMethod "fetchIdentifiers" o = UserContentFilterStoreFetchIdentifiersMethodInfo
ResolveUserContentFilterStoreMethod "fetchIdentifiersFinish" o = UserContentFilterStoreFetchIdentifiersFinishMethodInfo
ResolveUserContentFilterStoreMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveUserContentFilterStoreMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveUserContentFilterStoreMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveUserContentFilterStoreMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveUserContentFilterStoreMethod "load" o = UserContentFilterStoreLoadMethodInfo
ResolveUserContentFilterStoreMethod "loadFinish" o = UserContentFilterStoreLoadFinishMethodInfo
ResolveUserContentFilterStoreMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveUserContentFilterStoreMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveUserContentFilterStoreMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveUserContentFilterStoreMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveUserContentFilterStoreMethod "remove" o = UserContentFilterStoreRemoveMethodInfo
ResolveUserContentFilterStoreMethod "removeFinish" o = UserContentFilterStoreRemoveFinishMethodInfo
ResolveUserContentFilterStoreMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveUserContentFilterStoreMethod "save" o = UserContentFilterStoreSaveMethodInfo
ResolveUserContentFilterStoreMethod "saveFinish" o = UserContentFilterStoreSaveFinishMethodInfo
ResolveUserContentFilterStoreMethod "saveFromFile" o = UserContentFilterStoreSaveFromFileMethodInfo
ResolveUserContentFilterStoreMethod "saveFromFileFinish" o = UserContentFilterStoreSaveFromFileFinishMethodInfo
ResolveUserContentFilterStoreMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveUserContentFilterStoreMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveUserContentFilterStoreMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveUserContentFilterStoreMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveUserContentFilterStoreMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveUserContentFilterStoreMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveUserContentFilterStoreMethod "getPath" o = UserContentFilterStoreGetPathMethodInfo
ResolveUserContentFilterStoreMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveUserContentFilterStoreMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveUserContentFilterStoreMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveUserContentFilterStoreMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveUserContentFilterStoreMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveUserContentFilterStoreMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveUserContentFilterStoreMethod t UserContentFilterStore, O.OverloadedMethod info UserContentFilterStore p) => OL.IsLabel t (UserContentFilterStore -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveUserContentFilterStoreMethod t UserContentFilterStore, O.OverloadedMethod info UserContentFilterStore p, R.HasField t UserContentFilterStore p) => R.HasField t UserContentFilterStore p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveUserContentFilterStoreMethod t UserContentFilterStore, O.OverloadedMethodInfo info UserContentFilterStore) => OL.IsLabel t (O.MethodProxy info UserContentFilterStore) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getUserContentFilterStorePath :: (MonadIO m, IsUserContentFilterStore o) => o -> m T.Text
getUserContentFilterStorePath :: forall (m :: * -> *) o.
(MonadIO m, IsUserContentFilterStore o) =>
o -> m Text
getUserContentFilterStorePath o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getUserContentFilterStorePath" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO 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 String
"path"
constructUserContentFilterStorePath :: (IsUserContentFilterStore o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructUserContentFilterStorePath :: forall o (m :: * -> *).
(IsUserContentFilterStore o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructUserContentFilterStorePath Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"path" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStorePathPropertyInfo
instance AttrInfo UserContentFilterStorePathPropertyInfo where
type AttrAllowedOps UserContentFilterStorePathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint UserContentFilterStorePathPropertyInfo = IsUserContentFilterStore
type AttrSetTypeConstraint UserContentFilterStorePathPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint UserContentFilterStorePathPropertyInfo = (~) T.Text
type AttrTransferType UserContentFilterStorePathPropertyInfo = T.Text
type AttrGetType UserContentFilterStorePathPropertyInfo = T.Text
type AttrLabel UserContentFilterStorePathPropertyInfo = "path"
type AttrOrigin UserContentFilterStorePathPropertyInfo = UserContentFilterStore
attrGet = getUserContentFilterStorePath
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructUserContentFilterStorePath
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList UserContentFilterStore
type instance O.AttributeList UserContentFilterStore = UserContentFilterStoreAttributeList
type UserContentFilterStoreAttributeList = ('[ '("path", UserContentFilterStorePathPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
userContentFilterStorePath :: AttrLabelProxy "path"
userContentFilterStorePath = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList UserContentFilterStore = UserContentFilterStoreSignalList
type UserContentFilterStoreSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_user_content_filter_store_new" webkit_user_content_filter_store_new ::
CString ->
IO (Ptr UserContentFilterStore)
userContentFilterStoreNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m UserContentFilterStore
userContentFilterStoreNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m UserContentFilterStore
userContentFilterStoreNew Text
storagePath = IO UserContentFilterStore -> m UserContentFilterStore
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UserContentFilterStore -> m UserContentFilterStore)
-> IO UserContentFilterStore -> m UserContentFilterStore
forall a b. (a -> b) -> a -> b
$ do
CString
storagePath' <- Text -> IO CString
textToCString Text
storagePath
Ptr UserContentFilterStore
result <- CString -> IO (Ptr UserContentFilterStore)
webkit_user_content_filter_store_new CString
storagePath'
Text -> Ptr UserContentFilterStore -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"userContentFilterStoreNew" Ptr UserContentFilterStore
result
UserContentFilterStore
result' <- ((ManagedPtr UserContentFilterStore -> UserContentFilterStore)
-> Ptr UserContentFilterStore -> IO UserContentFilterStore
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr UserContentFilterStore -> UserContentFilterStore
UserContentFilterStore) Ptr UserContentFilterStore
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
storagePath'
UserContentFilterStore -> IO UserContentFilterStore
forall (m :: * -> *) a. Monad m => a -> m a
return UserContentFilterStore
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "webkit_user_content_filter_store_fetch_identifiers" webkit_user_content_filter_store_fetch_identifiers ::
Ptr UserContentFilterStore ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
userContentFilterStoreFetchIdentifiers ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
userContentFilterStoreFetchIdentifiers :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
userContentFilterStoreFetchIdentifiers a
store Maybe b
cancellable 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 UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just 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
Maybe AsyncReadyCallback
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 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 UserContentFilterStore
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_user_content_filter_store_fetch_identifiers Ptr UserContentFilterStore
store' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
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 UserContentFilterStoreFetchIdentifiersMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod UserContentFilterStoreFetchIdentifiersMethodInfo a signature where
overloadedMethod = userContentFilterStoreFetchIdentifiers
instance O.OverloadedMethodInfo UserContentFilterStoreFetchIdentifiersMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreFetchIdentifiers",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreFetchIdentifiers"
}
#endif
foreign import ccall "webkit_user_content_filter_store_fetch_identifiers_finish" webkit_user_content_filter_store_fetch_identifiers_finish ::
Ptr UserContentFilterStore ->
Ptr Gio.AsyncResult.AsyncResult ->
IO (Ptr CString)
userContentFilterStoreFetchIdentifiersFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m [T.Text]
userContentFilterStoreFetchIdentifiersFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsAsyncResult b) =>
a -> b -> m [Text]
userContentFilterStoreFetchIdentifiersFinish a
store b
result_ = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
Ptr CString
result <- Ptr UserContentFilterStore -> Ptr AsyncResult -> IO (Ptr CString)
webkit_user_content_filter_store_fetch_identifiers_finish Ptr UserContentFilterStore
store' Ptr AsyncResult
result_'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"userContentFilterStoreFetchIdentifiersFinish" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
(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
result
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreFetchIdentifiersFinishMethodInfo
instance (signature ~ (b -> m [T.Text]), MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod UserContentFilterStoreFetchIdentifiersFinishMethodInfo a signature where
overloadedMethod = userContentFilterStoreFetchIdentifiersFinish
instance O.OverloadedMethodInfo UserContentFilterStoreFetchIdentifiersFinishMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreFetchIdentifiersFinish",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreFetchIdentifiersFinish"
}
#endif
foreign import ccall "webkit_user_content_filter_store_get_path" webkit_user_content_filter_store_get_path ::
Ptr UserContentFilterStore ->
IO CString
userContentFilterStoreGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a) =>
a
-> m T.Text
userContentFilterStoreGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUserContentFilterStore a) =>
a -> m Text
userContentFilterStoreGetPath a
store = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
CString
result <- Ptr UserContentFilterStore -> IO CString
webkit_user_content_filter_store_get_path Ptr UserContentFilterStore
store'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"userContentFilterStoreGetPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreGetPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsUserContentFilterStore a) => O.OverloadedMethod UserContentFilterStoreGetPathMethodInfo a signature where
overloadedMethod = userContentFilterStoreGetPath
instance O.OverloadedMethodInfo UserContentFilterStoreGetPathMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreGetPath",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreGetPath"
}
#endif
foreign import ccall "webkit_user_content_filter_store_load" webkit_user_content_filter_store_load ::
Ptr UserContentFilterStore ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
userContentFilterStoreLoad ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
userContentFilterStoreLoad :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsCancellable b) =>
a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
userContentFilterStoreLoad a
store Text
identifier Maybe b
cancellable 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 UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
CString
identifier' <- Text -> IO CString
textToCString Text
identifier
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just 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
Maybe AsyncReadyCallback
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 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 UserContentFilterStore
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_user_content_filter_store_load Ptr UserContentFilterStore
store' CString
identifier' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
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
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
identifier'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreLoadMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod UserContentFilterStoreLoadMethodInfo a signature where
overloadedMethod = userContentFilterStoreLoad
instance O.OverloadedMethodInfo UserContentFilterStoreLoadMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreLoad",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreLoad"
}
#endif
foreign import ccall "webkit_user_content_filter_store_load_finish" webkit_user_content_filter_store_load_finish ::
Ptr UserContentFilterStore ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr WebKit2.UserContentFilter.UserContentFilter)
userContentFilterStoreLoadFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m WebKit2.UserContentFilter.UserContentFilter
userContentFilterStoreLoadFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsAsyncResult b) =>
a -> b -> m UserContentFilter
userContentFilterStoreLoadFinish a
store b
result_ = IO UserContentFilter -> m UserContentFilter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UserContentFilter -> m UserContentFilter)
-> IO UserContentFilter -> m UserContentFilter
forall a b. (a -> b) -> a -> b
$ do
Ptr UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO UserContentFilter -> IO () -> IO UserContentFilter
forall a b. IO a -> IO b -> IO a
onException (do
Ptr UserContentFilter
result <- (Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter))
-> (Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter)
forall a b. (a -> b) -> a -> b
$ Ptr UserContentFilterStore
-> Ptr AsyncResult
-> Ptr (Ptr GError)
-> IO (Ptr UserContentFilter)
webkit_user_content_filter_store_load_finish Ptr UserContentFilterStore
store' Ptr AsyncResult
result_'
Text -> Ptr UserContentFilter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"userContentFilterStoreLoadFinish" Ptr UserContentFilter
result
UserContentFilter
result' <- ((ManagedPtr UserContentFilter -> UserContentFilter)
-> Ptr UserContentFilter -> IO UserContentFilter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UserContentFilter -> UserContentFilter
WebKit2.UserContentFilter.UserContentFilter) Ptr UserContentFilter
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
UserContentFilter -> IO UserContentFilter
forall (m :: * -> *) a. Monad m => a -> m a
return UserContentFilter
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreLoadFinishMethodInfo
instance (signature ~ (b -> m WebKit2.UserContentFilter.UserContentFilter), MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod UserContentFilterStoreLoadFinishMethodInfo a signature where
overloadedMethod = userContentFilterStoreLoadFinish
instance O.OverloadedMethodInfo UserContentFilterStoreLoadFinishMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreLoadFinish",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreLoadFinish"
}
#endif
foreign import ccall "webkit_user_content_filter_store_remove" webkit_user_content_filter_store_remove ::
Ptr UserContentFilterStore ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
userContentFilterStoreRemove ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
userContentFilterStoreRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsCancellable b) =>
a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
userContentFilterStoreRemove a
store Text
identifier Maybe b
cancellable 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 UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
CString
identifier' <- Text -> IO CString
textToCString Text
identifier
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just 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
Maybe AsyncReadyCallback
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 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 UserContentFilterStore
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_user_content_filter_store_remove Ptr UserContentFilterStore
store' CString
identifier' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
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
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
identifier'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreRemoveMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod UserContentFilterStoreRemoveMethodInfo a signature where
overloadedMethod = userContentFilterStoreRemove
instance O.OverloadedMethodInfo UserContentFilterStoreRemoveMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreRemove",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreRemove"
}
#endif
foreign import ccall "webkit_user_content_filter_store_remove_finish" webkit_user_content_filter_store_remove_finish ::
Ptr UserContentFilterStore ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
userContentFilterStoreRemoveFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
userContentFilterStoreRemoveFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsAsyncResult b) =>
a -> b -> m ()
userContentFilterStoreRemoveFinish a
store b
result_ = 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 UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr UserContentFilterStore
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
webkit_user_content_filter_store_remove_finish Ptr UserContentFilterStore
store' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreRemoveFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod UserContentFilterStoreRemoveFinishMethodInfo a signature where
overloadedMethod = userContentFilterStoreRemoveFinish
instance O.OverloadedMethodInfo UserContentFilterStoreRemoveFinishMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreRemoveFinish",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreRemoveFinish"
}
#endif
foreign import ccall "webkit_user_content_filter_store_save" webkit_user_content_filter_store_save ::
Ptr UserContentFilterStore ->
CString ->
Ptr GLib.Bytes.Bytes ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
userContentFilterStoreSave ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> GLib.Bytes.Bytes
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
userContentFilterStoreSave :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsCancellable b) =>
a -> Text -> Bytes -> Maybe b -> Maybe AsyncReadyCallback -> m ()
userContentFilterStoreSave a
store Text
identifier Bytes
source Maybe b
cancellable 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 UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
CString
identifier' <- Text -> IO CString
textToCString Text
identifier
Ptr Bytes
source' <- Bytes -> IO (Ptr Bytes)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Bytes
source
Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just 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
Maybe AsyncReadyCallback
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 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 UserContentFilterStore
-> CString
-> Ptr Bytes
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_user_content_filter_store_save Ptr UserContentFilterStore
store' CString
identifier' Ptr Bytes
source' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
Bytes -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Bytes
source
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
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
identifier'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreSaveMethodInfo
instance (signature ~ (T.Text -> GLib.Bytes.Bytes -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsUserContentFilterStore a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod UserContentFilterStoreSaveMethodInfo a signature where
overloadedMethod = userContentFilterStoreSave
instance O.OverloadedMethodInfo UserContentFilterStoreSaveMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreSave",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreSave"
}
#endif
foreign import ccall "webkit_user_content_filter_store_save_finish" webkit_user_content_filter_store_save_finish ::
Ptr UserContentFilterStore ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr WebKit2.UserContentFilter.UserContentFilter)
userContentFilterStoreSaveFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m WebKit2.UserContentFilter.UserContentFilter
userContentFilterStoreSaveFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsAsyncResult b) =>
a -> b -> m UserContentFilter
userContentFilterStoreSaveFinish a
store b
result_ = IO UserContentFilter -> m UserContentFilter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UserContentFilter -> m UserContentFilter)
-> IO UserContentFilter -> m UserContentFilter
forall a b. (a -> b) -> a -> b
$ do
Ptr UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO UserContentFilter -> IO () -> IO UserContentFilter
forall a b. IO a -> IO b -> IO a
onException (do
Ptr UserContentFilter
result <- (Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter))
-> (Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter)
forall a b. (a -> b) -> a -> b
$ Ptr UserContentFilterStore
-> Ptr AsyncResult
-> Ptr (Ptr GError)
-> IO (Ptr UserContentFilter)
webkit_user_content_filter_store_save_finish Ptr UserContentFilterStore
store' Ptr AsyncResult
result_'
Text -> Ptr UserContentFilter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"userContentFilterStoreSaveFinish" Ptr UserContentFilter
result
UserContentFilter
result' <- ((ManagedPtr UserContentFilter -> UserContentFilter)
-> Ptr UserContentFilter -> IO UserContentFilter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UserContentFilter -> UserContentFilter
WebKit2.UserContentFilter.UserContentFilter) Ptr UserContentFilter
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
UserContentFilter -> IO UserContentFilter
forall (m :: * -> *) a. Monad m => a -> m a
return UserContentFilter
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreSaveFinishMethodInfo
instance (signature ~ (b -> m WebKit2.UserContentFilter.UserContentFilter), MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod UserContentFilterStoreSaveFinishMethodInfo a signature where
overloadedMethod = userContentFilterStoreSaveFinish
instance O.OverloadedMethodInfo UserContentFilterStoreSaveFinishMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreSaveFinish",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreSaveFinish"
}
#endif
foreign import ccall "webkit_user_content_filter_store_save_from_file" webkit_user_content_filter_store_save_from_file ::
Ptr UserContentFilterStore ->
CString ->
Ptr Gio.File.File ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
userContentFilterStoreSaveFromFile ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> b
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
userContentFilterStoreSaveFromFile :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsUserContentFilterStore a, IsFile b,
IsCancellable c) =>
a -> Text -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
userContentFilterStoreSaveFromFile a
store Text
identifier b
file Maybe c
cancellable 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 UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
CString
identifier' <- Text -> IO CString
textToCString Text
identifier
Ptr File
file' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
file
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
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
Maybe AsyncReadyCallback
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 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 UserContentFilterStore
-> CString
-> Ptr File
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
webkit_user_content_filter_store_save_from_file Ptr UserContentFilterStore
store' CString
identifier' Ptr File
file' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
file
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
identifier'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreSaveFromFileMethodInfo
instance (signature ~ (T.Text -> b -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsUserContentFilterStore a, Gio.File.IsFile b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod UserContentFilterStoreSaveFromFileMethodInfo a signature where
overloadedMethod = userContentFilterStoreSaveFromFile
instance O.OverloadedMethodInfo UserContentFilterStoreSaveFromFileMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreSaveFromFile",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreSaveFromFile"
}
#endif
foreign import ccall "webkit_user_content_filter_store_save_from_file_finish" webkit_user_content_filter_store_save_from_file_finish ::
Ptr UserContentFilterStore ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr WebKit2.UserContentFilter.UserContentFilter)
userContentFilterStoreSaveFromFileFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m WebKit2.UserContentFilter.UserContentFilter
userContentFilterStoreSaveFromFileFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUserContentFilterStore a,
IsAsyncResult b) =>
a -> b -> m UserContentFilter
userContentFilterStoreSaveFromFileFinish a
store b
result_ = IO UserContentFilter -> m UserContentFilter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UserContentFilter -> m UserContentFilter)
-> IO UserContentFilter -> m UserContentFilter
forall a b. (a -> b) -> a -> b
$ do
Ptr UserContentFilterStore
store' <- a -> IO (Ptr UserContentFilterStore)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
store
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO UserContentFilter -> IO () -> IO UserContentFilter
forall a b. IO a -> IO b -> IO a
onException (do
Ptr UserContentFilter
result <- (Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter))
-> (Ptr (Ptr GError) -> IO (Ptr UserContentFilter))
-> IO (Ptr UserContentFilter)
forall a b. (a -> b) -> a -> b
$ Ptr UserContentFilterStore
-> Ptr AsyncResult
-> Ptr (Ptr GError)
-> IO (Ptr UserContentFilter)
webkit_user_content_filter_store_save_from_file_finish Ptr UserContentFilterStore
store' Ptr AsyncResult
result_'
Text -> Ptr UserContentFilter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"userContentFilterStoreSaveFromFileFinish" Ptr UserContentFilter
result
UserContentFilter
result' <- ((ManagedPtr UserContentFilter -> UserContentFilter)
-> Ptr UserContentFilter -> IO UserContentFilter
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr UserContentFilter -> UserContentFilter
WebKit2.UserContentFilter.UserContentFilter) Ptr UserContentFilter
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
store
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
UserContentFilter -> IO UserContentFilter
forall (m :: * -> *) a. Monad m => a -> m a
return UserContentFilter
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data UserContentFilterStoreSaveFromFileFinishMethodInfo
instance (signature ~ (b -> m WebKit2.UserContentFilter.UserContentFilter), MonadIO m, IsUserContentFilterStore a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod UserContentFilterStoreSaveFromFileFinishMethodInfo a signature where
overloadedMethod = userContentFilterStoreSaveFromFileFinish
instance O.OverloadedMethodInfo UserContentFilterStoreSaveFromFileFinishMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.WebKit2.Objects.UserContentFilterStore.userContentFilterStoreSaveFromFileFinish",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-webkit2-4.0.27/docs/GI-WebKit2-Objects-UserContentFilterStore.html#v:userContentFilterStoreSaveFromFileFinish"
}
#endif