#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Ggit.Structs.BlameOptions
(
BlameOptions(..) ,
noBlameOptions ,
#if ENABLE_OVERLOADING
BlameOptionsCopyMethodInfo ,
#endif
blameOptionsCopy ,
#if ENABLE_OVERLOADING
BlameOptionsFreeMethodInfo ,
#endif
blameOptionsFree ,
#if ENABLE_OVERLOADING
BlameOptionsGetMaximumLineMethodInfo ,
#endif
blameOptionsGetMaximumLine ,
#if ENABLE_OVERLOADING
BlameOptionsGetMinimumLineMethodInfo ,
#endif
blameOptionsGetMinimumLine ,
#if ENABLE_OVERLOADING
BlameOptionsGetMinimumMatchCharactersMethodInfo,
#endif
blameOptionsGetMinimumMatchCharacters ,
#if ENABLE_OVERLOADING
BlameOptionsGetNewestCommitMethodInfo ,
#endif
blameOptionsGetNewestCommit ,
#if ENABLE_OVERLOADING
BlameOptionsGetOldestCommitMethodInfo ,
#endif
blameOptionsGetOldestCommit ,
blameOptionsNew ,
#if ENABLE_OVERLOADING
BlameOptionsSetMaximumLineMethodInfo ,
#endif
blameOptionsSetMaximumLine ,
#if ENABLE_OVERLOADING
BlameOptionsSetMinimumLineMethodInfo ,
#endif
blameOptionsSetMinimumLine ,
#if ENABLE_OVERLOADING
BlameOptionsSetMinimumMatchCharactersMethodInfo,
#endif
blameOptionsSetMinimumMatchCharacters ,
#if ENABLE_OVERLOADING
BlameOptionsSetNewestCommitMethodInfo ,
#endif
blameOptionsSetNewestCommit ,
#if ENABLE_OVERLOADING
BlameOptionsSetOldestCommitMethodInfo ,
#endif
blameOptionsSetOldestCommit ,
) 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.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 {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId
newtype BlameOptions = BlameOptions (ManagedPtr BlameOptions)
foreign import ccall "ggit_blame_options_get_type" c_ggit_blame_options_get_type ::
IO GType
instance BoxedObject BlameOptions where
boxedType _ = c_ggit_blame_options_get_type
noBlameOptions :: Maybe BlameOptions
noBlameOptions = Nothing
#if ENABLE_OVERLOADING
instance O.HasAttributeList BlameOptions
type instance O.AttributeList BlameOptions = BlameOptionsAttributeList
type BlameOptionsAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_blame_options_new" ggit_blame_options_new ::
IO (Ptr BlameOptions)
blameOptionsNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m BlameOptions
blameOptionsNew = liftIO $ do
result <- ggit_blame_options_new
checkUnexpectedReturnNULL "blameOptionsNew" result
result' <- (wrapBoxed BlameOptions) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "ggit_blame_options_copy" ggit_blame_options_copy ::
Ptr BlameOptions ->
IO (Ptr BlameOptions)
blameOptionsCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m (Maybe BlameOptions)
blameOptionsCopy blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
result <- ggit_blame_options_copy blameOptions'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed BlameOptions) result'
return result''
touchManagedPtr blameOptions
return maybeResult
#if ENABLE_OVERLOADING
data BlameOptionsCopyMethodInfo
instance (signature ~ (m (Maybe BlameOptions)), MonadIO m) => O.MethodInfo BlameOptionsCopyMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsCopy
#endif
foreign import ccall "ggit_blame_options_free" ggit_blame_options_free ::
Ptr BlameOptions ->
IO ()
blameOptionsFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m ()
blameOptionsFree blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
ggit_blame_options_free blameOptions'
touchManagedPtr blameOptions
return ()
#if ENABLE_OVERLOADING
data BlameOptionsFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo BlameOptionsFreeMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsFree
#endif
foreign import ccall "ggit_blame_options_get_maximum_line" ggit_blame_options_get_maximum_line ::
Ptr BlameOptions ->
IO Word32
blameOptionsGetMaximumLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m Word32
blameOptionsGetMaximumLine blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
result <- ggit_blame_options_get_maximum_line blameOptions'
touchManagedPtr blameOptions
return result
#if ENABLE_OVERLOADING
data BlameOptionsGetMaximumLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo BlameOptionsGetMaximumLineMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsGetMaximumLine
#endif
foreign import ccall "ggit_blame_options_get_minimum_line" ggit_blame_options_get_minimum_line ::
Ptr BlameOptions ->
IO Word32
blameOptionsGetMinimumLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m Word32
blameOptionsGetMinimumLine blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
result <- ggit_blame_options_get_minimum_line blameOptions'
touchManagedPtr blameOptions
return result
#if ENABLE_OVERLOADING
data BlameOptionsGetMinimumLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo BlameOptionsGetMinimumLineMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsGetMinimumLine
#endif
foreign import ccall "ggit_blame_options_get_minimum_match_characters" ggit_blame_options_get_minimum_match_characters ::
Ptr BlameOptions ->
IO Word16
blameOptionsGetMinimumMatchCharacters ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m Word16
blameOptionsGetMinimumMatchCharacters blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
result <- ggit_blame_options_get_minimum_match_characters blameOptions'
touchManagedPtr blameOptions
return result
#if ENABLE_OVERLOADING
data BlameOptionsGetMinimumMatchCharactersMethodInfo
instance (signature ~ (m Word16), MonadIO m) => O.MethodInfo BlameOptionsGetMinimumMatchCharactersMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsGetMinimumMatchCharacters
#endif
foreign import ccall "ggit_blame_options_get_newest_commit" ggit_blame_options_get_newest_commit ::
Ptr BlameOptions ->
IO (Ptr Ggit.OId.OId)
blameOptionsGetNewestCommit ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m (Maybe Ggit.OId.OId)
blameOptionsGetNewestCommit blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
result <- ggit_blame_options_get_newest_commit blameOptions'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed Ggit.OId.OId) result'
return result''
touchManagedPtr blameOptions
return maybeResult
#if ENABLE_OVERLOADING
data BlameOptionsGetNewestCommitMethodInfo
instance (signature ~ (m (Maybe Ggit.OId.OId)), MonadIO m) => O.MethodInfo BlameOptionsGetNewestCommitMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsGetNewestCommit
#endif
foreign import ccall "ggit_blame_options_get_oldest_commit" ggit_blame_options_get_oldest_commit ::
Ptr BlameOptions ->
IO (Ptr Ggit.OId.OId)
blameOptionsGetOldestCommit ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> m (Maybe Ggit.OId.OId)
blameOptionsGetOldestCommit blameOptions = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
result <- ggit_blame_options_get_oldest_commit blameOptions'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed Ggit.OId.OId) result'
return result''
touchManagedPtr blameOptions
return maybeResult
#if ENABLE_OVERLOADING
data BlameOptionsGetOldestCommitMethodInfo
instance (signature ~ (m (Maybe Ggit.OId.OId)), MonadIO m) => O.MethodInfo BlameOptionsGetOldestCommitMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsGetOldestCommit
#endif
foreign import ccall "ggit_blame_options_set_maximum_line" ggit_blame_options_set_maximum_line ::
Ptr BlameOptions ->
Word32 ->
IO ()
blameOptionsSetMaximumLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> Word32
-> m ()
blameOptionsSetMaximumLine blameOptions line = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
ggit_blame_options_set_maximum_line blameOptions' line
touchManagedPtr blameOptions
return ()
#if ENABLE_OVERLOADING
data BlameOptionsSetMaximumLineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetMaximumLineMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsSetMaximumLine
#endif
foreign import ccall "ggit_blame_options_set_minimum_line" ggit_blame_options_set_minimum_line ::
Ptr BlameOptions ->
Word32 ->
IO ()
blameOptionsSetMinimumLine ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> Word32
-> m ()
blameOptionsSetMinimumLine blameOptions line = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
ggit_blame_options_set_minimum_line blameOptions' line
touchManagedPtr blameOptions
return ()
#if ENABLE_OVERLOADING
data BlameOptionsSetMinimumLineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetMinimumLineMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsSetMinimumLine
#endif
foreign import ccall "ggit_blame_options_set_minimum_match_characters" ggit_blame_options_set_minimum_match_characters ::
Ptr BlameOptions ->
Word16 ->
IO ()
blameOptionsSetMinimumMatchCharacters ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> Word16
-> m ()
blameOptionsSetMinimumMatchCharacters blameOptions characters = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
ggit_blame_options_set_minimum_match_characters blameOptions' characters
touchManagedPtr blameOptions
return ()
#if ENABLE_OVERLOADING
data BlameOptionsSetMinimumMatchCharactersMethodInfo
instance (signature ~ (Word16 -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetMinimumMatchCharactersMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsSetMinimumMatchCharacters
#endif
foreign import ccall "ggit_blame_options_set_newest_commit" ggit_blame_options_set_newest_commit ::
Ptr BlameOptions ->
Ptr Ggit.OId.OId ->
IO ()
blameOptionsSetNewestCommit ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> Maybe (Ggit.OId.OId)
-> m ()
blameOptionsSetNewestCommit blameOptions oid = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
maybeOid <- case oid of
Nothing -> return nullPtr
Just jOid -> do
jOid' <- unsafeManagedPtrGetPtr jOid
return jOid'
ggit_blame_options_set_newest_commit blameOptions' maybeOid
touchManagedPtr blameOptions
whenJust oid touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data BlameOptionsSetNewestCommitMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetNewestCommitMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsSetNewestCommit
#endif
foreign import ccall "ggit_blame_options_set_oldest_commit" ggit_blame_options_set_oldest_commit ::
Ptr BlameOptions ->
Ptr Ggit.OId.OId ->
IO ()
blameOptionsSetOldestCommit ::
(B.CallStack.HasCallStack, MonadIO m) =>
BlameOptions
-> Maybe (Ggit.OId.OId)
-> m ()
blameOptionsSetOldestCommit blameOptions oid = liftIO $ do
blameOptions' <- unsafeManagedPtrGetPtr blameOptions
maybeOid <- case oid of
Nothing -> return nullPtr
Just jOid -> do
jOid' <- unsafeManagedPtrGetPtr jOid
return jOid'
ggit_blame_options_set_oldest_commit blameOptions' maybeOid
touchManagedPtr blameOptions
whenJust oid touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data BlameOptionsSetOldestCommitMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.MethodInfo BlameOptionsSetOldestCommitMethodInfo BlameOptions signature where
overloadedMethod _ = blameOptionsSetOldestCommit
#endif
#if ENABLE_OVERLOADING
type family ResolveBlameOptionsMethod (t :: Symbol) (o :: *) :: * where
ResolveBlameOptionsMethod "copy" o = BlameOptionsCopyMethodInfo
ResolveBlameOptionsMethod "free" o = BlameOptionsFreeMethodInfo
ResolveBlameOptionsMethod "getMaximumLine" o = BlameOptionsGetMaximumLineMethodInfo
ResolveBlameOptionsMethod "getMinimumLine" o = BlameOptionsGetMinimumLineMethodInfo
ResolveBlameOptionsMethod "getMinimumMatchCharacters" o = BlameOptionsGetMinimumMatchCharactersMethodInfo
ResolveBlameOptionsMethod "getNewestCommit" o = BlameOptionsGetNewestCommitMethodInfo
ResolveBlameOptionsMethod "getOldestCommit" o = BlameOptionsGetOldestCommitMethodInfo
ResolveBlameOptionsMethod "setMaximumLine" o = BlameOptionsSetMaximumLineMethodInfo
ResolveBlameOptionsMethod "setMinimumLine" o = BlameOptionsSetMinimumLineMethodInfo
ResolveBlameOptionsMethod "setMinimumMatchCharacters" o = BlameOptionsSetMinimumMatchCharactersMethodInfo
ResolveBlameOptionsMethod "setNewestCommit" o = BlameOptionsSetNewestCommitMethodInfo
ResolveBlameOptionsMethod "setOldestCommit" o = BlameOptionsSetOldestCommitMethodInfo
ResolveBlameOptionsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBlameOptionsMethod t BlameOptions, O.MethodInfo info BlameOptions p) => OL.IsLabel t (BlameOptions -> 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