{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.SimpleAsyncResult
(
SimpleAsyncResult(..) ,
IsSimpleAsyncResult ,
toSimpleAsyncResult ,
#if defined(ENABLE_OVERLOADING)
ResolveSimpleAsyncResultMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultCompleteMethodInfo ,
#endif
simpleAsyncResultComplete ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultCompleteInIdleMethodInfo,
#endif
simpleAsyncResultCompleteInIdle ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultGetOpResGbooleanMethodInfo,
#endif
simpleAsyncResultGetOpResGboolean ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultGetOpResGssizeMethodInfo,
#endif
simpleAsyncResultGetOpResGssize ,
simpleAsyncResultIsValid ,
simpleAsyncResultNew ,
simpleAsyncResultNewFromError ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultPropagateErrorMethodInfo,
#endif
simpleAsyncResultPropagateError ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultSetCheckCancellableMethodInfo,
#endif
simpleAsyncResultSetCheckCancellable ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultSetFromErrorMethodInfo ,
#endif
simpleAsyncResultSetFromError ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultSetHandleCancellationMethodInfo,
#endif
simpleAsyncResultSetHandleCancellation ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultSetOpResGbooleanMethodInfo,
#endif
simpleAsyncResultSetOpResGboolean ,
#if defined(ENABLE_OVERLOADING)
SimpleAsyncResultSetOpResGssizeMethodInfo,
#endif
simpleAsyncResultSetOpResGssize ,
) 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.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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
newtype SimpleAsyncResult = SimpleAsyncResult (SP.ManagedPtr SimpleAsyncResult)
deriving (SimpleAsyncResult -> SimpleAsyncResult -> Bool
(SimpleAsyncResult -> SimpleAsyncResult -> Bool)
-> (SimpleAsyncResult -> SimpleAsyncResult -> Bool)
-> Eq SimpleAsyncResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SimpleAsyncResult -> SimpleAsyncResult -> Bool
$c/= :: SimpleAsyncResult -> SimpleAsyncResult -> Bool
== :: SimpleAsyncResult -> SimpleAsyncResult -> Bool
$c== :: SimpleAsyncResult -> SimpleAsyncResult -> Bool
Eq)
instance SP.ManagedPtrNewtype SimpleAsyncResult where
toManagedPtr :: SimpleAsyncResult -> ManagedPtr SimpleAsyncResult
toManagedPtr (SimpleAsyncResult ManagedPtr SimpleAsyncResult
p) = ManagedPtr SimpleAsyncResult
p
foreign import ccall "g_simple_async_result_get_type"
c_g_simple_async_result_get_type :: IO B.Types.GType
instance B.Types.TypedObject SimpleAsyncResult where
glibType :: IO GType
glibType = IO GType
c_g_simple_async_result_get_type
instance B.Types.GObject SimpleAsyncResult
instance B.GValue.IsGValue SimpleAsyncResult where
toGValue :: SimpleAsyncResult -> IO GValue
toGValue SimpleAsyncResult
o = do
GType
gtype <- IO GType
c_g_simple_async_result_get_type
SimpleAsyncResult
-> (Ptr SimpleAsyncResult -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SimpleAsyncResult
o (GType
-> (GValue -> Ptr SimpleAsyncResult -> IO ())
-> Ptr SimpleAsyncResult
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr SimpleAsyncResult -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO SimpleAsyncResult
fromGValue GValue
gv = do
Ptr SimpleAsyncResult
ptr <- GValue -> IO (Ptr SimpleAsyncResult)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr SimpleAsyncResult)
(ManagedPtr SimpleAsyncResult -> SimpleAsyncResult)
-> Ptr SimpleAsyncResult -> IO SimpleAsyncResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr SimpleAsyncResult -> SimpleAsyncResult
SimpleAsyncResult Ptr SimpleAsyncResult
ptr
class (SP.GObject o, O.IsDescendantOf SimpleAsyncResult o) => IsSimpleAsyncResult o
instance (SP.GObject o, O.IsDescendantOf SimpleAsyncResult o) => IsSimpleAsyncResult o
instance O.HasParentTypes SimpleAsyncResult
type instance O.ParentTypes SimpleAsyncResult = '[GObject.Object.Object, Gio.AsyncResult.AsyncResult]
toSimpleAsyncResult :: (MonadIO m, IsSimpleAsyncResult o) => o -> m SimpleAsyncResult
toSimpleAsyncResult :: o -> m SimpleAsyncResult
toSimpleAsyncResult = IO SimpleAsyncResult -> m SimpleAsyncResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SimpleAsyncResult -> m SimpleAsyncResult)
-> (o -> IO SimpleAsyncResult) -> o -> m SimpleAsyncResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SimpleAsyncResult -> SimpleAsyncResult)
-> o -> IO SimpleAsyncResult
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr SimpleAsyncResult -> SimpleAsyncResult
SimpleAsyncResult
#if defined(ENABLE_OVERLOADING)
type family ResolveSimpleAsyncResultMethod (t :: Symbol) (o :: *) :: * where
ResolveSimpleAsyncResultMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSimpleAsyncResultMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSimpleAsyncResultMethod "complete" o = SimpleAsyncResultCompleteMethodInfo
ResolveSimpleAsyncResultMethod "completeInIdle" o = SimpleAsyncResultCompleteInIdleMethodInfo
ResolveSimpleAsyncResultMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSimpleAsyncResultMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSimpleAsyncResultMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSimpleAsyncResultMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSimpleAsyncResultMethod "isTagged" o = Gio.AsyncResult.AsyncResultIsTaggedMethodInfo
ResolveSimpleAsyncResultMethod "legacyPropagateError" o = Gio.AsyncResult.AsyncResultLegacyPropagateErrorMethodInfo
ResolveSimpleAsyncResultMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSimpleAsyncResultMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSimpleAsyncResultMethod "propagateError" o = SimpleAsyncResultPropagateErrorMethodInfo
ResolveSimpleAsyncResultMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSimpleAsyncResultMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSimpleAsyncResultMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSimpleAsyncResultMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSimpleAsyncResultMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSimpleAsyncResultMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSimpleAsyncResultMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSimpleAsyncResultMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSimpleAsyncResultMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSimpleAsyncResultMethod "getOpResGboolean" o = SimpleAsyncResultGetOpResGbooleanMethodInfo
ResolveSimpleAsyncResultMethod "getOpResGssize" o = SimpleAsyncResultGetOpResGssizeMethodInfo
ResolveSimpleAsyncResultMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSimpleAsyncResultMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSimpleAsyncResultMethod "getSourceObject" o = Gio.AsyncResult.AsyncResultGetSourceObjectMethodInfo
ResolveSimpleAsyncResultMethod "getUserData" o = Gio.AsyncResult.AsyncResultGetUserDataMethodInfo
ResolveSimpleAsyncResultMethod "setCheckCancellable" o = SimpleAsyncResultSetCheckCancellableMethodInfo
ResolveSimpleAsyncResultMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSimpleAsyncResultMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSimpleAsyncResultMethod "setFromError" o = SimpleAsyncResultSetFromErrorMethodInfo
ResolveSimpleAsyncResultMethod "setHandleCancellation" o = SimpleAsyncResultSetHandleCancellationMethodInfo
ResolveSimpleAsyncResultMethod "setOpResGboolean" o = SimpleAsyncResultSetOpResGbooleanMethodInfo
ResolveSimpleAsyncResultMethod "setOpResGssize" o = SimpleAsyncResultSetOpResGssizeMethodInfo
ResolveSimpleAsyncResultMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSimpleAsyncResultMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSimpleAsyncResultMethod t SimpleAsyncResult, O.MethodInfo info SimpleAsyncResult p) => OL.IsLabel t (SimpleAsyncResult -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SimpleAsyncResult
type instance O.AttributeList SimpleAsyncResult = SimpleAsyncResultAttributeList
type SimpleAsyncResultAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SimpleAsyncResult = SimpleAsyncResultSignalList
type SimpleAsyncResultSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_simple_async_result_new" g_simple_async_result_new ::
Ptr GObject.Object.Object ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
Ptr () ->
IO (Ptr SimpleAsyncResult)
{-# DEPRECATED simpleAsyncResultNew ["(Since version 2.46)","Use 'GI.Gio.Objects.Task.taskNew' instead."] #-}
simpleAsyncResultNew ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
Maybe (a)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> Ptr ()
-> m SimpleAsyncResult
simpleAsyncResultNew :: Maybe a
-> Maybe AsyncReadyCallback -> Ptr () -> m SimpleAsyncResult
simpleAsyncResultNew Maybe a
sourceObject Maybe AsyncReadyCallback
callback Ptr ()
sourceTag = IO SimpleAsyncResult -> m SimpleAsyncResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SimpleAsyncResult -> m SimpleAsyncResult)
-> IO SimpleAsyncResult -> m SimpleAsyncResult
forall a b. (a -> b) -> a -> b
$ do
Ptr Object
maybeSourceObject <- case Maybe a
sourceObject of
Maybe a
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just a
jSourceObject -> do
Ptr Object
jSourceObject' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jSourceObject
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jSourceObject'
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 SimpleAsyncResult
result <- Ptr Object
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> Ptr ()
-> IO (Ptr SimpleAsyncResult)
g_simple_async_result_new Ptr Object
maybeSourceObject FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData Ptr ()
sourceTag
Text -> Ptr SimpleAsyncResult -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleAsyncResultNew" Ptr SimpleAsyncResult
result
SimpleAsyncResult
result' <- ((ManagedPtr SimpleAsyncResult -> SimpleAsyncResult)
-> Ptr SimpleAsyncResult -> IO SimpleAsyncResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SimpleAsyncResult -> SimpleAsyncResult
SimpleAsyncResult) Ptr SimpleAsyncResult
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
sourceObject a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
SimpleAsyncResult -> IO SimpleAsyncResult
forall (m :: * -> *) a. Monad m => a -> m a
return SimpleAsyncResult
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_simple_async_result_new_from_error" g_simple_async_result_new_from_error ::
Ptr GObject.Object.Object ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
Ptr GError ->
IO (Ptr SimpleAsyncResult)
{-# DEPRECATED simpleAsyncResultNewFromError ["(Since version 2.46)","Use 'GI.Gio.Objects.Task.taskNew' and 'GI.Gio.Objects.Task.taskReturnError' instead."] #-}
simpleAsyncResultNewFromError ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
Maybe (a)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> GError
-> m SimpleAsyncResult
simpleAsyncResultNewFromError :: Maybe a
-> Maybe AsyncReadyCallback -> GError -> m SimpleAsyncResult
simpleAsyncResultNewFromError Maybe a
sourceObject Maybe AsyncReadyCallback
callback GError
error_ = IO SimpleAsyncResult -> m SimpleAsyncResult
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SimpleAsyncResult -> m SimpleAsyncResult)
-> IO SimpleAsyncResult -> m SimpleAsyncResult
forall a b. (a -> b) -> a -> b
$ do
Ptr Object
maybeSourceObject <- case Maybe a
sourceObject of
Maybe a
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just a
jSourceObject -> do
Ptr Object
jSourceObject' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jSourceObject
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jSourceObject'
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'
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr SimpleAsyncResult
result <- Ptr Object
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> Ptr GError
-> IO (Ptr SimpleAsyncResult)
g_simple_async_result_new_from_error Ptr Object
maybeSourceObject FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData Ptr GError
error_'
Text -> Ptr SimpleAsyncResult -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"simpleAsyncResultNewFromError" Ptr SimpleAsyncResult
result
SimpleAsyncResult
result' <- ((ManagedPtr SimpleAsyncResult -> SimpleAsyncResult)
-> Ptr SimpleAsyncResult -> IO SimpleAsyncResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SimpleAsyncResult -> SimpleAsyncResult
SimpleAsyncResult) Ptr SimpleAsyncResult
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
sourceObject a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
GError -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GError
error_
SimpleAsyncResult -> IO SimpleAsyncResult
forall (m :: * -> *) a. Monad m => a -> m a
return SimpleAsyncResult
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_simple_async_result_complete" g_simple_async_result_complete ::
Ptr SimpleAsyncResult ->
IO ()
{-# DEPRECATED simpleAsyncResultComplete ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' instead."] #-}
simpleAsyncResultComplete ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> m ()
simpleAsyncResultComplete :: a -> m ()
simpleAsyncResultComplete a
simple = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
Ptr SimpleAsyncResult -> IO ()
g_simple_async_result_complete Ptr SimpleAsyncResult
simple'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultCompleteMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultCompleteMethodInfo a signature where
overloadedMethod = simpleAsyncResultComplete
#endif
foreign import ccall "g_simple_async_result_complete_in_idle" g_simple_async_result_complete_in_idle ::
Ptr SimpleAsyncResult ->
IO ()
{-# DEPRECATED simpleAsyncResultCompleteInIdle ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' instead."] #-}
simpleAsyncResultCompleteInIdle ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> m ()
simpleAsyncResultCompleteInIdle :: a -> m ()
simpleAsyncResultCompleteInIdle a
simple = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
Ptr SimpleAsyncResult -> IO ()
g_simple_async_result_complete_in_idle Ptr SimpleAsyncResult
simple'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultCompleteInIdleMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultCompleteInIdleMethodInfo a signature where
overloadedMethod = simpleAsyncResultCompleteInIdle
#endif
foreign import ccall "g_simple_async_result_get_op_res_gboolean" g_simple_async_result_get_op_res_gboolean ::
Ptr SimpleAsyncResult ->
IO CInt
{-# DEPRECATED simpleAsyncResultGetOpResGboolean ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' and 'GI.Gio.Objects.Task.taskPropagateBoolean' instead."] #-}
simpleAsyncResultGetOpResGboolean ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> m Bool
simpleAsyncResultGetOpResGboolean :: a -> m Bool
simpleAsyncResultGetOpResGboolean a
simple = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
CInt
result <- Ptr SimpleAsyncResult -> IO CInt
g_simple_async_result_get_op_res_gboolean Ptr SimpleAsyncResult
simple'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultGetOpResGbooleanMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultGetOpResGbooleanMethodInfo a signature where
overloadedMethod = simpleAsyncResultGetOpResGboolean
#endif
foreign import ccall "g_simple_async_result_get_op_res_gssize" g_simple_async_result_get_op_res_gssize ::
Ptr SimpleAsyncResult ->
IO Int64
{-# DEPRECATED simpleAsyncResultGetOpResGssize ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' and 'GI.Gio.Objects.Task.taskPropagateInt' instead."] #-}
simpleAsyncResultGetOpResGssize ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> m Int64
simpleAsyncResultGetOpResGssize :: a -> m Int64
simpleAsyncResultGetOpResGssize a
simple = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
Int64
result <- Ptr SimpleAsyncResult -> IO Int64
g_simple_async_result_get_op_res_gssize Ptr SimpleAsyncResult
simple'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
Int64 -> IO Int64
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultGetOpResGssizeMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultGetOpResGssizeMethodInfo a signature where
overloadedMethod = simpleAsyncResultGetOpResGssize
#endif
foreign import ccall "g_simple_async_result_propagate_error" g_simple_async_result_propagate_error ::
Ptr SimpleAsyncResult ->
Ptr (Ptr GError) ->
IO CInt
{-# DEPRECATED simpleAsyncResultPropagateError ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' instead."] #-}
simpleAsyncResultPropagateError ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> m ()
simpleAsyncResultPropagateError :: a -> m ()
simpleAsyncResultPropagateError a
simple = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
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 SimpleAsyncResult -> Ptr (Ptr GError) -> IO CInt
g_simple_async_result_propagate_error Ptr SimpleAsyncResult
simple'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
() -> 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 SimpleAsyncResultPropagateErrorMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultPropagateErrorMethodInfo a signature where
overloadedMethod = simpleAsyncResultPropagateError
#endif
foreign import ccall "g_simple_async_result_set_check_cancellable" g_simple_async_result_set_check_cancellable ::
Ptr SimpleAsyncResult ->
Ptr Gio.Cancellable.Cancellable ->
IO ()
{-# DEPRECATED simpleAsyncResultSetCheckCancellable ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' instead."] #-}
simpleAsyncResultSetCheckCancellable ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
simpleAsyncResultSetCheckCancellable :: a -> Maybe b -> m ()
simpleAsyncResultSetCheckCancellable a
simple Maybe b
checkCancellable = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
Ptr Cancellable
maybeCheckCancellable <- case Maybe b
checkCancellable 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
jCheckCancellable -> do
Ptr Cancellable
jCheckCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCheckCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCheckCancellable'
Ptr SimpleAsyncResult -> Ptr Cancellable -> IO ()
g_simple_async_result_set_check_cancellable Ptr SimpleAsyncResult
simple' Ptr Cancellable
maybeCheckCancellable
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
checkCancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultSetCheckCancellableMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSimpleAsyncResult a, Gio.Cancellable.IsCancellable b) => O.MethodInfo SimpleAsyncResultSetCheckCancellableMethodInfo a signature where
overloadedMethod = simpleAsyncResultSetCheckCancellable
#endif
foreign import ccall "g_simple_async_result_set_from_error" g_simple_async_result_set_from_error ::
Ptr SimpleAsyncResult ->
Ptr GError ->
IO ()
{-# DEPRECATED simpleAsyncResultSetFromError ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' and 'GI.Gio.Objects.Task.taskReturnError' instead."] #-}
simpleAsyncResultSetFromError ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> GError
-> m ()
simpleAsyncResultSetFromError :: a -> GError -> m ()
simpleAsyncResultSetFromError a
simple GError
error_ = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
Ptr SimpleAsyncResult -> Ptr GError -> IO ()
g_simple_async_result_set_from_error Ptr SimpleAsyncResult
simple' Ptr GError
error_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
GError -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GError
error_
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultSetFromErrorMethodInfo
instance (signature ~ (GError -> m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultSetFromErrorMethodInfo a signature where
overloadedMethod = simpleAsyncResultSetFromError
#endif
foreign import ccall "g_simple_async_result_set_handle_cancellation" g_simple_async_result_set_handle_cancellation ::
Ptr SimpleAsyncResult ->
CInt ->
IO ()
{-# DEPRECATED simpleAsyncResultSetHandleCancellation ["(Since version 2.46)"] #-}
simpleAsyncResultSetHandleCancellation ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> Bool
-> m ()
simpleAsyncResultSetHandleCancellation :: a -> Bool -> m ()
simpleAsyncResultSetHandleCancellation a
simple Bool
handleCancellation = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
let handleCancellation' :: CInt
handleCancellation' = (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
handleCancellation
Ptr SimpleAsyncResult -> CInt -> IO ()
g_simple_async_result_set_handle_cancellation Ptr SimpleAsyncResult
simple' CInt
handleCancellation'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultSetHandleCancellationMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultSetHandleCancellationMethodInfo a signature where
overloadedMethod = simpleAsyncResultSetHandleCancellation
#endif
foreign import ccall "g_simple_async_result_set_op_res_gboolean" g_simple_async_result_set_op_res_gboolean ::
Ptr SimpleAsyncResult ->
CInt ->
IO ()
{-# DEPRECATED simpleAsyncResultSetOpResGboolean ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' and 'GI.Gio.Objects.Task.taskReturnBoolean' instead."] #-}
simpleAsyncResultSetOpResGboolean ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> Bool
-> m ()
simpleAsyncResultSetOpResGboolean :: a -> Bool -> m ()
simpleAsyncResultSetOpResGboolean a
simple Bool
opRes = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
let opRes' :: CInt
opRes' = (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
opRes
Ptr SimpleAsyncResult -> CInt -> IO ()
g_simple_async_result_set_op_res_gboolean Ptr SimpleAsyncResult
simple' CInt
opRes'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultSetOpResGbooleanMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultSetOpResGbooleanMethodInfo a signature where
overloadedMethod = simpleAsyncResultSetOpResGboolean
#endif
foreign import ccall "g_simple_async_result_set_op_res_gssize" g_simple_async_result_set_op_res_gssize ::
Ptr SimpleAsyncResult ->
Int64 ->
IO ()
{-# DEPRECATED simpleAsyncResultSetOpResGssize ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' and 'GI.Gio.Objects.Task.taskReturnInt' instead."] #-}
simpleAsyncResultSetOpResGssize ::
(B.CallStack.HasCallStack, MonadIO m, IsSimpleAsyncResult a) =>
a
-> Int64
-> m ()
simpleAsyncResultSetOpResGssize :: a -> Int64 -> m ()
simpleAsyncResultSetOpResGssize a
simple Int64
opRes = 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 SimpleAsyncResult
simple' <- a -> IO (Ptr SimpleAsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
simple
Ptr SimpleAsyncResult -> Int64 -> IO ()
g_simple_async_result_set_op_res_gssize Ptr SimpleAsyncResult
simple' Int64
opRes
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
simple
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SimpleAsyncResultSetOpResGssizeMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m, IsSimpleAsyncResult a) => O.MethodInfo SimpleAsyncResultSetOpResGssizeMethodInfo a signature where
overloadedMethod = simpleAsyncResultSetOpResGssize
#endif
foreign import ccall "g_simple_async_result_is_valid" g_simple_async_result_is_valid ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr GObject.Object.Object ->
Ptr () ->
IO CInt
{-# DEPRECATED simpleAsyncResultIsValid ["(Since version 2.46)","Use t'GI.Gio.Objects.Task.Task' and 'GI.Gio.Objects.Task.taskIsValid' instead."] #-}
simpleAsyncResultIsValid ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a, GObject.Object.IsObject b) =>
a
-> Maybe (b)
-> Ptr ()
-> m Bool
simpleAsyncResultIsValid :: a -> Maybe b -> Ptr () -> m Bool
simpleAsyncResultIsValid a
result_ Maybe b
source Ptr ()
sourceTag = 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 AsyncResult
result_' <- a -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
result_
Ptr Object
maybeSource <- case Maybe b
source of
Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just b
jSource -> do
Ptr Object
jSource' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSource
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jSource'
CInt
result <- Ptr AsyncResult -> Ptr Object -> Ptr () -> IO CInt
g_simple_async_result_is_valid Ptr AsyncResult
result_' Ptr Object
maybeSource Ptr ()
sourceTag
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
result_
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
source b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
#endif