{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GLib.Structs.SourceCallbackFuncs
(
SourceCallbackFuncs(..) ,
newZeroSourceCallbackFuncs ,
noSourceCallbackFuncs ,
#if defined(ENABLE_OVERLOADING)
ResolveSourceCallbackFuncsMethod ,
#endif
clearSourceCallbackFuncsRef ,
getSourceCallbackFuncsRef ,
setSourceCallbackFuncsRef ,
#if defined(ENABLE_OVERLOADING)
sourceCallbackFuncs_ref ,
#endif
clearSourceCallbackFuncsUnref ,
getSourceCallbackFuncsUnref ,
setSourceCallbackFuncsUnref ,
#if defined(ENABLE_OVERLOADING)
sourceCallbackFuncs_unref ,
#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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Callbacks as GLib.Callbacks
newtype SourceCallbackFuncs = SourceCallbackFuncs (ManagedPtr SourceCallbackFuncs)
deriving (SourceCallbackFuncs -> SourceCallbackFuncs -> Bool
(SourceCallbackFuncs -> SourceCallbackFuncs -> Bool)
-> (SourceCallbackFuncs -> SourceCallbackFuncs -> Bool)
-> Eq SourceCallbackFuncs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SourceCallbackFuncs -> SourceCallbackFuncs -> Bool
$c/= :: SourceCallbackFuncs -> SourceCallbackFuncs -> Bool
== :: SourceCallbackFuncs -> SourceCallbackFuncs -> Bool
$c== :: SourceCallbackFuncs -> SourceCallbackFuncs -> Bool
Eq)
instance WrappedPtr SourceCallbackFuncs where
wrappedPtrCalloc :: IO (Ptr SourceCallbackFuncs)
wrappedPtrCalloc = Int -> IO (Ptr SourceCallbackFuncs)
forall a. Int -> IO (Ptr a)
callocBytes 24
wrappedPtrCopy :: SourceCallbackFuncs -> IO SourceCallbackFuncs
wrappedPtrCopy = \p :: SourceCallbackFuncs
p -> SourceCallbackFuncs
-> (Ptr SourceCallbackFuncs -> IO SourceCallbackFuncs)
-> IO SourceCallbackFuncs
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
p (Int -> Ptr SourceCallbackFuncs -> IO (Ptr SourceCallbackFuncs)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 24 (Ptr SourceCallbackFuncs -> IO (Ptr SourceCallbackFuncs))
-> (Ptr SourceCallbackFuncs -> IO SourceCallbackFuncs)
-> Ptr SourceCallbackFuncs
-> IO SourceCallbackFuncs
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr SourceCallbackFuncs -> SourceCallbackFuncs)
-> Ptr SourceCallbackFuncs -> IO SourceCallbackFuncs
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr SourceCallbackFuncs -> SourceCallbackFuncs
SourceCallbackFuncs)
wrappedPtrFree :: Maybe (GDestroyNotify SourceCallbackFuncs)
wrappedPtrFree = GDestroyNotify SourceCallbackFuncs
-> Maybe (GDestroyNotify SourceCallbackFuncs)
forall a. a -> Maybe a
Just GDestroyNotify SourceCallbackFuncs
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroSourceCallbackFuncs :: MonadIO m => m SourceCallbackFuncs
newZeroSourceCallbackFuncs :: m SourceCallbackFuncs
newZeroSourceCallbackFuncs = IO SourceCallbackFuncs -> m SourceCallbackFuncs
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SourceCallbackFuncs -> m SourceCallbackFuncs)
-> IO SourceCallbackFuncs -> m SourceCallbackFuncs
forall a b. (a -> b) -> a -> b
$ IO (Ptr SourceCallbackFuncs)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr SourceCallbackFuncs)
-> (Ptr SourceCallbackFuncs -> IO SourceCallbackFuncs)
-> IO SourceCallbackFuncs
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr SourceCallbackFuncs -> SourceCallbackFuncs)
-> Ptr SourceCallbackFuncs -> IO SourceCallbackFuncs
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr SourceCallbackFuncs -> SourceCallbackFuncs
SourceCallbackFuncs
instance tag ~ 'AttrSet => Constructible SourceCallbackFuncs tag where
new :: (ManagedPtr SourceCallbackFuncs -> SourceCallbackFuncs)
-> [AttrOp SourceCallbackFuncs tag] -> m SourceCallbackFuncs
new _ attrs :: [AttrOp SourceCallbackFuncs tag]
attrs = do
SourceCallbackFuncs
o <- m SourceCallbackFuncs
forall (m :: * -> *). MonadIO m => m SourceCallbackFuncs
newZeroSourceCallbackFuncs
SourceCallbackFuncs
-> [AttrOp SourceCallbackFuncs 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set SourceCallbackFuncs
o [AttrOp SourceCallbackFuncs tag]
[AttrOp SourceCallbackFuncs 'AttrSet]
attrs
SourceCallbackFuncs -> m SourceCallbackFuncs
forall (m :: * -> *) a. Monad m => a -> m a
return SourceCallbackFuncs
o
noSourceCallbackFuncs :: Maybe SourceCallbackFuncs
noSourceCallbackFuncs :: Maybe SourceCallbackFuncs
noSourceCallbackFuncs = Maybe SourceCallbackFuncs
forall a. Maybe a
Nothing
getSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> m (Maybe GLib.Callbacks.SourceCallbackFuncsRefFieldCallback)
getSourceCallbackFuncsRef :: SourceCallbackFuncs
-> m (Maybe SourceCallbackFuncsRefFieldCallback)
getSourceCallbackFuncsRef s :: SourceCallbackFuncs
s = IO (Maybe SourceCallbackFuncsRefFieldCallback)
-> m (Maybe SourceCallbackFuncsRefFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe SourceCallbackFuncsRefFieldCallback)
-> m (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
-> m (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. (a -> b) -> a -> b
$ SourceCallbackFuncs
-> (Ptr SourceCallbackFuncs
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
s ((Ptr SourceCallbackFuncs
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> (Ptr SourceCallbackFuncs
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SourceCallbackFuncs
ptr -> do
FunPtr SourceCallbackFuncsRefFieldCallback
val <- Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
-> IO (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr SourceCallbackFuncs
ptr Ptr SourceCallbackFuncs
-> Int -> Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO (FunPtr GLib.Callbacks.C_SourceCallbackFuncsRefFieldCallback)
Maybe SourceCallbackFuncsRefFieldCallback
result <- FunPtr SourceCallbackFuncsRefFieldCallback
-> (FunPtr SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback)
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr SourceCallbackFuncsRefFieldCallback
val ((FunPtr SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback)
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> (FunPtr SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback)
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr SourceCallbackFuncsRefFieldCallback
val' -> do
let val'' :: SourceCallbackFuncsRefFieldCallback
val'' = FunPtr SourceCallbackFuncsRefFieldCallback
-> SourceCallbackFuncsRefFieldCallback
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr SourceCallbackFuncsRefFieldCallback -> Ptr () -> m ()
GLib.Callbacks.dynamic_SourceCallbackFuncsRefFieldCallback FunPtr SourceCallbackFuncsRefFieldCallback
val'
SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback
forall (m :: * -> *) a. Monad m => a -> m a
return SourceCallbackFuncsRefFieldCallback
val''
Maybe SourceCallbackFuncsRefFieldCallback
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SourceCallbackFuncsRefFieldCallback
result
setSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> FunPtr GLib.Callbacks.C_SourceCallbackFuncsRefFieldCallback -> m ()
setSourceCallbackFuncsRef :: SourceCallbackFuncs
-> FunPtr SourceCallbackFuncsRefFieldCallback -> m ()
setSourceCallbackFuncsRef s :: SourceCallbackFuncs
s val :: FunPtr SourceCallbackFuncsRefFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SourceCallbackFuncs -> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
s ((Ptr SourceCallbackFuncs -> IO ()) -> IO ())
-> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SourceCallbackFuncs
ptr -> do
Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
-> FunPtr SourceCallbackFuncsRefFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SourceCallbackFuncs
ptr Ptr SourceCallbackFuncs
-> Int -> Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (FunPtr SourceCallbackFuncsRefFieldCallback
val :: FunPtr GLib.Callbacks.C_SourceCallbackFuncsRefFieldCallback)
clearSourceCallbackFuncsRef :: MonadIO m => SourceCallbackFuncs -> m ()
clearSourceCallbackFuncsRef :: SourceCallbackFuncs -> m ()
clearSourceCallbackFuncsRef s :: SourceCallbackFuncs
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SourceCallbackFuncs -> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
s ((Ptr SourceCallbackFuncs -> IO ()) -> IO ())
-> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SourceCallbackFuncs
ptr -> do
Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
-> FunPtr SourceCallbackFuncsRefFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SourceCallbackFuncs
ptr Ptr SourceCallbackFuncs
-> Int -> Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (FunPtr SourceCallbackFuncsRefFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GLib.Callbacks.C_SourceCallbackFuncsRefFieldCallback)
#if defined(ENABLE_OVERLOADING)
data SourceCallbackFuncsRefFieldInfo
instance AttrInfo SourceCallbackFuncsRefFieldInfo where
type AttrBaseTypeConstraint SourceCallbackFuncsRefFieldInfo = (~) SourceCallbackFuncs
type AttrAllowedOps SourceCallbackFuncsRefFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint SourceCallbackFuncsRefFieldInfo = (~) (FunPtr GLib.Callbacks.C_SourceCallbackFuncsRefFieldCallback)
type AttrTransferTypeConstraint SourceCallbackFuncsRefFieldInfo = (~)GLib.Callbacks.SourceCallbackFuncsRefFieldCallback
type AttrTransferType SourceCallbackFuncsRefFieldInfo = (FunPtr GLib.Callbacks.C_SourceCallbackFuncsRefFieldCallback)
type AttrGetType SourceCallbackFuncsRefFieldInfo = Maybe GLib.Callbacks.SourceCallbackFuncsRefFieldCallback
type AttrLabel SourceCallbackFuncsRefFieldInfo = "ref"
type AttrOrigin SourceCallbackFuncsRefFieldInfo = SourceCallbackFuncs
attrGet = getSourceCallbackFuncsRef
attrSet = setSourceCallbackFuncsRef
attrConstruct = undefined
attrClear = clearSourceCallbackFuncsRef
attrTransfer _ v = do
GLib.Callbacks.mk_SourceCallbackFuncsRefFieldCallback (GLib.Callbacks.wrap_SourceCallbackFuncsRefFieldCallback Nothing v)
sourceCallbackFuncs_ref :: AttrLabelProxy "ref"
sourceCallbackFuncs_ref = AttrLabelProxy
#endif
getSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> m (Maybe GLib.Callbacks.SourceCallbackFuncsUnrefFieldCallback)
getSourceCallbackFuncsUnref :: SourceCallbackFuncs
-> m (Maybe SourceCallbackFuncsRefFieldCallback)
getSourceCallbackFuncsUnref s :: SourceCallbackFuncs
s = IO (Maybe SourceCallbackFuncsRefFieldCallback)
-> m (Maybe SourceCallbackFuncsRefFieldCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe SourceCallbackFuncsRefFieldCallback)
-> m (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
-> m (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. (a -> b) -> a -> b
$ SourceCallbackFuncs
-> (Ptr SourceCallbackFuncs
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
s ((Ptr SourceCallbackFuncs
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> (Ptr SourceCallbackFuncs
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SourceCallbackFuncs
ptr -> do
FunPtr SourceCallbackFuncsRefFieldCallback
val <- Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
-> IO (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a. Storable a => Ptr a -> IO a
peek (Ptr SourceCallbackFuncs
ptr Ptr SourceCallbackFuncs
-> Int -> Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO (FunPtr GLib.Callbacks.C_SourceCallbackFuncsUnrefFieldCallback)
Maybe SourceCallbackFuncsRefFieldCallback
result <- FunPtr SourceCallbackFuncsRefFieldCallback
-> (FunPtr SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback)
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr SourceCallbackFuncsRefFieldCallback
val ((FunPtr SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback)
-> IO (Maybe SourceCallbackFuncsRefFieldCallback))
-> (FunPtr SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback)
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr SourceCallbackFuncsRefFieldCallback
val' -> do
let val'' :: SourceCallbackFuncsRefFieldCallback
val'' = FunPtr SourceCallbackFuncsRefFieldCallback
-> SourceCallbackFuncsRefFieldCallback
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr SourceCallbackFuncsRefFieldCallback -> Ptr () -> m ()
GLib.Callbacks.dynamic_SourceCallbackFuncsUnrefFieldCallback FunPtr SourceCallbackFuncsRefFieldCallback
val'
SourceCallbackFuncsRefFieldCallback
-> IO SourceCallbackFuncsRefFieldCallback
forall (m :: * -> *) a. Monad m => a -> m a
return SourceCallbackFuncsRefFieldCallback
val''
Maybe SourceCallbackFuncsRefFieldCallback
-> IO (Maybe SourceCallbackFuncsRefFieldCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SourceCallbackFuncsRefFieldCallback
result
setSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> FunPtr GLib.Callbacks.C_SourceCallbackFuncsUnrefFieldCallback -> m ()
setSourceCallbackFuncsUnref :: SourceCallbackFuncs
-> FunPtr SourceCallbackFuncsRefFieldCallback -> m ()
setSourceCallbackFuncsUnref s :: SourceCallbackFuncs
s val :: FunPtr SourceCallbackFuncsRefFieldCallback
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SourceCallbackFuncs -> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
s ((Ptr SourceCallbackFuncs -> IO ()) -> IO ())
-> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SourceCallbackFuncs
ptr -> do
Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
-> FunPtr SourceCallbackFuncsRefFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SourceCallbackFuncs
ptr Ptr SourceCallbackFuncs
-> Int -> Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (FunPtr SourceCallbackFuncsRefFieldCallback
val :: FunPtr GLib.Callbacks.C_SourceCallbackFuncsUnrefFieldCallback)
clearSourceCallbackFuncsUnref :: MonadIO m => SourceCallbackFuncs -> m ()
clearSourceCallbackFuncsUnref :: SourceCallbackFuncs -> m ()
clearSourceCallbackFuncsUnref s :: SourceCallbackFuncs
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ SourceCallbackFuncs -> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr SourceCallbackFuncs
s ((Ptr SourceCallbackFuncs -> IO ()) -> IO ())
-> (Ptr SourceCallbackFuncs -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr SourceCallbackFuncs
ptr -> do
Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
-> FunPtr SourceCallbackFuncsRefFieldCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr SourceCallbackFuncs
ptr Ptr SourceCallbackFuncs
-> Int -> Ptr (FunPtr SourceCallbackFuncsRefFieldCallback)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (FunPtr SourceCallbackFuncsRefFieldCallback
forall a. FunPtr a
FP.nullFunPtr :: FunPtr GLib.Callbacks.C_SourceCallbackFuncsUnrefFieldCallback)
#if defined(ENABLE_OVERLOADING)
data SourceCallbackFuncsUnrefFieldInfo
instance AttrInfo SourceCallbackFuncsUnrefFieldInfo where
type AttrBaseTypeConstraint SourceCallbackFuncsUnrefFieldInfo = (~) SourceCallbackFuncs
type AttrAllowedOps SourceCallbackFuncsUnrefFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint SourceCallbackFuncsUnrefFieldInfo = (~) (FunPtr GLib.Callbacks.C_SourceCallbackFuncsUnrefFieldCallback)
type AttrTransferTypeConstraint SourceCallbackFuncsUnrefFieldInfo = (~)GLib.Callbacks.SourceCallbackFuncsUnrefFieldCallback
type AttrTransferType SourceCallbackFuncsUnrefFieldInfo = (FunPtr GLib.Callbacks.C_SourceCallbackFuncsUnrefFieldCallback)
type AttrGetType SourceCallbackFuncsUnrefFieldInfo = Maybe GLib.Callbacks.SourceCallbackFuncsUnrefFieldCallback
type AttrLabel SourceCallbackFuncsUnrefFieldInfo = "unref"
type AttrOrigin SourceCallbackFuncsUnrefFieldInfo = SourceCallbackFuncs
attrGet = getSourceCallbackFuncsUnref
attrSet = setSourceCallbackFuncsUnref
attrConstruct = undefined
attrClear = clearSourceCallbackFuncsUnref
attrTransfer _ v = do
GLib.Callbacks.mk_SourceCallbackFuncsUnrefFieldCallback (GLib.Callbacks.wrap_SourceCallbackFuncsUnrefFieldCallback Nothing v)
sourceCallbackFuncs_unref :: AttrLabelProxy "unref"
sourceCallbackFuncs_unref = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SourceCallbackFuncs
type instance O.AttributeList SourceCallbackFuncs = SourceCallbackFuncsAttributeList
type SourceCallbackFuncsAttributeList = ('[ '("ref", SourceCallbackFuncsRefFieldInfo), '("unref", SourceCallbackFuncsUnrefFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveSourceCallbackFuncsMethod (t :: Symbol) (o :: *) :: * where
ResolveSourceCallbackFuncsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSourceCallbackFuncsMethod t SourceCallbackFuncs, O.MethodInfo info SourceCallbackFuncs p) => OL.IsLabel t (SourceCallbackFuncs -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif