{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.TreeIter
(
TreeIter(..) ,
newZeroTreeIter ,
noTreeIter ,
#if defined(ENABLE_OVERLOADING)
ResolveTreeIterMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeIterCopyMethodInfo ,
#endif
treeIterCopy ,
#if defined(ENABLE_OVERLOADING)
TreeIterFreeMethodInfo ,
#endif
treeIterFree ,
getTreeIterStamp ,
setTreeIterStamp ,
#if defined(ENABLE_OVERLOADING)
treeIter_stamp ,
#endif
clearTreeIterUserData ,
getTreeIterUserData ,
setTreeIterUserData ,
#if defined(ENABLE_OVERLOADING)
treeIter_userData ,
#endif
clearTreeIterUserData2 ,
getTreeIterUserData2 ,
setTreeIterUserData2 ,
#if defined(ENABLE_OVERLOADING)
treeIter_userData2 ,
#endif
clearTreeIterUserData3 ,
getTreeIterUserData3 ,
setTreeIterUserData3 ,
#if defined(ENABLE_OVERLOADING)
treeIter_userData3 ,
#endif
) 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.GI.Base.Signals as B.Signals
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
newtype TreeIter = TreeIter (ManagedPtr TreeIter)
deriving (TreeIter -> TreeIter -> Bool
(TreeIter -> TreeIter -> Bool)
-> (TreeIter -> TreeIter -> Bool) -> Eq TreeIter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TreeIter -> TreeIter -> Bool
$c/= :: TreeIter -> TreeIter -> Bool
== :: TreeIter -> TreeIter -> Bool
$c== :: TreeIter -> TreeIter -> Bool
Eq)
foreign import ccall "gtk_tree_iter_get_type" c_gtk_tree_iter_get_type ::
IO GType
instance BoxedObject TreeIter where
boxedType :: TreeIter -> IO GType
boxedType _ = IO GType
c_gtk_tree_iter_get_type
instance B.GValue.IsGValue TreeIter where
toGValue :: TreeIter -> IO GValue
toGValue o :: TreeIter
o = do
GType
gtype <- IO GType
c_gtk_tree_iter_get_type
TreeIter -> (Ptr TreeIter -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TreeIter
o (GType
-> (GValue -> Ptr TreeIter -> IO ()) -> Ptr TreeIter -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr TreeIter -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO TreeIter
fromGValue gv :: GValue
gv = do
Ptr TreeIter
ptr <- GValue -> IO (Ptr TreeIter)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr TreeIter)
(ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr TreeIter -> TreeIter
TreeIter Ptr TreeIter
ptr
newZeroTreeIter :: MonadIO m => m TreeIter
newZeroTreeIter :: m TreeIter
newZeroTreeIter = IO TreeIter -> m TreeIter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeIter -> m TreeIter) -> IO TreeIter -> m TreeIter
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 IO (Ptr TreeIter) -> (Ptr TreeIter -> IO TreeIter) -> IO TreeIter
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
TreeIter
instance tag ~ 'AttrSet => Constructible TreeIter tag where
new :: (ManagedPtr TreeIter -> TreeIter)
-> [AttrOp TreeIter tag] -> m TreeIter
new _ attrs :: [AttrOp TreeIter tag]
attrs = do
TreeIter
o <- m TreeIter
forall (m :: * -> *). MonadIO m => m TreeIter
newZeroTreeIter
TreeIter -> [AttrOp TreeIter 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set TreeIter
o [AttrOp TreeIter tag]
[AttrOp TreeIter 'AttrSet]
attrs
TreeIter -> m TreeIter
forall (m :: * -> *) a. Monad m => a -> m a
return TreeIter
o
noTreeIter :: Maybe TreeIter
noTreeIter :: Maybe TreeIter
noTreeIter = Maybe TreeIter
forall a. Maybe a
Nothing
getTreeIterStamp :: MonadIO m => TreeIter -> m Int32
getTreeIterStamp :: TreeIter -> m Int32
getTreeIterStamp s :: TreeIter
s = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO Int32) -> IO Int32)
-> (Ptr TreeIter -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setTreeIterStamp :: MonadIO m => TreeIter -> Int32 -> m ()
setTreeIterStamp :: TreeIter -> Int32 -> m ()
setTreeIterStamp s :: TreeIter
s val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data TreeIterStampFieldInfo
instance AttrInfo TreeIterStampFieldInfo where
type AttrBaseTypeConstraint TreeIterStampFieldInfo = (~) TreeIter
type AttrAllowedOps TreeIterStampFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint TreeIterStampFieldInfo = (~) Int32
type AttrTransferTypeConstraint TreeIterStampFieldInfo = (~)Int32
type AttrTransferType TreeIterStampFieldInfo = Int32
type AttrGetType TreeIterStampFieldInfo = Int32
type AttrLabel TreeIterStampFieldInfo = "stamp"
type AttrOrigin TreeIterStampFieldInfo = TreeIter
attrGet = getTreeIterStamp
attrSet = setTreeIterStamp
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
treeIter_stamp :: AttrLabelProxy "stamp"
treeIter_stamp = AttrLabelProxy
#endif
getTreeIterUserData :: MonadIO m => TreeIter -> m (Ptr ())
getTreeIterUserData :: TreeIter -> m (Ptr ())
getTreeIterUserData s :: TreeIter
s = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ())
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr ()
val <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO (Ptr ())
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
val
setTreeIterUserData :: MonadIO m => TreeIter -> Ptr () -> m ()
setTreeIterUserData :: TreeIter -> Ptr () -> m ()
setTreeIterUserData s :: TreeIter
s val :: Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (Ptr ()
val :: Ptr ())
clearTreeIterUserData :: MonadIO m => TreeIter -> m ()
clearTreeIterUserData :: TreeIter -> m ()
clearTreeIterUserData s :: TreeIter
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())
#if defined(ENABLE_OVERLOADING)
data TreeIterUserDataFieldInfo
instance AttrInfo TreeIterUserDataFieldInfo where
type AttrBaseTypeConstraint TreeIterUserDataFieldInfo = (~) TreeIter
type AttrAllowedOps TreeIterUserDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TreeIterUserDataFieldInfo = (~) (Ptr ())
type AttrTransferTypeConstraint TreeIterUserDataFieldInfo = (~)(Ptr ())
type AttrTransferType TreeIterUserDataFieldInfo = (Ptr ())
type AttrGetType TreeIterUserDataFieldInfo = Ptr ()
type AttrLabel TreeIterUserDataFieldInfo = "user_data"
type AttrOrigin TreeIterUserDataFieldInfo = TreeIter
attrGet = getTreeIterUserData
attrSet = setTreeIterUserData
attrConstruct = undefined
attrClear = clearTreeIterUserData
attrTransfer _ v = do
return v
treeIter_userData :: AttrLabelProxy "userData"
treeIter_userData = AttrLabelProxy
#endif
getTreeIterUserData2 :: MonadIO m => TreeIter -> m (Ptr ())
getTreeIterUserData2 :: TreeIter -> m (Ptr ())
getTreeIterUserData2 s :: TreeIter
s = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ())
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr ()
val <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO (Ptr ())
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
val
setTreeIterUserData2 :: MonadIO m => TreeIter -> Ptr () -> m ()
setTreeIterUserData2 :: TreeIter -> Ptr () -> m ()
setTreeIterUserData2 s :: TreeIter
s val :: Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (Ptr ()
val :: Ptr ())
clearTreeIterUserData2 :: MonadIO m => TreeIter -> m ()
clearTreeIterUserData2 :: TreeIter -> m ()
clearTreeIterUserData2 s :: TreeIter
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())
#if defined(ENABLE_OVERLOADING)
data TreeIterUserData2FieldInfo
instance AttrInfo TreeIterUserData2FieldInfo where
type AttrBaseTypeConstraint TreeIterUserData2FieldInfo = (~) TreeIter
type AttrAllowedOps TreeIterUserData2FieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TreeIterUserData2FieldInfo = (~) (Ptr ())
type AttrTransferTypeConstraint TreeIterUserData2FieldInfo = (~)(Ptr ())
type AttrTransferType TreeIterUserData2FieldInfo = (Ptr ())
type AttrGetType TreeIterUserData2FieldInfo = Ptr ()
type AttrLabel TreeIterUserData2FieldInfo = "user_data2"
type AttrOrigin TreeIterUserData2FieldInfo = TreeIter
attrGet = getTreeIterUserData2
attrSet = setTreeIterUserData2
attrConstruct = undefined
attrClear = clearTreeIterUserData2
attrTransfer _ v = do
return v
treeIter_userData2 :: AttrLabelProxy "userData2"
treeIter_userData2 = AttrLabelProxy
#endif
getTreeIterUserData3 :: MonadIO m => TreeIter -> m (Ptr ())
getTreeIterUserData3 :: TreeIter -> m (Ptr ())
getTreeIterUserData3 s :: TreeIter
s = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ())
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr TreeIter -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr ()
val <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO (Ptr ())
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
val
setTreeIterUserData3 :: MonadIO m => TreeIter -> Ptr () -> m ()
setTreeIterUserData3 :: TreeIter -> Ptr () -> m ()
setTreeIterUserData3 s :: TreeIter
s val :: Ptr ()
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (Ptr ()
val :: Ptr ())
clearTreeIterUserData3 :: MonadIO m => TreeIter -> m ()
clearTreeIterUserData3 :: TreeIter -> m ()
clearTreeIterUserData3 s :: TreeIter
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ TreeIter -> (Ptr TreeIter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr TreeIter
s ((Ptr TreeIter -> IO ()) -> IO ())
-> (Ptr TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr TreeIter
ptr -> do
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr TreeIter
ptr Ptr TreeIter -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (Ptr ()
forall a. Ptr a
FP.nullPtr :: Ptr ())
#if defined(ENABLE_OVERLOADING)
data TreeIterUserData3FieldInfo
instance AttrInfo TreeIterUserData3FieldInfo where
type AttrBaseTypeConstraint TreeIterUserData3FieldInfo = (~) TreeIter
type AttrAllowedOps TreeIterUserData3FieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint TreeIterUserData3FieldInfo = (~) (Ptr ())
type AttrTransferTypeConstraint TreeIterUserData3FieldInfo = (~)(Ptr ())
type AttrTransferType TreeIterUserData3FieldInfo = (Ptr ())
type AttrGetType TreeIterUserData3FieldInfo = Ptr ()
type AttrLabel TreeIterUserData3FieldInfo = "user_data3"
type AttrOrigin TreeIterUserData3FieldInfo = TreeIter
attrGet = getTreeIterUserData3
attrSet = setTreeIterUserData3
attrConstruct = undefined
attrClear = clearTreeIterUserData3
attrTransfer _ v = do
return v
treeIter_userData3 :: AttrLabelProxy "userData3"
treeIter_userData3 = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TreeIter
type instance O.AttributeList TreeIter = TreeIterAttributeList
type TreeIterAttributeList = ('[ '("stamp", TreeIterStampFieldInfo), '("userData", TreeIterUserDataFieldInfo), '("userData2", TreeIterUserData2FieldInfo), '("userData3", TreeIterUserData3FieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_iter_copy" gtk_tree_iter_copy ::
Ptr TreeIter ->
IO (Ptr TreeIter)
treeIterCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeIter
-> m TreeIter
treeIterCopy :: TreeIter -> m TreeIter
treeIterCopy iter :: TreeIter
iter = IO TreeIter -> m TreeIter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeIter -> m TreeIter) -> IO TreeIter -> m TreeIter
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeIter
result <- Ptr TreeIter -> IO (Ptr TreeIter)
gtk_tree_iter_copy Ptr TreeIter
iter'
Text -> Ptr TreeIter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "treeIterCopy" Ptr TreeIter
result
TreeIter
result' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
TreeIter) Ptr TreeIter
result
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
TreeIter -> IO TreeIter
forall (m :: * -> *) a. Monad m => a -> m a
return TreeIter
result'
#if defined(ENABLE_OVERLOADING)
data TreeIterCopyMethodInfo
instance (signature ~ (m TreeIter), MonadIO m) => O.MethodInfo TreeIterCopyMethodInfo TreeIter signature where
overloadedMethod = treeIterCopy
#endif
foreign import ccall "gtk_tree_iter_free" gtk_tree_iter_free ::
Ptr TreeIter ->
IO ()
treeIterFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeIter
-> m ()
treeIterFree :: TreeIter -> m ()
treeIterFree iter :: TreeIter
iter = 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 TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeIter -> IO ()
gtk_tree_iter_free Ptr TreeIter
iter'
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeIterFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo TreeIterFreeMethodInfo TreeIter signature where
overloadedMethod = treeIterFree
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTreeIterMethod (t :: Symbol) (o :: *) :: * where
ResolveTreeIterMethod "copy" o = TreeIterCopyMethodInfo
ResolveTreeIterMethod "free" o = TreeIterFreeMethodInfo
ResolveTreeIterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreeIterMethod t TreeIter, O.MethodInfo info TreeIter p) => OL.IsLabel t (TreeIter -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif