{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GObject.Objects.BindingGroup
(
BindingGroup(..) ,
IsBindingGroup ,
toBindingGroup ,
#if defined(ENABLE_OVERLOADING)
ResolveBindingGroupMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
BindingGroupBindMethodInfo ,
#endif
bindingGroupBind ,
#if defined(ENABLE_OVERLOADING)
BindingGroupBindFullMethodInfo ,
#endif
bindingGroupBindFull ,
#if defined(ENABLE_OVERLOADING)
BindingGroupDupSourceMethodInfo ,
#endif
bindingGroupDupSource ,
bindingGroupNew ,
#if defined(ENABLE_OVERLOADING)
BindingGroupSetSourceMethodInfo ,
#endif
bindingGroupSetSource ,
#if defined(ENABLE_OVERLOADING)
BindingGroupSourcePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
bindingGroupSource ,
#endif
clearBindingGroupSource ,
constructBindingGroupSource ,
getBindingGroupSource ,
setBindingGroupSource ,
) 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.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 {-# SOURCE #-} qualified GI.GObject.Flags as GObject.Flags
import {-# SOURCE #-} qualified GI.GObject.Objects.Object as GObject.Object
newtype BindingGroup = BindingGroup (SP.ManagedPtr BindingGroup)
deriving (BindingGroup -> BindingGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BindingGroup -> BindingGroup -> Bool
$c/= :: BindingGroup -> BindingGroup -> Bool
== :: BindingGroup -> BindingGroup -> Bool
$c== :: BindingGroup -> BindingGroup -> Bool
Eq)
instance SP.ManagedPtrNewtype BindingGroup where
toManagedPtr :: BindingGroup -> ManagedPtr BindingGroup
toManagedPtr (BindingGroup ManagedPtr BindingGroup
p) = ManagedPtr BindingGroup
p
foreign import ccall "g_binding_group_get_type"
c_g_binding_group_get_type :: IO B.Types.GType
instance B.Types.TypedObject BindingGroup where
glibType :: IO GType
glibType = IO GType
c_g_binding_group_get_type
instance B.Types.GObject BindingGroup
class (SP.GObject o, O.IsDescendantOf BindingGroup o) => IsBindingGroup o
instance (SP.GObject o, O.IsDescendantOf BindingGroup o) => IsBindingGroup o
instance O.HasParentTypes BindingGroup
type instance O.ParentTypes BindingGroup = '[GObject.Object.Object]
toBindingGroup :: (MIO.MonadIO m, IsBindingGroup o) => o -> m BindingGroup
toBindingGroup :: forall (m :: * -> *) o.
(MonadIO m, IsBindingGroup o) =>
o -> m BindingGroup
toBindingGroup = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr BindingGroup -> BindingGroup
BindingGroup
instance B.GValue.IsGValue (Maybe BindingGroup) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_binding_group_get_type
gvalueSet_ :: Ptr GValue -> Maybe BindingGroup -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BindingGroup
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr BindingGroup)
gvalueSet_ Ptr GValue
gv (P.Just BindingGroup
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BindingGroup
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe BindingGroup)
gvalueGet_ Ptr GValue
gv = do
Ptr BindingGroup
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr BindingGroup)
if Ptr BindingGroup
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr BindingGroup -> BindingGroup
BindingGroup Ptr BindingGroup
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveBindingGroupMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveBindingGroupMethod "bind" o = BindingGroupBindMethodInfo
ResolveBindingGroupMethod "bindFull" o = BindingGroupBindFullMethodInfo
ResolveBindingGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveBindingGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveBindingGroupMethod "dupSource" o = BindingGroupDupSourceMethodInfo
ResolveBindingGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveBindingGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveBindingGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveBindingGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveBindingGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveBindingGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveBindingGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveBindingGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveBindingGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveBindingGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveBindingGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveBindingGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveBindingGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveBindingGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveBindingGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveBindingGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveBindingGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveBindingGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveBindingGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveBindingGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveBindingGroupMethod "setSource" o = BindingGroupSetSourceMethodInfo
ResolveBindingGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBindingGroupMethod t BindingGroup, O.OverloadedMethod info BindingGroup p) => OL.IsLabel t (BindingGroup -> 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 ~ ResolveBindingGroupMethod t BindingGroup, O.OverloadedMethod info BindingGroup p, R.HasField t BindingGroup p) => R.HasField t BindingGroup p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveBindingGroupMethod t BindingGroup, O.OverloadedMethodInfo info BindingGroup) => OL.IsLabel t (O.MethodProxy info BindingGroup) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getBindingGroupSource :: (MonadIO m, IsBindingGroup o) => o -> m (Maybe GObject.Object.Object)
getBindingGroupSource :: forall (m :: * -> *) o.
(MonadIO m, IsBindingGroup o) =>
o -> m (Maybe Object)
getBindingGroupSource o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"source" ManagedPtr Object -> Object
GObject.Object.Object
setBindingGroupSource :: (MonadIO m, IsBindingGroup o, GObject.Object.IsObject a) => o -> a -> m ()
setBindingGroupSource :: forall (m :: * -> *) o a.
(MonadIO m, IsBindingGroup o, IsObject a) =>
o -> a -> m ()
setBindingGroupSource o
obj a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"source" (forall a. a -> Maybe a
Just a
val)
constructBindingGroupSource :: (IsBindingGroup o, MIO.MonadIO m, GObject.Object.IsObject a) => a -> m (GValueConstruct o)
constructBindingGroupSource :: forall o (m :: * -> *) a.
(IsBindingGroup o, MonadIO m, IsObject a) =>
a -> m (GValueConstruct o)
constructBindingGroupSource a
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"source" (forall a. a -> Maybe a
P.Just a
val)
clearBindingGroupSource :: (MonadIO m, IsBindingGroup o) => o -> m ()
clearBindingGroupSource :: forall (m :: * -> *) o. (MonadIO m, IsBindingGroup o) => o -> m ()
clearBindingGroupSource o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"source" (forall a. Maybe a
Nothing :: Maybe GObject.Object.Object)
#if defined(ENABLE_OVERLOADING)
data BindingGroupSourcePropertyInfo
instance AttrInfo BindingGroupSourcePropertyInfo where
type AttrAllowedOps BindingGroupSourcePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint BindingGroupSourcePropertyInfo = IsBindingGroup
type AttrSetTypeConstraint BindingGroupSourcePropertyInfo = GObject.Object.IsObject
type AttrTransferTypeConstraint BindingGroupSourcePropertyInfo = GObject.Object.IsObject
type AttrTransferType BindingGroupSourcePropertyInfo = GObject.Object.Object
type AttrGetType BindingGroupSourcePropertyInfo = (Maybe GObject.Object.Object)
type AttrLabel BindingGroupSourcePropertyInfo = "source"
type AttrOrigin BindingGroupSourcePropertyInfo = BindingGroup
attrGet = getBindingGroupSource
attrSet = setBindingGroupSource
attrTransfer _ v = do
unsafeCastTo GObject.Object.Object v
attrConstruct = constructBindingGroupSource
attrClear = clearBindingGroupSource
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GObject.Objects.BindingGroup.source"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.28/docs/GI-GObject-Objects-BindingGroup.html#g:attr:source"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList BindingGroup
type instance O.AttributeList BindingGroup = BindingGroupAttributeList
type BindingGroupAttributeList = ('[ '("source", BindingGroupSourcePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
bindingGroupSource :: AttrLabelProxy "source"
bindingGroupSource = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList BindingGroup = BindingGroupSignalList
type BindingGroupSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_binding_group_new" g_binding_group_new ::
IO (Ptr BindingGroup)
bindingGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m BindingGroup
bindingGroupNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m BindingGroup
bindingGroupNew = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BindingGroup
result <- IO (Ptr BindingGroup)
g_binding_group_new
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"bindingGroupNew" Ptr BindingGroup
result
BindingGroup
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BindingGroup -> BindingGroup
BindingGroup) Ptr BindingGroup
result
forall (m :: * -> *) a. Monad m => a -> m a
return BindingGroup
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_binding_group_bind" g_binding_group_bind ::
Ptr BindingGroup ->
CString ->
Ptr GObject.Object.Object ->
CString ->
CUInt ->
IO ()
bindingGroupBind ::
(B.CallStack.HasCallStack, MonadIO m, IsBindingGroup a, GObject.Object.IsObject b) =>
a
-> T.Text
-> b
-> T.Text
-> [GObject.Flags.BindingFlags]
-> m ()
bindingGroupBind :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsBindingGroup a, IsObject b) =>
a -> Text -> b -> Text -> [BindingFlags] -> m ()
bindingGroupBind a
self Text
sourceProperty b
target Text
targetProperty [BindingFlags]
flags = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BindingGroup
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
sourceProperty' <- Text -> IO CString
textToCString Text
sourceProperty
Ptr Object
target' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
CString
targetProperty' <- Text -> IO CString
textToCString Text
targetProperty
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [BindingFlags]
flags
Ptr BindingGroup
-> CString -> Ptr Object -> CString -> CUInt -> IO ()
g_binding_group_bind Ptr BindingGroup
self' CString
sourceProperty' Ptr Object
target' CString
targetProperty' CUInt
flags'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
forall a. Ptr a -> IO ()
freeMem CString
sourceProperty'
forall a. Ptr a -> IO ()
freeMem CString
targetProperty'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BindingGroupBindMethodInfo
instance (signature ~ (T.Text -> b -> T.Text -> [GObject.Flags.BindingFlags] -> m ()), MonadIO m, IsBindingGroup a, GObject.Object.IsObject b) => O.OverloadedMethod BindingGroupBindMethodInfo a signature where
overloadedMethod = bindingGroupBind
instance O.OverloadedMethodInfo BindingGroupBindMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GObject.Objects.BindingGroup.bindingGroupBind",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.28/docs/GI-GObject-Objects-BindingGroup.html#v:bindingGroupBind"
})
#endif
foreign import ccall "g_binding_group_bind_with_closures" g_binding_group_bind_with_closures ::
Ptr BindingGroup ->
CString ->
Ptr GObject.Object.Object ->
CString ->
CUInt ->
Ptr (GClosure ()) ->
Ptr (GClosure ()) ->
IO ()
bindingGroupBindFull ::
(B.CallStack.HasCallStack, MonadIO m, IsBindingGroup a, GObject.Object.IsObject b) =>
a
-> T.Text
-> b
-> T.Text
-> [GObject.Flags.BindingFlags]
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m ()
bindingGroupBindFull :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsBindingGroup a, IsObject b) =>
a
-> Text
-> b
-> Text
-> [BindingFlags]
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m ()
bindingGroupBindFull a
self Text
sourceProperty b
target Text
targetProperty [BindingFlags]
flags Maybe (GClosure c)
transformTo Maybe (GClosure d)
transformFrom = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BindingGroup
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
sourceProperty' <- Text -> IO CString
textToCString Text
sourceProperty
Ptr Object
target' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
CString
targetProperty' <- Text -> IO CString
textToCString Text
targetProperty
let flags' :: CUInt
flags' = forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [BindingFlags]
flags
Ptr (GClosure ())
maybeTransformTo <- case Maybe (GClosure c)
transformTo of
Maybe (GClosure c)
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GClosure c
jTransformTo -> do
Ptr (GClosure ())
jTransformTo' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure c
jTransformTo
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
jTransformTo'
Ptr (GClosure ())
maybeTransformFrom <- case Maybe (GClosure d)
transformFrom of
Maybe (GClosure d)
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just GClosure d
jTransformFrom -> do
Ptr (GClosure ())
jTransformFrom' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure d
jTransformFrom
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
jTransformFrom'
Ptr BindingGroup
-> CString
-> Ptr Object
-> CString
-> CUInt
-> Ptr (GClosure ())
-> Ptr (GClosure ())
-> IO ()
g_binding_group_bind_with_closures Ptr BindingGroup
self' CString
sourceProperty' Ptr Object
target' CString
targetProperty' CUInt
flags' Ptr (GClosure ())
maybeTransformTo Ptr (GClosure ())
maybeTransformFrom
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe (GClosure c)
transformTo forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe (GClosure d)
transformFrom forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall a. Ptr a -> IO ()
freeMem CString
sourceProperty'
forall a. Ptr a -> IO ()
freeMem CString
targetProperty'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BindingGroupBindFullMethodInfo
instance (signature ~ (T.Text -> b -> T.Text -> [GObject.Flags.BindingFlags] -> Maybe (GClosure c) -> Maybe (GClosure d) -> m ()), MonadIO m, IsBindingGroup a, GObject.Object.IsObject b) => O.OverloadedMethod BindingGroupBindFullMethodInfo a signature where
overloadedMethod = bindingGroupBindFull
instance O.OverloadedMethodInfo BindingGroupBindFullMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GObject.Objects.BindingGroup.bindingGroupBindFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.28/docs/GI-GObject-Objects-BindingGroup.html#v:bindingGroupBindFull"
})
#endif
foreign import ccall "g_binding_group_dup_source" g_binding_group_dup_source ::
Ptr BindingGroup ->
IO (Ptr GObject.Object.Object)
bindingGroupDupSource ::
(B.CallStack.HasCallStack, MonadIO m, IsBindingGroup a) =>
a
-> m (Maybe GObject.Object.Object)
bindingGroupDupSource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBindingGroup a) =>
a -> m (Maybe Object)
bindingGroupDupSource a
self = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BindingGroup
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Object
result <- Ptr BindingGroup -> IO (Ptr Object)
g_binding_group_dup_source Ptr BindingGroup
self'
Maybe Object
maybeResult <- forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result forall a b. (a -> b) -> a -> b
$ \Ptr Object
result' -> do
Object
result'' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
result'
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
#if defined(ENABLE_OVERLOADING)
data BindingGroupDupSourceMethodInfo
instance (signature ~ (m (Maybe GObject.Object.Object)), MonadIO m, IsBindingGroup a) => O.OverloadedMethod BindingGroupDupSourceMethodInfo a signature where
overloadedMethod = bindingGroupDupSource
instance O.OverloadedMethodInfo BindingGroupDupSourceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GObject.Objects.BindingGroup.bindingGroupDupSource",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.28/docs/GI-GObject-Objects-BindingGroup.html#v:bindingGroupDupSource"
})
#endif
foreign import ccall "g_binding_group_set_source" g_binding_group_set_source ::
Ptr BindingGroup ->
Ptr GObject.Object.Object ->
IO ()
bindingGroupSetSource ::
(B.CallStack.HasCallStack, MonadIO m, IsBindingGroup a, GObject.Object.IsObject b) =>
a
-> Maybe (b)
-> m ()
bindingGroupSetSource :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsBindingGroup a, IsObject b) =>
a -> Maybe b -> m ()
bindingGroupSetSource a
self Maybe b
source = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr BindingGroup
self' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Object
maybeSource <- case Maybe b
source of
Maybe b
Nothing -> forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Ptr a
nullPtr
Just b
jSource -> do
Ptr Object
jSource' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSource
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jSource'
Ptr BindingGroup -> Ptr Object -> IO ()
g_binding_group_set_source Ptr BindingGroup
self' Ptr Object
maybeSource
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
source forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BindingGroupSetSourceMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsBindingGroup a, GObject.Object.IsObject b) => O.OverloadedMethod BindingGroupSetSourceMethodInfo a signature where
overloadedMethod = bindingGroupSetSource
instance O.OverloadedMethodInfo BindingGroupSetSourceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GObject.Objects.BindingGroup.bindingGroupSetSource",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gobject-2.0.28/docs/GI-GObject-Objects-BindingGroup.html#v:bindingGroupSetSource"
})
#endif