{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Structs.TreeRowReference
(
TreeRowReference(..) ,
#if defined(ENABLE_OVERLOADING)
ResolveTreeRowReferenceMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeRowReferenceCopyMethodInfo ,
#endif
treeRowReferenceCopy ,
treeRowReferenceDeleted ,
#if defined(ENABLE_OVERLOADING)
TreeRowReferenceFreeMethodInfo ,
#endif
treeRowReferenceFree ,
#if defined(ENABLE_OVERLOADING)
TreeRowReferenceGetModelMethodInfo ,
#endif
treeRowReferenceGetModel ,
#if defined(ENABLE_OVERLOADING)
TreeRowReferenceGetPathMethodInfo ,
#endif
treeRowReferenceGetPath ,
treeRowReferenceInserted ,
treeRowReferenceNew ,
treeRowReferenceNewProxy ,
#if defined(ENABLE_OVERLOADING)
TreeRowReferenceValidMethodInfo ,
#endif
treeRowReferenceValid ,
) 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 qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.TreeModel as Gtk.TreeModel
import {-# SOURCE #-} qualified GI.Gtk.Structs.TreePath as Gtk.TreePath
newtype TreeRowReference = TreeRowReference (SP.ManagedPtr TreeRowReference)
deriving (TreeRowReference -> TreeRowReference -> Bool
(TreeRowReference -> TreeRowReference -> Bool)
-> (TreeRowReference -> TreeRowReference -> Bool)
-> Eq TreeRowReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TreeRowReference -> TreeRowReference -> Bool
$c/= :: TreeRowReference -> TreeRowReference -> Bool
== :: TreeRowReference -> TreeRowReference -> Bool
$c== :: TreeRowReference -> TreeRowReference -> Bool
Eq)
instance SP.ManagedPtrNewtype TreeRowReference where
toManagedPtr :: TreeRowReference -> ManagedPtr TreeRowReference
toManagedPtr (TreeRowReference ManagedPtr TreeRowReference
p) = ManagedPtr TreeRowReference
p
foreign import ccall "gtk_tree_row_reference_get_type" c_gtk_tree_row_reference_get_type ::
IO GType
type instance O.ParentTypes TreeRowReference = '[]
instance O.HasParentTypes TreeRowReference
instance B.Types.TypedObject TreeRowReference where
glibType :: IO GType
glibType = IO GType
c_gtk_tree_row_reference_get_type
instance B.Types.GBoxed TreeRowReference
instance B.GValue.IsGValue (Maybe TreeRowReference) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_tree_row_reference_get_type
gvalueSet_ :: Ptr GValue -> Maybe TreeRowReference -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TreeRowReference
P.Nothing = Ptr GValue -> Ptr TreeRowReference -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr TreeRowReference
forall a. Ptr a
FP.nullPtr :: FP.Ptr TreeRowReference)
gvalueSet_ Ptr GValue
gv (P.Just TreeRowReference
obj) = TreeRowReference -> (Ptr TreeRowReference -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TreeRowReference
obj (Ptr GValue -> Ptr TreeRowReference -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TreeRowReference)
gvalueGet_ Ptr GValue
gv = do
Ptr TreeRowReference
ptr <- Ptr GValue -> IO (Ptr TreeRowReference)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr TreeRowReference)
if Ptr TreeRowReference
ptr Ptr TreeRowReference -> Ptr TreeRowReference -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr TreeRowReference
forall a. Ptr a
FP.nullPtr
then TreeRowReference -> Maybe TreeRowReference
forall a. a -> Maybe a
P.Just (TreeRowReference -> Maybe TreeRowReference)
-> IO TreeRowReference -> IO (Maybe TreeRowReference)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr TreeRowReference -> TreeRowReference)
-> Ptr TreeRowReference -> IO TreeRowReference
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr TreeRowReference -> TreeRowReference
TreeRowReference Ptr TreeRowReference
ptr
else Maybe TreeRowReference -> IO (Maybe TreeRowReference)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeRowReference
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TreeRowReference
type instance O.AttributeList TreeRowReference = TreeRowReferenceAttributeList
type TreeRowReferenceAttributeList = ('[ ] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_row_reference_new" gtk_tree_row_reference_new ::
Ptr Gtk.TreeModel.TreeModel ->
Ptr Gtk.TreePath.TreePath ->
IO (Ptr TreeRowReference)
treeRowReferenceNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.TreeModel.IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> m TreeRowReference
treeRowReferenceNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTreeModel a) =>
a -> TreePath -> m TreeRowReference
treeRowReferenceNew a
model TreePath
path = IO TreeRowReference -> m TreeRowReference
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeRowReference -> m TreeRowReference)
-> IO TreeRowReference -> m TreeRowReference
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeRowReference
result <- Ptr TreeModel -> Ptr TreePath -> IO (Ptr TreeRowReference)
gtk_tree_row_reference_new Ptr TreeModel
model' Ptr TreePath
path'
Text -> Ptr TreeRowReference -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treeRowReferenceNew" Ptr TreeRowReference
result
TreeRowReference
result' <- ((ManagedPtr TreeRowReference -> TreeRowReference)
-> Ptr TreeRowReference -> IO TreeRowReference
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeRowReference -> TreeRowReference
TreeRowReference) Ptr TreeRowReference
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
TreeRowReference -> IO TreeRowReference
forall (m :: * -> *) a. Monad m => a -> m a
return TreeRowReference
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_row_reference_new_proxy" gtk_tree_row_reference_new_proxy ::
Ptr GObject.Object.Object ->
Ptr Gtk.TreeModel.TreeModel ->
Ptr Gtk.TreePath.TreePath ->
IO (Ptr TreeRowReference)
treeRowReferenceNewProxy ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a, Gtk.TreeModel.IsTreeModel b) =>
a
-> b
-> Gtk.TreePath.TreePath
-> m TreeRowReference
treeRowReferenceNewProxy :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsObject a, IsTreeModel b) =>
a -> b -> TreePath -> m TreeRowReference
treeRowReferenceNewProxy a
proxy b
model TreePath
path = IO TreeRowReference -> m TreeRowReference
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeRowReference -> m TreeRowReference)
-> IO TreeRowReference -> m TreeRowReference
forall a b. (a -> b) -> a -> b
$ do
Ptr Object
proxy' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
Ptr TreeModel
model' <- b -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
model
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeRowReference
result <- Ptr Object
-> Ptr TreeModel -> Ptr TreePath -> IO (Ptr TreeRowReference)
gtk_tree_row_reference_new_proxy Ptr Object
proxy' Ptr TreeModel
model' Ptr TreePath
path'
Text -> Ptr TreeRowReference -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treeRowReferenceNewProxy" Ptr TreeRowReference
result
TreeRowReference
result' <- ((ManagedPtr TreeRowReference -> TreeRowReference)
-> Ptr TreeRowReference -> IO TreeRowReference
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeRowReference -> TreeRowReference
TreeRowReference) Ptr TreeRowReference
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
proxy
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
model
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
TreeRowReference -> IO TreeRowReference
forall (m :: * -> *) a. Monad m => a -> m a
return TreeRowReference
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_row_reference_copy" gtk_tree_row_reference_copy ::
Ptr TreeRowReference ->
IO (Ptr TreeRowReference)
treeRowReferenceCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeRowReference
-> m TreeRowReference
treeRowReferenceCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreeRowReference -> m TreeRowReference
treeRowReferenceCopy TreeRowReference
reference = IO TreeRowReference -> m TreeRowReference
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeRowReference -> m TreeRowReference)
-> IO TreeRowReference -> m TreeRowReference
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeRowReference
reference' <- TreeRowReference -> IO (Ptr TreeRowReference)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeRowReference
reference
Ptr TreeRowReference
result <- Ptr TreeRowReference -> IO (Ptr TreeRowReference)
gtk_tree_row_reference_copy Ptr TreeRowReference
reference'
Text -> Ptr TreeRowReference -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treeRowReferenceCopy" Ptr TreeRowReference
result
TreeRowReference
result' <- ((ManagedPtr TreeRowReference -> TreeRowReference)
-> Ptr TreeRowReference -> IO TreeRowReference
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeRowReference -> TreeRowReference
TreeRowReference) Ptr TreeRowReference
result
TreeRowReference -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeRowReference
reference
TreeRowReference -> IO TreeRowReference
forall (m :: * -> *) a. Monad m => a -> m a
return TreeRowReference
result'
#if defined(ENABLE_OVERLOADING)
data TreeRowReferenceCopyMethodInfo
instance (signature ~ (m TreeRowReference), MonadIO m) => O.OverloadedMethod TreeRowReferenceCopyMethodInfo TreeRowReference signature where
overloadedMethod = treeRowReferenceCopy
instance O.OverloadedMethodInfo TreeRowReferenceCopyMethodInfo TreeRowReference where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Structs.TreeRowReference.treeRowReferenceCopy",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Structs-TreeRowReference.html#v:treeRowReferenceCopy"
}
#endif
foreign import ccall "gtk_tree_row_reference_free" gtk_tree_row_reference_free ::
Ptr TreeRowReference ->
IO ()
treeRowReferenceFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeRowReference
-> m ()
treeRowReferenceFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreeRowReference -> m ()
treeRowReferenceFree TreeRowReference
reference = 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 TreeRowReference
reference' <- TreeRowReference -> IO (Ptr TreeRowReference)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeRowReference
reference
Ptr TreeRowReference -> IO ()
gtk_tree_row_reference_free Ptr TreeRowReference
reference'
TreeRowReference -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeRowReference
reference
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeRowReferenceFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod TreeRowReferenceFreeMethodInfo TreeRowReference signature where
overloadedMethod = treeRowReferenceFree
instance O.OverloadedMethodInfo TreeRowReferenceFreeMethodInfo TreeRowReference where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Structs.TreeRowReference.treeRowReferenceFree",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Structs-TreeRowReference.html#v:treeRowReferenceFree"
}
#endif
foreign import ccall "gtk_tree_row_reference_get_model" gtk_tree_row_reference_get_model ::
Ptr TreeRowReference ->
IO (Ptr Gtk.TreeModel.TreeModel)
treeRowReferenceGetModel ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeRowReference
-> m Gtk.TreeModel.TreeModel
treeRowReferenceGetModel :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreeRowReference -> m TreeModel
treeRowReferenceGetModel TreeRowReference
reference = IO TreeModel -> m TreeModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeModel -> m TreeModel) -> IO TreeModel -> m TreeModel
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeRowReference
reference' <- TreeRowReference -> IO (Ptr TreeRowReference)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeRowReference
reference
Ptr TreeModel
result <- Ptr TreeRowReference -> IO (Ptr TreeModel)
gtk_tree_row_reference_get_model Ptr TreeRowReference
reference'
Text -> Ptr TreeModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treeRowReferenceGetModel" Ptr TreeModel
result
TreeModel
result' <- ((ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TreeModel -> TreeModel
Gtk.TreeModel.TreeModel) Ptr TreeModel
result
TreeRowReference -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeRowReference
reference
TreeModel -> IO TreeModel
forall (m :: * -> *) a. Monad m => a -> m a
return TreeModel
result'
#if defined(ENABLE_OVERLOADING)
data TreeRowReferenceGetModelMethodInfo
instance (signature ~ (m Gtk.TreeModel.TreeModel), MonadIO m) => O.OverloadedMethod TreeRowReferenceGetModelMethodInfo TreeRowReference signature where
overloadedMethod = treeRowReferenceGetModel
instance O.OverloadedMethodInfo TreeRowReferenceGetModelMethodInfo TreeRowReference where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Structs.TreeRowReference.treeRowReferenceGetModel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Structs-TreeRowReference.html#v:treeRowReferenceGetModel"
}
#endif
foreign import ccall "gtk_tree_row_reference_get_path" gtk_tree_row_reference_get_path ::
Ptr TreeRowReference ->
IO (Ptr Gtk.TreePath.TreePath)
treeRowReferenceGetPath ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeRowReference
-> m (Maybe Gtk.TreePath.TreePath)
treeRowReferenceGetPath :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreeRowReference -> m (Maybe TreePath)
treeRowReferenceGetPath TreeRowReference
reference = IO (Maybe TreePath) -> m (Maybe TreePath)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreePath) -> m (Maybe TreePath))
-> IO (Maybe TreePath) -> m (Maybe TreePath)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeRowReference
reference' <- TreeRowReference -> IO (Ptr TreeRowReference)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeRowReference
reference
Ptr TreePath
result <- Ptr TreeRowReference -> IO (Ptr TreePath)
gtk_tree_row_reference_get_path Ptr TreeRowReference
reference'
Maybe TreePath
maybeResult <- Ptr TreePath
-> (Ptr TreePath -> IO TreePath) -> IO (Maybe TreePath)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreePath
result ((Ptr TreePath -> IO TreePath) -> IO (Maybe TreePath))
-> (Ptr TreePath -> IO TreePath) -> IO (Maybe TreePath)
forall a b. (a -> b) -> a -> b
$ \Ptr TreePath
result' -> do
TreePath
result'' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath) Ptr TreePath
result'
TreePath -> IO TreePath
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result''
TreeRowReference -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeRowReference
reference
Maybe TreePath -> IO (Maybe TreePath)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreePath
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreeRowReferenceGetPathMethodInfo
instance (signature ~ (m (Maybe Gtk.TreePath.TreePath)), MonadIO m) => O.OverloadedMethod TreeRowReferenceGetPathMethodInfo TreeRowReference signature where
overloadedMethod = treeRowReferenceGetPath
instance O.OverloadedMethodInfo TreeRowReferenceGetPathMethodInfo TreeRowReference where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Structs.TreeRowReference.treeRowReferenceGetPath",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Structs-TreeRowReference.html#v:treeRowReferenceGetPath"
}
#endif
foreign import ccall "gtk_tree_row_reference_valid" gtk_tree_row_reference_valid ::
Ptr TreeRowReference ->
IO CInt
treeRowReferenceValid ::
(B.CallStack.HasCallStack, MonadIO m) =>
TreeRowReference
-> m Bool
treeRowReferenceValid :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TreeRowReference -> m Bool
treeRowReferenceValid TreeRowReference
reference = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeRowReference
reference' <- TreeRowReference -> IO (Ptr TreeRowReference)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeRowReference
reference
CInt
result <- Ptr TreeRowReference -> IO CInt
gtk_tree_row_reference_valid Ptr TreeRowReference
reference'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
TreeRowReference -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeRowReference
reference
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreeRowReferenceValidMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod TreeRowReferenceValidMethodInfo TreeRowReference signature where
overloadedMethod = treeRowReferenceValid
instance O.OverloadedMethodInfo TreeRowReferenceValidMethodInfo TreeRowReference where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Structs.TreeRowReference.treeRowReferenceValid",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Structs-TreeRowReference.html#v:treeRowReferenceValid"
}
#endif
foreign import ccall "gtk_tree_row_reference_deleted" gtk_tree_row_reference_deleted ::
Ptr GObject.Object.Object ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeRowReferenceDeleted ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
a
-> Gtk.TreePath.TreePath
-> m ()
treeRowReferenceDeleted :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> TreePath -> m ()
treeRowReferenceDeleted a
proxy TreePath
path = 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 Object
proxy' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr Object -> Ptr TreePath -> IO ()
gtk_tree_row_reference_deleted Ptr Object
proxy' Ptr TreePath
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
proxy
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_row_reference_inserted" gtk_tree_row_reference_inserted ::
Ptr GObject.Object.Object ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeRowReferenceInserted ::
(B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) =>
a
-> Gtk.TreePath.TreePath
-> m ()
treeRowReferenceInserted :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsObject a) =>
a -> TreePath -> m ()
treeRowReferenceInserted a
proxy TreePath
path = 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 Object
proxy' <- a -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr Object -> Ptr TreePath -> IO ()
gtk_tree_row_reference_inserted Ptr Object
proxy' Ptr TreePath
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
proxy
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTreeRowReferenceMethod (t :: Symbol) (o :: *) :: * where
ResolveTreeRowReferenceMethod "copy" o = TreeRowReferenceCopyMethodInfo
ResolveTreeRowReferenceMethod "free" o = TreeRowReferenceFreeMethodInfo
ResolveTreeRowReferenceMethod "valid" o = TreeRowReferenceValidMethodInfo
ResolveTreeRowReferenceMethod "getModel" o = TreeRowReferenceGetModelMethodInfo
ResolveTreeRowReferenceMethod "getPath" o = TreeRowReferenceGetPathMethodInfo
ResolveTreeRowReferenceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreeRowReferenceMethod t TreeRowReference, O.OverloadedMethod info TreeRowReference p) => OL.IsLabel t (TreeRowReference -> 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 ~ ResolveTreeRowReferenceMethod t TreeRowReference, O.OverloadedMethod info TreeRowReference p, R.HasField t TreeRowReference p) => R.HasField t TreeRowReference p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTreeRowReferenceMethod t TreeRowReference, O.OverloadedMethodInfo info TreeRowReference) => OL.IsLabel t (O.MethodProxy info TreeRowReference) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif