{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Ggit.Structs.IndexEntryResolveUndo
(
IndexEntryResolveUndo(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveIndexEntryResolveUndoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
IndexEntryResolveUndoGetFileMethodInfo ,
#endif
indexEntryResolveUndoGetFile ,
#if defined(ENABLE_OVERLOADING)
IndexEntryResolveUndoGetIdMethodInfo ,
#endif
indexEntryResolveUndoGetId ,
#if defined(ENABLE_OVERLOADING)
IndexEntryResolveUndoGetModeMethodInfo ,
#endif
indexEntryResolveUndoGetMode ,
#if defined(ENABLE_OVERLOADING)
IndexEntryResolveUndoRefMethodInfo ,
#endif
indexEntryResolveUndoRef ,
#if defined(ENABLE_OVERLOADING)
IndexEntryResolveUndoUnrefMethodInfo ,
#endif
indexEntryResolveUndoUnref ,
) 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.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 {-# SOURCE #-} qualified GI.Ggit.Structs.OId as Ggit.OId
import qualified GI.Gio.Interfaces.File as Gio.File
newtype IndexEntryResolveUndo = IndexEntryResolveUndo (SP.ManagedPtr IndexEntryResolveUndo)
deriving (IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool
(IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool)
-> (IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool)
-> Eq IndexEntryResolveUndo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool
$c/= :: IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool
== :: IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool
$c== :: IndexEntryResolveUndo -> IndexEntryResolveUndo -> Bool
Eq)
instance SP.ManagedPtrNewtype IndexEntryResolveUndo where
toManagedPtr :: IndexEntryResolveUndo -> ManagedPtr IndexEntryResolveUndo
toManagedPtr (IndexEntryResolveUndo ManagedPtr IndexEntryResolveUndo
p) = ManagedPtr IndexEntryResolveUndo
p
foreign import ccall "ggit_index_entry_resolve_undo_get_type" c_ggit_index_entry_resolve_undo_get_type ::
IO GType
type instance O.ParentTypes IndexEntryResolveUndo = '[]
instance O.HasParentTypes IndexEntryResolveUndo
instance B.Types.TypedObject IndexEntryResolveUndo where
glibType :: IO GType
glibType = IO GType
c_ggit_index_entry_resolve_undo_get_type
instance B.Types.GBoxed IndexEntryResolveUndo
instance B.GValue.IsGValue IndexEntryResolveUndo where
toGValue :: IndexEntryResolveUndo -> IO GValue
toGValue IndexEntryResolveUndo
o = do
GType
gtype <- IO GType
c_ggit_index_entry_resolve_undo_get_type
IndexEntryResolveUndo
-> (Ptr IndexEntryResolveUndo -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr IndexEntryResolveUndo
o (GType
-> (GValue -> Ptr IndexEntryResolveUndo -> IO ())
-> Ptr IndexEntryResolveUndo
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr IndexEntryResolveUndo -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO IndexEntryResolveUndo
fromGValue GValue
gv = do
Ptr IndexEntryResolveUndo
ptr <- GValue -> IO (Ptr IndexEntryResolveUndo)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr IndexEntryResolveUndo)
(ManagedPtr IndexEntryResolveUndo -> IndexEntryResolveUndo)
-> Ptr IndexEntryResolveUndo -> IO IndexEntryResolveUndo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr IndexEntryResolveUndo -> IndexEntryResolveUndo
IndexEntryResolveUndo Ptr IndexEntryResolveUndo
ptr
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList IndexEntryResolveUndo
type instance O.AttributeList IndexEntryResolveUndo = IndexEntryResolveUndoAttributeList
type IndexEntryResolveUndoAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "ggit_index_entry_resolve_undo_get_file" ggit_index_entry_resolve_undo_get_file ::
Ptr IndexEntryResolveUndo ->
IO (Ptr Gio.File.File)
indexEntryResolveUndoGetFile ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntryResolveUndo
-> m (Maybe Gio.File.File)
indexEntryResolveUndoGetFile :: IndexEntryResolveUndo -> m (Maybe File)
indexEntryResolveUndoGetFile IndexEntryResolveUndo
entry = IO (Maybe File) -> m (Maybe File)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr IndexEntryResolveUndo
entry' <- IndexEntryResolveUndo -> IO (Ptr IndexEntryResolveUndo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IndexEntryResolveUndo
entry
Ptr File
result <- Ptr IndexEntryResolveUndo -> IO (Ptr File)
ggit_index_entry_resolve_undo_get_file Ptr IndexEntryResolveUndo
entry'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
IndexEntryResolveUndo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IndexEntryResolveUndo
entry
Maybe File -> IO (Maybe File)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
#if defined(ENABLE_OVERLOADING)
data IndexEntryResolveUndoGetFileMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m) => O.MethodInfo IndexEntryResolveUndoGetFileMethodInfo IndexEntryResolveUndo signature where
overloadedMethod = indexEntryResolveUndoGetFile
#endif
foreign import ccall "ggit_index_entry_resolve_undo_get_id" ggit_index_entry_resolve_undo_get_id ::
Ptr IndexEntryResolveUndo ->
Int32 ->
IO (Ptr Ggit.OId.OId)
indexEntryResolveUndoGetId ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntryResolveUndo
-> Int32
-> m (Maybe Ggit.OId.OId)
indexEntryResolveUndoGetId :: IndexEntryResolveUndo -> Int32 -> m (Maybe OId)
indexEntryResolveUndoGetId IndexEntryResolveUndo
entry Int32
stage = 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 IndexEntryResolveUndo
entry' <- IndexEntryResolveUndo -> IO (Ptr IndexEntryResolveUndo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IndexEntryResolveUndo
entry
Ptr OId
result <- Ptr IndexEntryResolveUndo -> Int32 -> IO (Ptr OId)
ggit_index_entry_resolve_undo_get_id Ptr IndexEntryResolveUndo
entry' Int32
stage
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''
IndexEntryResolveUndo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IndexEntryResolveUndo
entry
Maybe OId -> IO (Maybe OId)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe OId
maybeResult
#if defined(ENABLE_OVERLOADING)
data IndexEntryResolveUndoGetIdMethodInfo
instance (signature ~ (Int32 -> m (Maybe Ggit.OId.OId)), MonadIO m) => O.MethodInfo IndexEntryResolveUndoGetIdMethodInfo IndexEntryResolveUndo signature where
overloadedMethod = indexEntryResolveUndoGetId
#endif
foreign import ccall "ggit_index_entry_resolve_undo_get_mode" ggit_index_entry_resolve_undo_get_mode ::
Ptr IndexEntryResolveUndo ->
Int32 ->
IO Word32
indexEntryResolveUndoGetMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntryResolveUndo
-> Int32
-> m Word32
indexEntryResolveUndoGetMode :: IndexEntryResolveUndo -> Int32 -> m Word32
indexEntryResolveUndoGetMode IndexEntryResolveUndo
entry Int32
stage = 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 IndexEntryResolveUndo
entry' <- IndexEntryResolveUndo -> IO (Ptr IndexEntryResolveUndo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IndexEntryResolveUndo
entry
Word32
result <- Ptr IndexEntryResolveUndo -> Int32 -> IO Word32
ggit_index_entry_resolve_undo_get_mode Ptr IndexEntryResolveUndo
entry' Int32
stage
IndexEntryResolveUndo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IndexEntryResolveUndo
entry
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data IndexEntryResolveUndoGetModeMethodInfo
instance (signature ~ (Int32 -> m Word32), MonadIO m) => O.MethodInfo IndexEntryResolveUndoGetModeMethodInfo IndexEntryResolveUndo signature where
overloadedMethod = indexEntryResolveUndoGetMode
#endif
foreign import ccall "ggit_index_entry_resolve_undo_ref" ggit_index_entry_resolve_undo_ref ::
Ptr IndexEntryResolveUndo ->
IO (Ptr IndexEntryResolveUndo)
indexEntryResolveUndoRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntryResolveUndo
-> m (Maybe IndexEntryResolveUndo)
indexEntryResolveUndoRef :: IndexEntryResolveUndo -> m (Maybe IndexEntryResolveUndo)
indexEntryResolveUndoRef IndexEntryResolveUndo
entry = IO (Maybe IndexEntryResolveUndo) -> m (Maybe IndexEntryResolveUndo)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe IndexEntryResolveUndo)
-> m (Maybe IndexEntryResolveUndo))
-> IO (Maybe IndexEntryResolveUndo)
-> m (Maybe IndexEntryResolveUndo)
forall a b. (a -> b) -> a -> b
$ do
Ptr IndexEntryResolveUndo
entry' <- IndexEntryResolveUndo -> IO (Ptr IndexEntryResolveUndo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IndexEntryResolveUndo
entry
Ptr IndexEntryResolveUndo
result <- Ptr IndexEntryResolveUndo -> IO (Ptr IndexEntryResolveUndo)
ggit_index_entry_resolve_undo_ref Ptr IndexEntryResolveUndo
entry'
Maybe IndexEntryResolveUndo
maybeResult <- Ptr IndexEntryResolveUndo
-> (Ptr IndexEntryResolveUndo -> IO IndexEntryResolveUndo)
-> IO (Maybe IndexEntryResolveUndo)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr IndexEntryResolveUndo
result ((Ptr IndexEntryResolveUndo -> IO IndexEntryResolveUndo)
-> IO (Maybe IndexEntryResolveUndo))
-> (Ptr IndexEntryResolveUndo -> IO IndexEntryResolveUndo)
-> IO (Maybe IndexEntryResolveUndo)
forall a b. (a -> b) -> a -> b
$ \Ptr IndexEntryResolveUndo
result' -> do
IndexEntryResolveUndo
result'' <- ((ManagedPtr IndexEntryResolveUndo -> IndexEntryResolveUndo)
-> Ptr IndexEntryResolveUndo -> IO IndexEntryResolveUndo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr IndexEntryResolveUndo -> IndexEntryResolveUndo
IndexEntryResolveUndo) Ptr IndexEntryResolveUndo
result'
IndexEntryResolveUndo -> IO IndexEntryResolveUndo
forall (m :: * -> *) a. Monad m => a -> m a
return IndexEntryResolveUndo
result''
IndexEntryResolveUndo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IndexEntryResolveUndo
entry
Maybe IndexEntryResolveUndo -> IO (Maybe IndexEntryResolveUndo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe IndexEntryResolveUndo
maybeResult
#if defined(ENABLE_OVERLOADING)
data IndexEntryResolveUndoRefMethodInfo
instance (signature ~ (m (Maybe IndexEntryResolveUndo)), MonadIO m) => O.MethodInfo IndexEntryResolveUndoRefMethodInfo IndexEntryResolveUndo signature where
overloadedMethod = indexEntryResolveUndoRef
#endif
foreign import ccall "ggit_index_entry_resolve_undo_unref" ggit_index_entry_resolve_undo_unref ::
Ptr IndexEntryResolveUndo ->
IO ()
indexEntryResolveUndoUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
IndexEntryResolveUndo
-> m ()
indexEntryResolveUndoUnref :: IndexEntryResolveUndo -> m ()
indexEntryResolveUndoUnref IndexEntryResolveUndo
entry = 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 IndexEntryResolveUndo
entry' <- IndexEntryResolveUndo -> IO (Ptr IndexEntryResolveUndo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr IndexEntryResolveUndo
entry
Ptr IndexEntryResolveUndo -> IO ()
ggit_index_entry_resolve_undo_unref Ptr IndexEntryResolveUndo
entry'
IndexEntryResolveUndo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr IndexEntryResolveUndo
entry
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data IndexEntryResolveUndoUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo IndexEntryResolveUndoUnrefMethodInfo IndexEntryResolveUndo signature where
overloadedMethod = indexEntryResolveUndoUnref
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveIndexEntryResolveUndoMethod (t :: Symbol) (o :: *) :: * where
ResolveIndexEntryResolveUndoMethod "ref" o = IndexEntryResolveUndoRefMethodInfo
ResolveIndexEntryResolveUndoMethod "unref" o = IndexEntryResolveUndoUnrefMethodInfo
ResolveIndexEntryResolveUndoMethod "getFile" o = IndexEntryResolveUndoGetFileMethodInfo
ResolveIndexEntryResolveUndoMethod "getId" o = IndexEntryResolveUndoGetIdMethodInfo
ResolveIndexEntryResolveUndoMethod "getMode" o = IndexEntryResolveUndoGetModeMethodInfo
ResolveIndexEntryResolveUndoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveIndexEntryResolveUndoMethod t IndexEntryResolveUndo, O.MethodInfo info IndexEntryResolveUndo p) => OL.IsLabel t (IndexEntryResolveUndo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif