#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Ggit.Structs.RebaseOptions
(
RebaseOptions(..) ,
noRebaseOptions ,
#if ENABLE_OVERLOADING
RebaseOptionsCopyMethodInfo ,
#endif
rebaseOptionsCopy ,
#if ENABLE_OVERLOADING
RebaseOptionsFreeMethodInfo ,
#endif
rebaseOptionsFree ,
#if ENABLE_OVERLOADING
RebaseOptionsGetCheckoutOptionsMethodInfo,
#endif
rebaseOptionsGetCheckoutOptions ,
#if ENABLE_OVERLOADING
RebaseOptionsGetQuietMethodInfo ,
#endif
rebaseOptionsGetQuiet ,
#if ENABLE_OVERLOADING
RebaseOptionsGetRewriteNotesRefMethodInfo,
#endif
rebaseOptionsGetRewriteNotesRef ,
rebaseOptionsNew ,
#if ENABLE_OVERLOADING
RebaseOptionsSetCheckoutOptionsMethodInfo,
#endif
rebaseOptionsSetCheckoutOptions ,
#if ENABLE_OVERLOADING
RebaseOptionsSetQuietMethodInfo ,
#endif
rebaseOptionsSetQuiet ,
#if ENABLE_OVERLOADING
RebaseOptionsSetRewriteNotesRefMethodInfo,
#endif
rebaseOptionsSetRewriteNotesRef ,
) 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.Objects.CheckoutOptions as Ggit.CheckoutOptions
newtype RebaseOptions = RebaseOptions (ManagedPtr RebaseOptions)
foreign import ccall "ggit_rebase_options_get_type" c_ggit_rebase_options_get_type ::
IO GType
instance BoxedObject RebaseOptions where
boxedType _ = c_ggit_rebase_options_get_type
noRebaseOptions :: Maybe RebaseOptions
noRebaseOptions = Nothing
#if ENABLE_OVERLOADING
instance O.HasAttributeList RebaseOptions
type instance O.AttributeList RebaseOptions = RebaseOptionsAttributeList
type RebaseOptionsAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_rebase_options_new" ggit_rebase_options_new ::
IO (Ptr RebaseOptions)
rebaseOptionsNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m RebaseOptions
rebaseOptionsNew = liftIO $ do
result <- ggit_rebase_options_new
checkUnexpectedReturnNULL "rebaseOptionsNew" result
result' <- (wrapBoxed RebaseOptions) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "ggit_rebase_options_copy" ggit_rebase_options_copy ::
Ptr RebaseOptions ->
IO (Ptr RebaseOptions)
rebaseOptionsCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> m (Maybe RebaseOptions)
rebaseOptionsCopy rebaseOptions = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
result <- ggit_rebase_options_copy rebaseOptions'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed RebaseOptions) result'
return result''
touchManagedPtr rebaseOptions
return maybeResult
#if ENABLE_OVERLOADING
data RebaseOptionsCopyMethodInfo
instance (signature ~ (m (Maybe RebaseOptions)), MonadIO m) => O.MethodInfo RebaseOptionsCopyMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsCopy
#endif
foreign import ccall "ggit_rebase_options_free" ggit_rebase_options_free ::
Ptr RebaseOptions ->
IO ()
rebaseOptionsFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> m ()
rebaseOptionsFree rebaseOptions = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
ggit_rebase_options_free rebaseOptions'
touchManagedPtr rebaseOptions
return ()
#if ENABLE_OVERLOADING
data RebaseOptionsFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo RebaseOptionsFreeMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsFree
#endif
foreign import ccall "ggit_rebase_options_get_checkout_options" ggit_rebase_options_get_checkout_options ::
Ptr RebaseOptions ->
IO (Ptr Ggit.CheckoutOptions.CheckoutOptions)
rebaseOptionsGetCheckoutOptions ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> m (Maybe Ggit.CheckoutOptions.CheckoutOptions)
rebaseOptionsGetCheckoutOptions rebaseOptions = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
result <- ggit_rebase_options_get_checkout_options rebaseOptions'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Ggit.CheckoutOptions.CheckoutOptions) result'
return result''
touchManagedPtr rebaseOptions
return maybeResult
#if ENABLE_OVERLOADING
data RebaseOptionsGetCheckoutOptionsMethodInfo
instance (signature ~ (m (Maybe Ggit.CheckoutOptions.CheckoutOptions)), MonadIO m) => O.MethodInfo RebaseOptionsGetCheckoutOptionsMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsGetCheckoutOptions
#endif
foreign import ccall "ggit_rebase_options_get_quiet" ggit_rebase_options_get_quiet ::
Ptr RebaseOptions ->
IO CInt
rebaseOptionsGetQuiet ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> m Bool
rebaseOptionsGetQuiet rebaseOptions = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
result <- ggit_rebase_options_get_quiet rebaseOptions'
let result' = (/= 0) result
touchManagedPtr rebaseOptions
return result'
#if ENABLE_OVERLOADING
data RebaseOptionsGetQuietMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo RebaseOptionsGetQuietMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsGetQuiet
#endif
foreign import ccall "ggit_rebase_options_get_rewrite_notes_ref" ggit_rebase_options_get_rewrite_notes_ref ::
Ptr RebaseOptions ->
IO CString
rebaseOptionsGetRewriteNotesRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> m (Maybe T.Text)
rebaseOptionsGetRewriteNotesRef rebaseOptions = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
result <- ggit_rebase_options_get_rewrite_notes_ref rebaseOptions'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr rebaseOptions
return maybeResult
#if ENABLE_OVERLOADING
data RebaseOptionsGetRewriteNotesRefMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m) => O.MethodInfo RebaseOptionsGetRewriteNotesRefMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsGetRewriteNotesRef
#endif
foreign import ccall "ggit_rebase_options_set_checkout_options" ggit_rebase_options_set_checkout_options ::
Ptr RebaseOptions ->
Ptr Ggit.CheckoutOptions.CheckoutOptions ->
IO ()
rebaseOptionsSetCheckoutOptions ::
(B.CallStack.HasCallStack, MonadIO m, Ggit.CheckoutOptions.IsCheckoutOptions a) =>
RebaseOptions
-> a
-> m ()
rebaseOptionsSetCheckoutOptions rebaseOptions checkoutOptions = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
checkoutOptions' <- unsafeManagedPtrCastPtr checkoutOptions
ggit_rebase_options_set_checkout_options rebaseOptions' checkoutOptions'
touchManagedPtr rebaseOptions
touchManagedPtr checkoutOptions
return ()
#if ENABLE_OVERLOADING
data RebaseOptionsSetCheckoutOptionsMethodInfo
instance (signature ~ (a -> m ()), MonadIO m, Ggit.CheckoutOptions.IsCheckoutOptions a) => O.MethodInfo RebaseOptionsSetCheckoutOptionsMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsSetCheckoutOptions
#endif
foreign import ccall "ggit_rebase_options_set_quiet" ggit_rebase_options_set_quiet ::
Ptr RebaseOptions ->
CInt ->
IO ()
rebaseOptionsSetQuiet ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> Bool
-> m ()
rebaseOptionsSetQuiet rebaseOptions quiet = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
let quiet' = (fromIntegral . fromEnum) quiet
ggit_rebase_options_set_quiet rebaseOptions' quiet'
touchManagedPtr rebaseOptions
return ()
#if ENABLE_OVERLOADING
data RebaseOptionsSetQuietMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m) => O.MethodInfo RebaseOptionsSetQuietMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsSetQuiet
#endif
foreign import ccall "ggit_rebase_options_set_rewrite_notes_ref" ggit_rebase_options_set_rewrite_notes_ref ::
Ptr RebaseOptions ->
CString ->
IO ()
rebaseOptionsSetRewriteNotesRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
RebaseOptions
-> T.Text
-> m ()
rebaseOptionsSetRewriteNotesRef rebaseOptions rewriteNotesRef = liftIO $ do
rebaseOptions' <- unsafeManagedPtrGetPtr rebaseOptions
rewriteNotesRef' <- textToCString rewriteNotesRef
ggit_rebase_options_set_rewrite_notes_ref rebaseOptions' rewriteNotesRef'
touchManagedPtr rebaseOptions
freeMem rewriteNotesRef'
return ()
#if ENABLE_OVERLOADING
data RebaseOptionsSetRewriteNotesRefMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo RebaseOptionsSetRewriteNotesRefMethodInfo RebaseOptions signature where
overloadedMethod _ = rebaseOptionsSetRewriteNotesRef
#endif
#if ENABLE_OVERLOADING
type family ResolveRebaseOptionsMethod (t :: Symbol) (o :: *) :: * where
ResolveRebaseOptionsMethod "copy" o = RebaseOptionsCopyMethodInfo
ResolveRebaseOptionsMethod "free" o = RebaseOptionsFreeMethodInfo
ResolveRebaseOptionsMethod "getCheckoutOptions" o = RebaseOptionsGetCheckoutOptionsMethodInfo
ResolveRebaseOptionsMethod "getQuiet" o = RebaseOptionsGetQuietMethodInfo
ResolveRebaseOptionsMethod "getRewriteNotesRef" o = RebaseOptionsGetRewriteNotesRefMethodInfo
ResolveRebaseOptionsMethod "setCheckoutOptions" o = RebaseOptionsSetCheckoutOptionsMethodInfo
ResolveRebaseOptionsMethod "setQuiet" o = RebaseOptionsSetQuietMethodInfo
ResolveRebaseOptionsMethod "setRewriteNotesRef" o = RebaseOptionsSetRewriteNotesRefMethodInfo
ResolveRebaseOptionsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRebaseOptionsMethod t RebaseOptions, O.MethodInfo info RebaseOptions p) => OL.IsLabel t (RebaseOptions -> 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