{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gtk.Structs.TreePath ( -- * Exported types TreePath(..) , noTreePath , -- * Methods -- ** treePathAppendIndex treePathAppendIndex , -- ** treePathCompare treePathCompare , -- ** treePathCopy treePathCopy , -- ** treePathDown treePathDown , -- ** treePathFree treePathFree , -- ** treePathGetDepth treePathGetDepth , -- ** treePathGetIndices treePathGetIndices , -- ** treePathIsAncestor treePathIsAncestor , -- ** treePathIsDescendant treePathIsDescendant , -- ** treePathNew treePathNew , -- ** treePathNewFirst treePathNewFirst , -- ** treePathNewFromIndices treePathNewFromIndices , -- ** treePathNewFromString treePathNewFromString , -- ** treePathNext treePathNext , -- ** treePathPrependIndex treePathPrependIndex , -- ** treePathPrev treePathPrev , -- ** treePathToString treePathToString , -- ** treePathUp treePathUp , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gtk.Types import GI.Gtk.Callbacks newtype TreePath = TreePath (ForeignPtr TreePath) foreign import ccall "gtk_tree_path_get_type" c_gtk_tree_path_get_type :: IO GType instance BoxedObject TreePath where boxedType _ = c_gtk_tree_path_get_type noTreePath :: Maybe TreePath noTreePath = Nothing -- method TreePath::new -- method type : Constructor -- Args : [] -- Lengths : [] -- hInArgs : [] -- returnType : TInterface "Gtk" "TreePath" -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_new" gtk_tree_path_new :: IO (Ptr TreePath) treePathNew :: (MonadIO m) => m TreePath treePathNew = liftIO $ do result <- gtk_tree_path_new checkUnexpectedReturnNULL "gtk_tree_path_new" result result' <- (wrapBoxed TreePath) result return result' -- method TreePath::new_first -- method type : Constructor -- Args : [] -- Lengths : [] -- hInArgs : [] -- returnType : TInterface "Gtk" "TreePath" -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_new_first" gtk_tree_path_new_first :: IO (Ptr TreePath) treePathNewFirst :: (MonadIO m) => m TreePath treePathNewFirst = liftIO $ do result <- gtk_tree_path_new_first checkUnexpectedReturnNULL "gtk_tree_path_new_first" result result' <- (wrapBoxed TreePath) result return result' -- method TreePath::new_from_indices -- method type : Constructor -- Args : [Arg {argName = "indices", argType = TCArray False (-1) 1 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- hInArgs : [Arg {argName = "indices", argType = TCArray False (-1) 1 (TBasicType TInt32), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "TreePath" -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_new_from_indicesv" gtk_tree_path_new_from_indicesv :: Ptr Int32 -> -- indices : TCArray False (-1) 1 (TBasicType TInt32) Word64 -> -- length : TBasicType TUInt64 IO (Ptr TreePath) treePathNewFromIndices :: (MonadIO m) => [Int32] -> -- indices m TreePath treePathNewFromIndices indices = liftIO $ do let length_ = fromIntegral $ length indices indices' <- packStorableArray indices result <- gtk_tree_path_new_from_indicesv indices' length_ checkUnexpectedReturnNULL "gtk_tree_path_new_from_indicesv" result result' <- (wrapBoxed TreePath) result freeMem indices' return result' -- method TreePath::new_from_string -- method type : Constructor -- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "TreePath" -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_new_from_string" gtk_tree_path_new_from_string :: CString -> -- path : TBasicType TUTF8 IO (Ptr TreePath) treePathNewFromString :: (MonadIO m) => T.Text -> -- path m TreePath treePathNewFromString path = liftIO $ do path' <- textToCString path result <- gtk_tree_path_new_from_string path' checkUnexpectedReturnNULL "gtk_tree_path_new_from_string" result result' <- (wrapBoxed TreePath) result freeMem path' return result' -- method TreePath::append_index -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_append_index" gtk_tree_path_append_index :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" Int32 -> -- index_ : TBasicType TInt32 IO () treePathAppendIndex :: (MonadIO m) => TreePath -> -- _obj Int32 -> -- index_ m () treePathAppendIndex _obj index_ = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj gtk_tree_path_append_index _obj' index_ touchManagedPtr _obj return () -- method TreePath::compare -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "b", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_compare" gtk_tree_path_compare :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" Ptr TreePath -> -- b : TInterface "Gtk" "TreePath" IO Int32 treePathCompare :: (MonadIO m) => TreePath -> -- _obj TreePath -> -- b m Int32 treePathCompare _obj b = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj let b' = unsafeManagedPtrGetPtr b result <- gtk_tree_path_compare _obj' b' touchManagedPtr _obj touchManagedPtr b return result -- method TreePath::copy -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "TreePath" -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_copy" gtk_tree_path_copy :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO (Ptr TreePath) treePathCopy :: (MonadIO m) => TreePath -> -- _obj m TreePath treePathCopy _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_tree_path_copy _obj' checkUnexpectedReturnNULL "gtk_tree_path_copy" result result' <- (wrapBoxed TreePath) result touchManagedPtr _obj return result' -- method TreePath::down -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_down" gtk_tree_path_down :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO () treePathDown :: (MonadIO m) => TreePath -> -- _obj m () treePathDown _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj gtk_tree_path_down _obj' touchManagedPtr _obj return () -- method TreePath::free -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_free" gtk_tree_path_free :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO () treePathFree :: (MonadIO m) => TreePath -> -- _obj m () treePathFree _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj gtk_tree_path_free _obj' touchManagedPtr _obj return () -- method TreePath::get_depth -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt32 -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_get_depth" gtk_tree_path_get_depth :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO Int32 treePathGetDepth :: (MonadIO m) => TreePath -> -- _obj m Int32 treePathGetDepth _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_tree_path_get_depth _obj' touchManagedPtr _obj return result -- method TreePath::get_indices -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "depth", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [Arg {argName = "depth", argType = TBasicType TInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TCArray False (-1) 1 (TBasicType TInt32) -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_get_indices_with_depth" gtk_tree_path_get_indices_with_depth :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" Ptr Int32 -> -- depth : TBasicType TInt32 IO (Ptr Int32) treePathGetIndices :: (MonadIO m) => TreePath -> -- _obj m [Int32] treePathGetIndices _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj depth <- allocMem :: IO (Ptr Int32) result <- gtk_tree_path_get_indices_with_depth _obj' depth depth' <- peek depth checkUnexpectedReturnNULL "gtk_tree_path_get_indices_with_depth" result result' <- (unpackStorableArrayWithLength depth') result touchManagedPtr _obj freeMem depth return result' -- method TreePath::is_ancestor -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "descendant", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "descendant", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_is_ancestor" gtk_tree_path_is_ancestor :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" Ptr TreePath -> -- descendant : TInterface "Gtk" "TreePath" IO CInt treePathIsAncestor :: (MonadIO m) => TreePath -> -- _obj TreePath -> -- descendant m Bool treePathIsAncestor _obj descendant = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj let descendant' = unsafeManagedPtrGetPtr descendant result <- gtk_tree_path_is_ancestor _obj' descendant' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr descendant return result' -- method TreePath::is_descendant -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ancestor", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "ancestor", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_is_descendant" gtk_tree_path_is_descendant :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" Ptr TreePath -> -- ancestor : TInterface "Gtk" "TreePath" IO CInt treePathIsDescendant :: (MonadIO m) => TreePath -> -- _obj TreePath -> -- ancestor m Bool treePathIsDescendant _obj ancestor = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj let ancestor' = unsafeManagedPtrGetPtr ancestor result <- gtk_tree_path_is_descendant _obj' ancestor' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr ancestor return result' -- method TreePath::next -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_next" gtk_tree_path_next :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO () treePathNext :: (MonadIO m) => TreePath -> -- _obj m () treePathNext _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj gtk_tree_path_next _obj' touchManagedPtr _obj return () -- method TreePath::prepend_index -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "index_", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_prepend_index" gtk_tree_path_prepend_index :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" Int32 -> -- index_ : TBasicType TInt32 IO () treePathPrependIndex :: (MonadIO m) => TreePath -> -- _obj Int32 -> -- index_ m () treePathPrependIndex _obj index_ = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj gtk_tree_path_prepend_index _obj' index_ touchManagedPtr _obj return () -- method TreePath::prev -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_prev" gtk_tree_path_prev :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO CInt treePathPrev :: (MonadIO m) => TreePath -> -- _obj m Bool treePathPrev _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_tree_path_prev _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method TreePath::to_string -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_to_string" gtk_tree_path_to_string :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO CString treePathToString :: (MonadIO m) => TreePath -> -- _obj m T.Text treePathToString _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_tree_path_to_string _obj' checkUnexpectedReturnNULL "gtk_tree_path_to_string" result result' <- cstringToText result freeMem result touchManagedPtr _obj return result' -- method TreePath::up -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_path_up" gtk_tree_path_up :: Ptr TreePath -> -- _obj : TInterface "Gtk" "TreePath" IO CInt treePathUp :: (MonadIO m) => TreePath -> -- _obj m Bool treePathUp _obj = liftIO $ do let _obj' = unsafeManagedPtrGetPtr _obj result <- gtk_tree_path_up _obj' let result' = (/= 0) result touchManagedPtr _obj return result'