#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Ggit.Objects.DiffOptions
(
DiffOptions(..) ,
IsDiffOptions ,
toDiffOptions ,
noDiffOptions ,
#if ENABLE_OVERLOADING
DiffOptionsGetFlagsMethodInfo ,
#endif
diffOptionsGetFlags ,
#if ENABLE_OVERLOADING
DiffOptionsGetNContextLinesMethodInfo ,
#endif
diffOptionsGetNContextLines ,
#if ENABLE_OVERLOADING
DiffOptionsGetNInterhunkLinesMethodInfo ,
#endif
diffOptionsGetNInterhunkLines ,
#if ENABLE_OVERLOADING
DiffOptionsGetNewPrefixMethodInfo ,
#endif
diffOptionsGetNewPrefix ,
#if ENABLE_OVERLOADING
DiffOptionsGetOldPrefixMethodInfo ,
#endif
diffOptionsGetOldPrefix ,
#if ENABLE_OVERLOADING
DiffOptionsGetPathspecMethodInfo ,
#endif
diffOptionsGetPathspec ,
diffOptionsNew ,
#if ENABLE_OVERLOADING
DiffOptionsSetFlagsMethodInfo ,
#endif
diffOptionsSetFlags ,
#if ENABLE_OVERLOADING
DiffOptionsSetNContextLinesMethodInfo ,
#endif
diffOptionsSetNContextLines ,
#if ENABLE_OVERLOADING
DiffOptionsSetNInterhunkLinesMethodInfo ,
#endif
diffOptionsSetNInterhunkLines ,
#if ENABLE_OVERLOADING
DiffOptionsSetNewPrefixMethodInfo ,
#endif
diffOptionsSetNewPrefix ,
#if ENABLE_OVERLOADING
DiffOptionsSetOldPrefixMethodInfo ,
#endif
diffOptionsSetOldPrefix ,
#if ENABLE_OVERLOADING
DiffOptionsSetPathspecMethodInfo ,
#endif
diffOptionsSetPathspec ,
#if ENABLE_OVERLOADING
DiffOptionsFlagsPropertyInfo ,
#endif
constructDiffOptionsFlags ,
#if ENABLE_OVERLOADING
diffOptionsFlags ,
#endif
getDiffOptionsFlags ,
setDiffOptionsFlags ,
#if ENABLE_OVERLOADING
DiffOptionsNContextLinesPropertyInfo ,
#endif
constructDiffOptionsNContextLines ,
#if ENABLE_OVERLOADING
diffOptionsNContextLines ,
#endif
getDiffOptionsNContextLines ,
setDiffOptionsNContextLines ,
#if ENABLE_OVERLOADING
DiffOptionsNInterhunkLinesPropertyInfo ,
#endif
constructDiffOptionsNInterhunkLines ,
#if ENABLE_OVERLOADING
diffOptionsNInterhunkLines ,
#endif
getDiffOptionsNInterhunkLines ,
setDiffOptionsNInterhunkLines ,
#if ENABLE_OVERLOADING
DiffOptionsNewPrefixPropertyInfo ,
#endif
constructDiffOptionsNewPrefix ,
#if ENABLE_OVERLOADING
diffOptionsNewPrefix ,
#endif
getDiffOptionsNewPrefix ,
setDiffOptionsNewPrefix ,
#if ENABLE_OVERLOADING
DiffOptionsOldPrefixPropertyInfo ,
#endif
constructDiffOptionsOldPrefix ,
#if ENABLE_OVERLOADING
diffOptionsOldPrefix ,
#endif
getDiffOptionsOldPrefix ,
setDiffOptionsOldPrefix ,
#if ENABLE_OVERLOADING
DiffOptionsPathspecPropertyInfo ,
#endif
clearDiffOptionsPathspec ,
constructDiffOptionsPathspec ,
#if ENABLE_OVERLOADING
diffOptionsPathspec ,
#endif
getDiffOptionsPathspec ,
setDiffOptionsPathspec ,
) 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 qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Ggit.Flags as Ggit.Flags
newtype DiffOptions = DiffOptions (ManagedPtr DiffOptions)
foreign import ccall "ggit_diff_options_get_type"
c_ggit_diff_options_get_type :: IO GType
instance GObject DiffOptions where
gobjectType = c_ggit_diff_options_get_type
class (GObject o, O.IsDescendantOf DiffOptions o) => IsDiffOptions o
instance (GObject o, O.IsDescendantOf DiffOptions o) => IsDiffOptions o
instance O.HasParentTypes DiffOptions
type instance O.ParentTypes DiffOptions = '[GObject.Object.Object]
toDiffOptions :: (MonadIO m, IsDiffOptions o) => o -> m DiffOptions
toDiffOptions = liftIO . unsafeCastTo DiffOptions
noDiffOptions :: Maybe DiffOptions
noDiffOptions = Nothing
#if ENABLE_OVERLOADING
type family ResolveDiffOptionsMethod (t :: Symbol) (o :: *) :: * where
ResolveDiffOptionsMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDiffOptionsMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDiffOptionsMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDiffOptionsMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDiffOptionsMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDiffOptionsMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDiffOptionsMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDiffOptionsMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDiffOptionsMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDiffOptionsMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDiffOptionsMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDiffOptionsMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDiffOptionsMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDiffOptionsMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDiffOptionsMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDiffOptionsMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDiffOptionsMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDiffOptionsMethod "getFlags" o = DiffOptionsGetFlagsMethodInfo
ResolveDiffOptionsMethod "getNContextLines" o = DiffOptionsGetNContextLinesMethodInfo
ResolveDiffOptionsMethod "getNInterhunkLines" o = DiffOptionsGetNInterhunkLinesMethodInfo
ResolveDiffOptionsMethod "getNewPrefix" o = DiffOptionsGetNewPrefixMethodInfo
ResolveDiffOptionsMethod "getOldPrefix" o = DiffOptionsGetOldPrefixMethodInfo
ResolveDiffOptionsMethod "getPathspec" o = DiffOptionsGetPathspecMethodInfo
ResolveDiffOptionsMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDiffOptionsMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDiffOptionsMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDiffOptionsMethod "setFlags" o = DiffOptionsSetFlagsMethodInfo
ResolveDiffOptionsMethod "setNContextLines" o = DiffOptionsSetNContextLinesMethodInfo
ResolveDiffOptionsMethod "setNInterhunkLines" o = DiffOptionsSetNInterhunkLinesMethodInfo
ResolveDiffOptionsMethod "setNewPrefix" o = DiffOptionsSetNewPrefixMethodInfo
ResolveDiffOptionsMethod "setOldPrefix" o = DiffOptionsSetOldPrefixMethodInfo
ResolveDiffOptionsMethod "setPathspec" o = DiffOptionsSetPathspecMethodInfo
ResolveDiffOptionsMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDiffOptionsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDiffOptionsMethod t DiffOptions, O.MethodInfo info DiffOptions p) => OL.IsLabel t (DiffOptions -> 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
getDiffOptionsFlags :: (MonadIO m, IsDiffOptions o) => o -> m [Ggit.Flags.DiffOption]
getDiffOptionsFlags obj = liftIO $ B.Properties.getObjectPropertyFlags obj "flags"
setDiffOptionsFlags :: (MonadIO m, IsDiffOptions o) => o -> [Ggit.Flags.DiffOption] -> m ()
setDiffOptionsFlags obj val = liftIO $ B.Properties.setObjectPropertyFlags obj "flags" val
constructDiffOptionsFlags :: (IsDiffOptions o) => [Ggit.Flags.DiffOption] -> IO (GValueConstruct o)
constructDiffOptionsFlags val = B.Properties.constructObjectPropertyFlags "flags" val
#if ENABLE_OVERLOADING
data DiffOptionsFlagsPropertyInfo
instance AttrInfo DiffOptionsFlagsPropertyInfo where
type AttrAllowedOps DiffOptionsFlagsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DiffOptionsFlagsPropertyInfo = (~) [Ggit.Flags.DiffOption]
type AttrBaseTypeConstraint DiffOptionsFlagsPropertyInfo = IsDiffOptions
type AttrGetType DiffOptionsFlagsPropertyInfo = [Ggit.Flags.DiffOption]
type AttrLabel DiffOptionsFlagsPropertyInfo = "flags"
type AttrOrigin DiffOptionsFlagsPropertyInfo = DiffOptions
attrGet _ = getDiffOptionsFlags
attrSet _ = setDiffOptionsFlags
attrConstruct _ = constructDiffOptionsFlags
attrClear _ = undefined
#endif
getDiffOptionsNContextLines :: (MonadIO m, IsDiffOptions o) => o -> m Int32
getDiffOptionsNContextLines obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "n-context-lines"
setDiffOptionsNContextLines :: (MonadIO m, IsDiffOptions o) => o -> Int32 -> m ()
setDiffOptionsNContextLines obj val = liftIO $ B.Properties.setObjectPropertyInt32 obj "n-context-lines" val
constructDiffOptionsNContextLines :: (IsDiffOptions o) => Int32 -> IO (GValueConstruct o)
constructDiffOptionsNContextLines val = B.Properties.constructObjectPropertyInt32 "n-context-lines" val
#if ENABLE_OVERLOADING
data DiffOptionsNContextLinesPropertyInfo
instance AttrInfo DiffOptionsNContextLinesPropertyInfo where
type AttrAllowedOps DiffOptionsNContextLinesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DiffOptionsNContextLinesPropertyInfo = (~) Int32
type AttrBaseTypeConstraint DiffOptionsNContextLinesPropertyInfo = IsDiffOptions
type AttrGetType DiffOptionsNContextLinesPropertyInfo = Int32
type AttrLabel DiffOptionsNContextLinesPropertyInfo = "n-context-lines"
type AttrOrigin DiffOptionsNContextLinesPropertyInfo = DiffOptions
attrGet _ = getDiffOptionsNContextLines
attrSet _ = setDiffOptionsNContextLines
attrConstruct _ = constructDiffOptionsNContextLines
attrClear _ = undefined
#endif
getDiffOptionsNInterhunkLines :: (MonadIO m, IsDiffOptions o) => o -> m Int32
getDiffOptionsNInterhunkLines obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "n-interhunk-lines"
setDiffOptionsNInterhunkLines :: (MonadIO m, IsDiffOptions o) => o -> Int32 -> m ()
setDiffOptionsNInterhunkLines obj val = liftIO $ B.Properties.setObjectPropertyInt32 obj "n-interhunk-lines" val
constructDiffOptionsNInterhunkLines :: (IsDiffOptions o) => Int32 -> IO (GValueConstruct o)
constructDiffOptionsNInterhunkLines val = B.Properties.constructObjectPropertyInt32 "n-interhunk-lines" val
#if ENABLE_OVERLOADING
data DiffOptionsNInterhunkLinesPropertyInfo
instance AttrInfo DiffOptionsNInterhunkLinesPropertyInfo where
type AttrAllowedOps DiffOptionsNInterhunkLinesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DiffOptionsNInterhunkLinesPropertyInfo = (~) Int32
type AttrBaseTypeConstraint DiffOptionsNInterhunkLinesPropertyInfo = IsDiffOptions
type AttrGetType DiffOptionsNInterhunkLinesPropertyInfo = Int32
type AttrLabel DiffOptionsNInterhunkLinesPropertyInfo = "n-interhunk-lines"
type AttrOrigin DiffOptionsNInterhunkLinesPropertyInfo = DiffOptions
attrGet _ = getDiffOptionsNInterhunkLines
attrSet _ = setDiffOptionsNInterhunkLines
attrConstruct _ = constructDiffOptionsNInterhunkLines
attrClear _ = undefined
#endif
getDiffOptionsNewPrefix :: (MonadIO m, IsDiffOptions o) => o -> m (Maybe T.Text)
getDiffOptionsNewPrefix obj = liftIO $ B.Properties.getObjectPropertyString obj "new-prefix"
setDiffOptionsNewPrefix :: (MonadIO m, IsDiffOptions o) => o -> T.Text -> m ()
setDiffOptionsNewPrefix obj val = liftIO $ B.Properties.setObjectPropertyString obj "new-prefix" (Just val)
constructDiffOptionsNewPrefix :: (IsDiffOptions o) => T.Text -> IO (GValueConstruct o)
constructDiffOptionsNewPrefix val = B.Properties.constructObjectPropertyString "new-prefix" (Just val)
#if ENABLE_OVERLOADING
data DiffOptionsNewPrefixPropertyInfo
instance AttrInfo DiffOptionsNewPrefixPropertyInfo where
type AttrAllowedOps DiffOptionsNewPrefixPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DiffOptionsNewPrefixPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DiffOptionsNewPrefixPropertyInfo = IsDiffOptions
type AttrGetType DiffOptionsNewPrefixPropertyInfo = (Maybe T.Text)
type AttrLabel DiffOptionsNewPrefixPropertyInfo = "new-prefix"
type AttrOrigin DiffOptionsNewPrefixPropertyInfo = DiffOptions
attrGet _ = getDiffOptionsNewPrefix
attrSet _ = setDiffOptionsNewPrefix
attrConstruct _ = constructDiffOptionsNewPrefix
attrClear _ = undefined
#endif
getDiffOptionsOldPrefix :: (MonadIO m, IsDiffOptions o) => o -> m (Maybe T.Text)
getDiffOptionsOldPrefix obj = liftIO $ B.Properties.getObjectPropertyString obj "old-prefix"
setDiffOptionsOldPrefix :: (MonadIO m, IsDiffOptions o) => o -> T.Text -> m ()
setDiffOptionsOldPrefix obj val = liftIO $ B.Properties.setObjectPropertyString obj "old-prefix" (Just val)
constructDiffOptionsOldPrefix :: (IsDiffOptions o) => T.Text -> IO (GValueConstruct o)
constructDiffOptionsOldPrefix val = B.Properties.constructObjectPropertyString "old-prefix" (Just val)
#if ENABLE_OVERLOADING
data DiffOptionsOldPrefixPropertyInfo
instance AttrInfo DiffOptionsOldPrefixPropertyInfo where
type AttrAllowedOps DiffOptionsOldPrefixPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint DiffOptionsOldPrefixPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DiffOptionsOldPrefixPropertyInfo = IsDiffOptions
type AttrGetType DiffOptionsOldPrefixPropertyInfo = (Maybe T.Text)
type AttrLabel DiffOptionsOldPrefixPropertyInfo = "old-prefix"
type AttrOrigin DiffOptionsOldPrefixPropertyInfo = DiffOptions
attrGet _ = getDiffOptionsOldPrefix
attrSet _ = setDiffOptionsOldPrefix
attrConstruct _ = constructDiffOptionsOldPrefix
attrClear _ = undefined
#endif
getDiffOptionsPathspec :: (MonadIO m, IsDiffOptions o) => o -> m (Maybe [T.Text])
getDiffOptionsPathspec obj = liftIO $ B.Properties.getObjectPropertyStringArray obj "pathspec"
setDiffOptionsPathspec :: (MonadIO m, IsDiffOptions o) => o -> [T.Text] -> m ()
setDiffOptionsPathspec obj val = liftIO $ B.Properties.setObjectPropertyStringArray obj "pathspec" (Just val)
constructDiffOptionsPathspec :: (IsDiffOptions o) => [T.Text] -> IO (GValueConstruct o)
constructDiffOptionsPathspec val = B.Properties.constructObjectPropertyStringArray "pathspec" (Just val)
clearDiffOptionsPathspec :: (MonadIO m, IsDiffOptions o) => o -> m ()
clearDiffOptionsPathspec obj = liftIO $ B.Properties.setObjectPropertyStringArray obj "pathspec" (Nothing :: Maybe [T.Text])
#if ENABLE_OVERLOADING
data DiffOptionsPathspecPropertyInfo
instance AttrInfo DiffOptionsPathspecPropertyInfo where
type AttrAllowedOps DiffOptionsPathspecPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DiffOptionsPathspecPropertyInfo = (~) [T.Text]
type AttrBaseTypeConstraint DiffOptionsPathspecPropertyInfo = IsDiffOptions
type AttrGetType DiffOptionsPathspecPropertyInfo = (Maybe [T.Text])
type AttrLabel DiffOptionsPathspecPropertyInfo = "pathspec"
type AttrOrigin DiffOptionsPathspecPropertyInfo = DiffOptions
attrGet _ = getDiffOptionsPathspec
attrSet _ = setDiffOptionsPathspec
attrConstruct _ = constructDiffOptionsPathspec
attrClear _ = clearDiffOptionsPathspec
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DiffOptions
type instance O.AttributeList DiffOptions = DiffOptionsAttributeList
type DiffOptionsAttributeList = ('[ '("flags", DiffOptionsFlagsPropertyInfo), '("nContextLines", DiffOptionsNContextLinesPropertyInfo), '("nInterhunkLines", DiffOptionsNInterhunkLinesPropertyInfo), '("newPrefix", DiffOptionsNewPrefixPropertyInfo), '("oldPrefix", DiffOptionsOldPrefixPropertyInfo), '("pathspec", DiffOptionsPathspecPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
diffOptionsFlags :: AttrLabelProxy "flags"
diffOptionsFlags = AttrLabelProxy
diffOptionsNContextLines :: AttrLabelProxy "nContextLines"
diffOptionsNContextLines = AttrLabelProxy
diffOptionsNInterhunkLines :: AttrLabelProxy "nInterhunkLines"
diffOptionsNInterhunkLines = AttrLabelProxy
diffOptionsNewPrefix :: AttrLabelProxy "newPrefix"
diffOptionsNewPrefix = AttrLabelProxy
diffOptionsOldPrefix :: AttrLabelProxy "oldPrefix"
diffOptionsOldPrefix = AttrLabelProxy
diffOptionsPathspec :: AttrLabelProxy "pathspec"
diffOptionsPathspec = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList DiffOptions = DiffOptionsSignalList
type DiffOptionsSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_diff_options_new" ggit_diff_options_new ::
IO (Ptr DiffOptions)
diffOptionsNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m (Maybe DiffOptions)
diffOptionsNew = liftIO $ do
result <- ggit_diff_options_new
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapObject DiffOptions) result'
return result''
return maybeResult
#if ENABLE_OVERLOADING
#endif
foreign import ccall "ggit_diff_options_get_flags" ggit_diff_options_get_flags ::
Ptr DiffOptions ->
IO CUInt
diffOptionsGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> m [Ggit.Flags.DiffOption]
diffOptionsGetFlags options = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
result <- ggit_diff_options_get_flags options'
let result' = wordToGFlags result
touchManagedPtr options
return result'
#if ENABLE_OVERLOADING
data DiffOptionsGetFlagsMethodInfo
instance (signature ~ (m [Ggit.Flags.DiffOption]), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsGetFlagsMethodInfo a signature where
overloadedMethod _ = diffOptionsGetFlags
#endif
foreign import ccall "ggit_diff_options_get_n_context_lines" ggit_diff_options_get_n_context_lines ::
Ptr DiffOptions ->
IO Int32
diffOptionsGetNContextLines ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> m Int32
diffOptionsGetNContextLines options = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
result <- ggit_diff_options_get_n_context_lines options'
touchManagedPtr options
return result
#if ENABLE_OVERLOADING
data DiffOptionsGetNContextLinesMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsGetNContextLinesMethodInfo a signature where
overloadedMethod _ = diffOptionsGetNContextLines
#endif
foreign import ccall "ggit_diff_options_get_n_interhunk_lines" ggit_diff_options_get_n_interhunk_lines ::
Ptr DiffOptions ->
IO Int32
diffOptionsGetNInterhunkLines ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> m Int32
diffOptionsGetNInterhunkLines options = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
result <- ggit_diff_options_get_n_interhunk_lines options'
touchManagedPtr options
return result
#if ENABLE_OVERLOADING
data DiffOptionsGetNInterhunkLinesMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsGetNInterhunkLinesMethodInfo a signature where
overloadedMethod _ = diffOptionsGetNInterhunkLines
#endif
foreign import ccall "ggit_diff_options_get_new_prefix" ggit_diff_options_get_new_prefix ::
Ptr DiffOptions ->
IO CString
diffOptionsGetNewPrefix ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> m (Maybe T.Text)
diffOptionsGetNewPrefix options = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
result <- ggit_diff_options_get_new_prefix options'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr options
return maybeResult
#if ENABLE_OVERLOADING
data DiffOptionsGetNewPrefixMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsGetNewPrefixMethodInfo a signature where
overloadedMethod _ = diffOptionsGetNewPrefix
#endif
foreign import ccall "ggit_diff_options_get_old_prefix" ggit_diff_options_get_old_prefix ::
Ptr DiffOptions ->
IO CString
diffOptionsGetOldPrefix ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> m (Maybe T.Text)
diffOptionsGetOldPrefix options = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
result <- ggit_diff_options_get_old_prefix options'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
freeMem result'
return result''
touchManagedPtr options
return maybeResult
#if ENABLE_OVERLOADING
data DiffOptionsGetOldPrefixMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsGetOldPrefixMethodInfo a signature where
overloadedMethod _ = diffOptionsGetOldPrefix
#endif
foreign import ccall "ggit_diff_options_get_pathspec" ggit_diff_options_get_pathspec ::
Ptr DiffOptions ->
IO (Ptr CString)
diffOptionsGetPathspec ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> m (Maybe [T.Text])
diffOptionsGetPathspec options = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
result <- ggit_diff_options_get_pathspec options'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- unpackZeroTerminatedUTF8CArray result'
return result''
touchManagedPtr options
return maybeResult
#if ENABLE_OVERLOADING
data DiffOptionsGetPathspecMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsGetPathspecMethodInfo a signature where
overloadedMethod _ = diffOptionsGetPathspec
#endif
foreign import ccall "ggit_diff_options_set_flags" ggit_diff_options_set_flags ::
Ptr DiffOptions ->
CUInt ->
IO ()
diffOptionsSetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> [Ggit.Flags.DiffOption]
-> m ()
diffOptionsSetFlags options flags = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
let flags' = gflagsToWord flags
ggit_diff_options_set_flags options' flags'
touchManagedPtr options
return ()
#if ENABLE_OVERLOADING
data DiffOptionsSetFlagsMethodInfo
instance (signature ~ ([Ggit.Flags.DiffOption] -> m ()), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsSetFlagsMethodInfo a signature where
overloadedMethod _ = diffOptionsSetFlags
#endif
foreign import ccall "ggit_diff_options_set_n_context_lines" ggit_diff_options_set_n_context_lines ::
Ptr DiffOptions ->
Int32 ->
IO ()
diffOptionsSetNContextLines ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> Int32
-> m ()
diffOptionsSetNContextLines options n = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
ggit_diff_options_set_n_context_lines options' n
touchManagedPtr options
return ()
#if ENABLE_OVERLOADING
data DiffOptionsSetNContextLinesMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsSetNContextLinesMethodInfo a signature where
overloadedMethod _ = diffOptionsSetNContextLines
#endif
foreign import ccall "ggit_diff_options_set_n_interhunk_lines" ggit_diff_options_set_n_interhunk_lines ::
Ptr DiffOptions ->
Int32 ->
IO ()
diffOptionsSetNInterhunkLines ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> Int32
-> m ()
diffOptionsSetNInterhunkLines options n = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
ggit_diff_options_set_n_interhunk_lines options' n
touchManagedPtr options
return ()
#if ENABLE_OVERLOADING
data DiffOptionsSetNInterhunkLinesMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsSetNInterhunkLinesMethodInfo a signature where
overloadedMethod _ = diffOptionsSetNInterhunkLines
#endif
foreign import ccall "ggit_diff_options_set_new_prefix" ggit_diff_options_set_new_prefix ::
Ptr DiffOptions ->
CString ->
IO ()
diffOptionsSetNewPrefix ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> T.Text
-> m ()
diffOptionsSetNewPrefix options prefix = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
prefix' <- textToCString prefix
ggit_diff_options_set_new_prefix options' prefix'
touchManagedPtr options
freeMem prefix'
return ()
#if ENABLE_OVERLOADING
data DiffOptionsSetNewPrefixMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsSetNewPrefixMethodInfo a signature where
overloadedMethod _ = diffOptionsSetNewPrefix
#endif
foreign import ccall "ggit_diff_options_set_old_prefix" ggit_diff_options_set_old_prefix ::
Ptr DiffOptions ->
CString ->
IO ()
diffOptionsSetOldPrefix ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> T.Text
-> m ()
diffOptionsSetOldPrefix options prefix = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
prefix' <- textToCString prefix
ggit_diff_options_set_old_prefix options' prefix'
touchManagedPtr options
freeMem prefix'
return ()
#if ENABLE_OVERLOADING
data DiffOptionsSetOldPrefixMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsSetOldPrefixMethodInfo a signature where
overloadedMethod _ = diffOptionsSetOldPrefix
#endif
foreign import ccall "ggit_diff_options_set_pathspec" ggit_diff_options_set_pathspec ::
Ptr DiffOptions ->
Ptr CString ->
IO ()
diffOptionsSetPathspec ::
(B.CallStack.HasCallStack, MonadIO m, IsDiffOptions a) =>
a
-> Maybe ([T.Text])
-> m ()
diffOptionsSetPathspec options pathspec = liftIO $ do
options' <- unsafeManagedPtrCastPtr options
maybePathspec <- case pathspec of
Nothing -> return nullPtr
Just jPathspec -> do
jPathspec' <- packZeroTerminatedUTF8CArray jPathspec
return jPathspec'
ggit_diff_options_set_pathspec options' maybePathspec
touchManagedPtr options
mapZeroTerminatedCArray freeMem maybePathspec
freeMem maybePathspec
return ()
#if ENABLE_OVERLOADING
data DiffOptionsSetPathspecMethodInfo
instance (signature ~ (Maybe ([T.Text]) -> m ()), MonadIO m, IsDiffOptions a) => O.MethodInfo DiffOptionsSetPathspecMethodInfo a signature where
overloadedMethod _ = diffOptionsSetPathspec
#endif