{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Ggit.Structs.BlameOptions
(
BlameOptions(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveBlameOptionsMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
BlameOptionsCopyMethodInfo ,
#endif
blameOptionsCopy ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsFreeMethodInfo ,
#endif
blameOptionsFree ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsGetMaximumLineMethodInfo ,
#endif
blameOptionsGetMaximumLine ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsGetMinimumLineMethodInfo ,
#endif
blameOptionsGetMinimumLine ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsGetMinimumMatchCharactersMethodInfo,
#endif
blameOptionsGetMinimumMatchCharacters ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsGetNewestCommitMethodInfo ,
#endif
blameOptionsGetNewestCommit ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsGetOldestCommitMethodInfo ,
#endif
blameOptionsGetOldestCommit ,
blameOptionsNew ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsSetMaximumLineMethodInfo ,
#endif
blameOptionsSetMaximumLine ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsSetMinimumLineMethodInfo ,
#endif
blameOptionsSetMinimumLine ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsSetMinimumMatchCharactersMethodInfo,
#endif
blameOptionsSetMinimumMatchCharacters ,
#if defined(ENABLE_OVERLOADING)
BlameOptionsSetNewestCommitMethodInfo ,
#endif
blameOptionsSetNewestCommit ,
#if defined(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.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.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 GHC.Records as R
import {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId
newtype BlameOptions = BlameOptions (SP.ManagedPtr BlameOptions)
deriving (BlameOptions -> BlameOptions -> Bool
(BlameOptions -> BlameOptions -> Bool)
-> (BlameOptions -> BlameOptions -> Bool) -> Eq BlameOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlameOptions -> BlameOptions -> Bool
$c/= :: BlameOptions -> BlameOptions -> Bool
== :: BlameOptions -> BlameOptions -> Bool
$c== :: BlameOptions -> BlameOptions -> Bool
Eq)
instance SP.ManagedPtrNewtype BlameOptions where
toManagedPtr :: BlameOptions -> ManagedPtr BlameOptions
toManagedPtr (BlameOptions ManagedPtr BlameOptions
p) = ManagedPtr BlameOptions
p
foreign import ccall "ggit_blame_options_get_type" c_ggit_blame_options_get_type ::
IO GType
type instance O.ParentTypes BlameOptions = '[]
instance O.HasParentTypes BlameOptions
instance B.Types.TypedObject BlameOptions where
glibType :: IO GType
glibType = IO GType
c_ggit_blame_options_get_type
instance B.Types.GBoxed BlameOptions
instance B.GValue.IsGValue (Maybe BlameOptions) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ggit_blame_options_get_type
gvalueSet_ :: Ptr GValue -> Maybe BlameOptions -> IO ()
gvalueSet_ Ptr GValue
gv Maybe BlameOptions
P.Nothing = Ptr GValue -> Ptr BlameOptions -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr BlameOptions
forall a. Ptr a
FP.nullPtr :: FP.Ptr BlameOptions)
gvalueSet_ Ptr GValue
gv (P.Just BlameOptions
obj) = BlameOptions -> (Ptr BlameOptions -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr BlameOptions
obj (Ptr GValue -> Ptr BlameOptions -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe BlameOptions)
gvalueGet_ Ptr GValue
gv = do
Ptr BlameOptions
ptr <- Ptr GValue -> IO (Ptr BlameOptions)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr BlameOptions)
if Ptr BlameOptions
ptr Ptr BlameOptions -> Ptr BlameOptions -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr BlameOptions
forall a. Ptr a
FP.nullPtr
then BlameOptions -> Maybe BlameOptions
forall a. a -> Maybe a
P.Just (BlameOptions -> Maybe BlameOptions)
-> IO BlameOptions -> IO (Maybe BlameOptions)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr BlameOptions -> BlameOptions)
-> Ptr BlameOptions -> IO BlameOptions
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr BlameOptions -> BlameOptions
BlameOptions Ptr BlameOptions
ptr
else Maybe BlameOptions -> IO (Maybe BlameOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BlameOptions
forall a. Maybe a
P.Nothing
#if defined(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 :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m BlameOptions
blameOptionsNew = IO BlameOptions -> m BlameOptions
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO BlameOptions -> m BlameOptions)
-> IO BlameOptions -> m BlameOptions
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
result <- IO (Ptr BlameOptions)
ggit_blame_options_new
Text -> Ptr BlameOptions -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"blameOptionsNew" Ptr BlameOptions
result
BlameOptions
result' <- ((ManagedPtr BlameOptions -> BlameOptions)
-> Ptr BlameOptions -> IO BlameOptions
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlameOptions -> BlameOptions
BlameOptions) Ptr BlameOptions
result
BlameOptions -> IO BlameOptions
forall (m :: * -> *) a. Monad m => a -> m a
return BlameOptions
result'
#if defined(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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m (Maybe BlameOptions)
blameOptionsCopy BlameOptions
blameOptions = IO (Maybe BlameOptions) -> m (Maybe BlameOptions)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe BlameOptions) -> m (Maybe BlameOptions))
-> IO (Maybe BlameOptions) -> m (Maybe BlameOptions)
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr BlameOptions
result <- Ptr BlameOptions -> IO (Ptr BlameOptions)
ggit_blame_options_copy Ptr BlameOptions
blameOptions'
Maybe BlameOptions
maybeResult <- Ptr BlameOptions
-> (Ptr BlameOptions -> IO BlameOptions) -> IO (Maybe BlameOptions)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr BlameOptions
result ((Ptr BlameOptions -> IO BlameOptions) -> IO (Maybe BlameOptions))
-> (Ptr BlameOptions -> IO BlameOptions) -> IO (Maybe BlameOptions)
forall a b. (a -> b) -> a -> b
$ \Ptr BlameOptions
result' -> do
BlameOptions
result'' <- ((ManagedPtr BlameOptions -> BlameOptions)
-> Ptr BlameOptions -> IO BlameOptions
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr BlameOptions -> BlameOptions
BlameOptions) Ptr BlameOptions
result'
BlameOptions -> IO BlameOptions
forall (m :: * -> *) a. Monad m => a -> m a
return BlameOptions
result''
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Maybe BlameOptions -> IO (Maybe BlameOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe BlameOptions
maybeResult
#if defined(ENABLE_OVERLOADING)
data BlameOptionsCopyMethodInfo
instance (signature ~ (m (Maybe BlameOptions)), MonadIO m) => O.OverloadedMethod BlameOptionsCopyMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsCopy
instance O.OverloadedMethodInfo BlameOptionsCopyMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsCopy",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m ()
blameOptionsFree BlameOptions
blameOptions = 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 BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr BlameOptions -> IO ()
ggit_blame_options_free Ptr BlameOptions
blameOptions'
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BlameOptionsFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod BlameOptionsFreeMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsFree
instance O.OverloadedMethodInfo BlameOptionsFreeMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsFree",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m Word32
blameOptionsGetMaximumLine BlameOptions
blameOptions = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Word32
result <- Ptr BlameOptions -> IO Word32
ggit_blame_options_get_maximum_line Ptr BlameOptions
blameOptions'
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data BlameOptionsGetMaximumLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod BlameOptionsGetMaximumLineMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsGetMaximumLine
instance O.OverloadedMethodInfo BlameOptionsGetMaximumLineMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsGetMaximumLine",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m Word32
blameOptionsGetMinimumLine BlameOptions
blameOptions = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Word32
result <- Ptr BlameOptions -> IO Word32
ggit_blame_options_get_minimum_line Ptr BlameOptions
blameOptions'
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data BlameOptionsGetMinimumLineMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod BlameOptionsGetMinimumLineMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsGetMinimumLine
instance O.OverloadedMethodInfo BlameOptionsGetMinimumLineMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsGetMinimumLine",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m Word16
blameOptionsGetMinimumMatchCharacters BlameOptions
blameOptions = IO Word16 -> m Word16
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word16 -> m Word16) -> IO Word16 -> m Word16
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Word16
result <- Ptr BlameOptions -> IO Word16
ggit_blame_options_get_minimum_match_characters Ptr BlameOptions
blameOptions'
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Word16 -> IO Word16
forall (m :: * -> *) a. Monad m => a -> m a
return Word16
result
#if defined(ENABLE_OVERLOADING)
data BlameOptionsGetMinimumMatchCharactersMethodInfo
instance (signature ~ (m Word16), MonadIO m) => O.OverloadedMethod BlameOptionsGetMinimumMatchCharactersMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsGetMinimumMatchCharacters
instance O.OverloadedMethodInfo BlameOptionsGetMinimumMatchCharactersMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsGetMinimumMatchCharacters",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m (Maybe OId)
blameOptionsGetNewestCommit BlameOptions
blameOptions = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr OId
result <- Ptr BlameOptions -> IO (Ptr OId)
ggit_blame_options_get_newest_commit Ptr BlameOptions
blameOptions'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
#if defined(ENABLE_OVERLOADING)
data BlameOptionsGetNewestCommitMethodInfo
instance (signature ~ (m (Maybe Ggit.OId.OId)), MonadIO m) => O.OverloadedMethod BlameOptionsGetNewestCommitMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsGetNewestCommit
instance O.OverloadedMethodInfo BlameOptionsGetNewestCommitMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsGetNewestCommit",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> m (Maybe OId)
blameOptionsGetOldestCommit BlameOptions
blameOptions = IO (Maybe OId) -> m (Maybe OId)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe OId) -> m (Maybe OId))
-> IO (Maybe OId) -> m (Maybe OId)
forall a b. (a -> b) -> a -> b
$ do
Ptr BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr OId
result <- Ptr BlameOptions -> IO (Ptr OId)
ggit_blame_options_get_oldest_commit Ptr BlameOptions
blameOptions'
Maybe OId
maybeResult <- Ptr OId -> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr OId
result ((Ptr OId -> IO OId) -> IO (Maybe OId))
-> (Ptr OId -> IO OId) -> IO (Maybe OId)
forall a b. (a -> b) -> a -> b
$ \Ptr OId
result' -> do
OId
result'' <- ((ManagedPtr OId -> OId) -> Ptr OId -> IO OId
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr OId -> OId
Ggit.OId.OId) Ptr OId
result'
OId -> IO OId
forall (m :: * -> *) a. Monad m => a -> m a
return OId
result''
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
#if defined(ENABLE_OVERLOADING)
data BlameOptionsGetOldestCommitMethodInfo
instance (signature ~ (m (Maybe Ggit.OId.OId)), MonadIO m) => O.OverloadedMethod BlameOptionsGetOldestCommitMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsGetOldestCommit
instance O.OverloadedMethodInfo BlameOptionsGetOldestCommitMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsGetOldestCommit",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> Word32 -> m ()
blameOptionsSetMaximumLine BlameOptions
blameOptions Word32
line = 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 BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr BlameOptions -> Word32 -> IO ()
ggit_blame_options_set_maximum_line Ptr BlameOptions
blameOptions' Word32
line
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BlameOptionsSetMaximumLineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod BlameOptionsSetMaximumLineMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsSetMaximumLine
instance O.OverloadedMethodInfo BlameOptionsSetMaximumLineMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsSetMaximumLine",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> Word32 -> m ()
blameOptionsSetMinimumLine BlameOptions
blameOptions Word32
line = 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 BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr BlameOptions -> Word32 -> IO ()
ggit_blame_options_set_minimum_line Ptr BlameOptions
blameOptions' Word32
line
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BlameOptionsSetMinimumLineMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod BlameOptionsSetMinimumLineMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsSetMinimumLine
instance O.OverloadedMethodInfo BlameOptionsSetMinimumLineMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsSetMinimumLine",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> Word16 -> m ()
blameOptionsSetMinimumMatchCharacters BlameOptions
blameOptions Word16
characters = 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 BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr BlameOptions -> Word16 -> IO ()
ggit_blame_options_set_minimum_match_characters Ptr BlameOptions
blameOptions' Word16
characters
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BlameOptionsSetMinimumMatchCharactersMethodInfo
instance (signature ~ (Word16 -> m ()), MonadIO m) => O.OverloadedMethod BlameOptionsSetMinimumMatchCharactersMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsSetMinimumMatchCharacters
instance O.OverloadedMethodInfo BlameOptionsSetMinimumMatchCharactersMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsSetMinimumMatchCharacters",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> Maybe OId -> m ()
blameOptionsSetNewestCommit BlameOptions
blameOptions Maybe OId
oid = 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 BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr OId
maybeOid <- case Maybe OId
oid of
Maybe OId
Nothing -> Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
forall a. Ptr a
nullPtr
Just OId
jOid -> do
Ptr OId
jOid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
jOid
Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
jOid'
Ptr BlameOptions -> Ptr OId -> IO ()
ggit_blame_options_set_newest_commit Ptr BlameOptions
blameOptions' Ptr OId
maybeOid
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Maybe OId -> (OId -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe OId
oid OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BlameOptionsSetNewestCommitMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.OverloadedMethod BlameOptionsSetNewestCommitMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsSetNewestCommit
instance O.OverloadedMethodInfo BlameOptionsSetNewestCommitMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsSetNewestCommit",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v: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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
BlameOptions -> Maybe OId -> m ()
blameOptionsSetOldestCommit BlameOptions
blameOptions Maybe OId
oid = 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 BlameOptions
blameOptions' <- BlameOptions -> IO (Ptr BlameOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr BlameOptions
blameOptions
Ptr OId
maybeOid <- case Maybe OId
oid of
Maybe OId
Nothing -> Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
forall a. Ptr a
nullPtr
Just OId
jOid -> do
Ptr OId
jOid' <- OId -> IO (Ptr OId)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr OId
jOid
Ptr OId -> IO (Ptr OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr OId
jOid'
Ptr BlameOptions -> Ptr OId -> IO ()
ggit_blame_options_set_oldest_commit Ptr BlameOptions
blameOptions' Ptr OId
maybeOid
BlameOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr BlameOptions
blameOptions
Maybe OId -> (OId -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe OId
oid OId -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data BlameOptionsSetOldestCommitMethodInfo
instance (signature ~ (Maybe (Ggit.OId.OId) -> m ()), MonadIO m) => O.OverloadedMethod BlameOptionsSetOldestCommitMethodInfo BlameOptions signature where
overloadedMethod = blameOptionsSetOldestCommit
instance O.OverloadedMethodInfo BlameOptionsSetOldestCommitMethodInfo BlameOptions where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Ggit.Structs.BlameOptions.blameOptionsSetOldestCommit",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-ggit-1.0.10/docs/GI-Ggit-Structs-BlameOptions.html#v:blameOptionsSetOldestCommit"
}
#endif
#if defined(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.OverloadedMethod info BlameOptions p) => OL.IsLabel t (BlameOptions -> 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 ~ ResolveBlameOptionsMethod t BlameOptions, O.OverloadedMethod info BlameOptions p, R.HasField t BlameOptions p) => R.HasField t BlameOptions p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveBlameOptionsMethod t BlameOptions, O.OverloadedMethodInfo info BlameOptions) => OL.IsLabel t (O.MethodProxy info BlameOptions) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif