module GI.Ggit.Objects.CommitParents
(
CommitParents(..) ,
IsCommitParents ,
toCommitParents ,
noCommitParents ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CommitParentsGetMethodInfo ,
#endif
commitParentsGet ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CommitParentsGetIdMethodInfo ,
#endif
commitParentsGetId ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CommitParentsGetSizeMethodInfo ,
#endif
commitParentsGetSize ,
commitParentsNew ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CommitParentsCommitPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
commitParentsCommit ,
#endif
constructCommitParentsCommit ,
getCommitParentsCommit ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
CommitParentsSizePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
commitParentsSize ,
#endif
getCommitParentsSize ,
) 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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Ggit.Objects.Commit as Ggit.Commit
import qualified GI.Ggit.Structs.OId as Ggit.OId
newtype CommitParents = CommitParents (ManagedPtr CommitParents)
foreign import ccall "ggit_commit_parents_get_type"
c_ggit_commit_parents_get_type :: IO GType
instance GObject CommitParents where
gobjectType _ = c_ggit_commit_parents_get_type
class GObject o => IsCommitParents o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError CommitParents a) =>
IsCommitParents a
#endif
instance IsCommitParents CommitParents
instance GObject.Object.IsObject CommitParents
toCommitParents :: (MonadIO m, IsCommitParents o) => o -> m CommitParents
toCommitParents = liftIO . unsafeCastTo CommitParents
noCommitParents :: Maybe CommitParents
noCommitParents = Nothing
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveCommitParentsMethod (t :: Symbol) (o :: *) :: * where
ResolveCommitParentsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveCommitParentsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveCommitParentsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveCommitParentsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveCommitParentsMethod "get" o = CommitParentsGetMethodInfo
ResolveCommitParentsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveCommitParentsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveCommitParentsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveCommitParentsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveCommitParentsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveCommitParentsMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveCommitParentsMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveCommitParentsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveCommitParentsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveCommitParentsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveCommitParentsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveCommitParentsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveCommitParentsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveCommitParentsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveCommitParentsMethod "getId" o = CommitParentsGetIdMethodInfo
ResolveCommitParentsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveCommitParentsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveCommitParentsMethod "getSize" o = CommitParentsGetSizeMethodInfo
ResolveCommitParentsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveCommitParentsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveCommitParentsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCommitParentsMethod t CommitParents, O.MethodInfo info CommitParents p) => O.IsLabelProxy t (CommitParents -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveCommitParentsMethod t CommitParents, O.MethodInfo info CommitParents p) => O.IsLabel t (CommitParents -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif
getCommitParentsCommit :: (MonadIO m, IsCommitParents o) => o -> m (Maybe Ggit.Commit.Commit)
getCommitParentsCommit obj = liftIO $ getObjectPropertyObject obj "commit" Ggit.Commit.Commit
constructCommitParentsCommit :: (IsCommitParents o, Ggit.Commit.IsCommit a) => a -> IO (GValueConstruct o)
constructCommitParentsCommit val = constructObjectPropertyObject "commit" (Just val)
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CommitParentsCommitPropertyInfo
instance AttrInfo CommitParentsCommitPropertyInfo where
type AttrAllowedOps CommitParentsCommitPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint CommitParentsCommitPropertyInfo = Ggit.Commit.IsCommit
type AttrBaseTypeConstraint CommitParentsCommitPropertyInfo = IsCommitParents
type AttrGetType CommitParentsCommitPropertyInfo = (Maybe Ggit.Commit.Commit)
type AttrLabel CommitParentsCommitPropertyInfo = "commit"
type AttrOrigin CommitParentsCommitPropertyInfo = CommitParents
attrGet _ = getCommitParentsCommit
attrSet _ = undefined
attrConstruct _ = constructCommitParentsCommit
attrClear _ = undefined
#endif
getCommitParentsSize :: (MonadIO m, IsCommitParents o) => o -> m Word32
getCommitParentsSize obj = liftIO $ getObjectPropertyUInt32 obj "size"
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CommitParentsSizePropertyInfo
instance AttrInfo CommitParentsSizePropertyInfo where
type AttrAllowedOps CommitParentsSizePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint CommitParentsSizePropertyInfo = (~) ()
type AttrBaseTypeConstraint CommitParentsSizePropertyInfo = IsCommitParents
type AttrGetType CommitParentsSizePropertyInfo = Word32
type AttrLabel CommitParentsSizePropertyInfo = "size"
type AttrOrigin CommitParentsSizePropertyInfo = CommitParents
attrGet _ = getCommitParentsSize
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList CommitParents
type instance O.AttributeList CommitParents = CommitParentsAttributeList
type CommitParentsAttributeList = ('[ '("commit", CommitParentsCommitPropertyInfo), '("size", CommitParentsSizePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
commitParentsCommit :: AttrLabelProxy "commit"
commitParentsCommit = AttrLabelProxy
commitParentsSize :: AttrLabelProxy "size"
commitParentsSize = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type instance O.SignalList CommitParents = CommitParentsSignalList
type CommitParentsSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_commit_parents_new" ggit_commit_parents_new ::
Ptr Ggit.Commit.Commit ->
IO (Ptr CommitParents)
commitParentsNew ::
(B.CallStack.HasCallStack, MonadIO m, Ggit.Commit.IsCommit a) =>
a
-> m CommitParents
commitParentsNew commit = liftIO $ do
commit' <- unsafeManagedPtrCastPtr commit
result <- ggit_commit_parents_new commit'
checkUnexpectedReturnNULL "commitParentsNew" result
result' <- (wrapObject CommitParents) result
touchManagedPtr commit
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#endif
foreign import ccall "ggit_commit_parents_get" ggit_commit_parents_get ::
Ptr CommitParents ->
Word32 ->
IO (Ptr Ggit.Commit.Commit)
commitParentsGet ::
(B.CallStack.HasCallStack, MonadIO m, IsCommitParents a) =>
a
-> Word32
-> m Ggit.Commit.Commit
commitParentsGet parents idx = liftIO $ do
parents' <- unsafeManagedPtrCastPtr parents
result <- ggit_commit_parents_get parents' idx
checkUnexpectedReturnNULL "commitParentsGet" result
result' <- (wrapObject Ggit.Commit.Commit) result
touchManagedPtr parents
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CommitParentsGetMethodInfo
instance (signature ~ (Word32 -> m Ggit.Commit.Commit), MonadIO m, IsCommitParents a) => O.MethodInfo CommitParentsGetMethodInfo a signature where
overloadedMethod _ = commitParentsGet
#endif
foreign import ccall "ggit_commit_parents_get_id" ggit_commit_parents_get_id ::
Ptr CommitParents ->
Word32 ->
IO (Ptr Ggit.OId.OId)
commitParentsGetId ::
(B.CallStack.HasCallStack, MonadIO m, IsCommitParents a) =>
a
-> Word32
-> m Ggit.OId.OId
commitParentsGetId parents idx = liftIO $ do
parents' <- unsafeManagedPtrCastPtr parents
result <- ggit_commit_parents_get_id parents' idx
checkUnexpectedReturnNULL "commitParentsGetId" result
result' <- (wrapBoxed Ggit.OId.OId) result
touchManagedPtr parents
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CommitParentsGetIdMethodInfo
instance (signature ~ (Word32 -> m Ggit.OId.OId), MonadIO m, IsCommitParents a) => O.MethodInfo CommitParentsGetIdMethodInfo a signature where
overloadedMethod _ = commitParentsGetId
#endif
foreign import ccall "ggit_commit_parents_get_size" ggit_commit_parents_get_size ::
Ptr CommitParents ->
IO Word32
commitParentsGetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsCommitParents a) =>
a
-> m Word32
commitParentsGetSize parents = liftIO $ do
parents' <- unsafeManagedPtrCastPtr parents
result <- ggit_commit_parents_get_size parents'
touchManagedPtr parents
return result
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data CommitParentsGetSizeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsCommitParents a) => O.MethodInfo CommitParentsGetSizeMethodInfo a signature where
overloadedMethod _ = commitParentsGetSize
#endif