{- |
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.Objects.TreeModelFilter
    ( 

-- * Exported types
    TreeModelFilter(..)                     ,
    TreeModelFilterK                        ,
    toTreeModelFilter                       ,
    noTreeModelFilter                       ,


 -- * Methods
-- ** treeModelFilterClearCache
    treeModelFilterClearCache               ,


-- ** treeModelFilterConvertChildIterToIter
    treeModelFilterConvertChildIterToIter   ,


-- ** treeModelFilterConvertChildPathToPath
    treeModelFilterConvertChildPathToPath   ,


-- ** treeModelFilterConvertIterToChildIter
    treeModelFilterConvertIterToChildIter   ,


-- ** treeModelFilterConvertPathToChildPath
    treeModelFilterConvertPathToChildPath   ,


-- ** treeModelFilterGetModel
    treeModelFilterGetModel                 ,


-- ** treeModelFilterRefilter
    treeModelFilterRefilter                 ,


-- ** treeModelFilterSetVisibleColumn
    treeModelFilterSetVisibleColumn         ,


-- ** treeModelFilterSetVisibleFunc
    treeModelFilterSetVisibleFunc           ,




 -- * Properties
-- ** ChildModel
    TreeModelFilterChildModelPropertyInfo   ,
    constructTreeModelFilterChildModel      ,
    getTreeModelFilterChildModel            ,


-- ** VirtualRoot
    TreeModelFilterVirtualRootPropertyInfo  ,
    constructTreeModelFilterVirtualRoot     ,
    getTreeModelFilterVirtualRoot           ,




    ) 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
import qualified GI.GLib as GLib
import qualified GI.GObject as GObject

newtype TreeModelFilter = TreeModelFilter (ForeignPtr TreeModelFilter)
foreign import ccall "gtk_tree_model_filter_get_type"
    c_gtk_tree_model_filter_get_type :: IO GType

type instance ParentTypes TreeModelFilter = TreeModelFilterParentTypes
type TreeModelFilterParentTypes = '[GObject.Object, TreeDragSource, TreeModel]

instance GObject TreeModelFilter where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_tree_model_filter_get_type
    

class GObject o => TreeModelFilterK o
instance (GObject o, IsDescendantOf TreeModelFilter o) => TreeModelFilterK o

toTreeModelFilter :: TreeModelFilterK o => o -> IO TreeModelFilter
toTreeModelFilter = unsafeCastTo TreeModelFilter

noTreeModelFilter :: Maybe TreeModelFilter
noTreeModelFilter = Nothing

-- VVV Prop "child-model"
   -- Type: TInterface "Gtk" "TreeModel"
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]

getTreeModelFilterChildModel :: (MonadIO m, TreeModelFilterK o) => o -> m TreeModel
getTreeModelFilterChildModel obj = liftIO $ getObjectPropertyObject obj "child-model" TreeModel

constructTreeModelFilterChildModel :: (TreeModelK a) => a -> IO ([Char], GValue)
constructTreeModelFilterChildModel val = constructObjectPropertyObject "child-model" val

data TreeModelFilterChildModelPropertyInfo
instance AttrInfo TreeModelFilterChildModelPropertyInfo where
    type AttrAllowedOps TreeModelFilterChildModelPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint TreeModelFilterChildModelPropertyInfo = TreeModelK
    type AttrBaseTypeConstraint TreeModelFilterChildModelPropertyInfo = TreeModelFilterK
    type AttrGetType TreeModelFilterChildModelPropertyInfo = TreeModel
    type AttrLabel TreeModelFilterChildModelPropertyInfo = "TreeModelFilter::child-model"
    attrGet _ = getTreeModelFilterChildModel
    attrSet _ = undefined
    attrConstruct _ = constructTreeModelFilterChildModel

-- VVV Prop "virtual-root"
   -- Type: TInterface "Gtk" "TreePath"
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]

getTreeModelFilterVirtualRoot :: (MonadIO m, TreeModelFilterK o) => o -> m TreePath
getTreeModelFilterVirtualRoot obj = liftIO $ getObjectPropertyBoxed obj "virtual-root" TreePath

constructTreeModelFilterVirtualRoot :: TreePath -> IO ([Char], GValue)
constructTreeModelFilterVirtualRoot val = constructObjectPropertyBoxed "virtual-root" val

data TreeModelFilterVirtualRootPropertyInfo
instance AttrInfo TreeModelFilterVirtualRootPropertyInfo where
    type AttrAllowedOps TreeModelFilterVirtualRootPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint TreeModelFilterVirtualRootPropertyInfo = (~) TreePath
    type AttrBaseTypeConstraint TreeModelFilterVirtualRootPropertyInfo = TreeModelFilterK
    type AttrGetType TreeModelFilterVirtualRootPropertyInfo = TreePath
    type AttrLabel TreeModelFilterVirtualRootPropertyInfo = "TreeModelFilter::virtual-root"
    attrGet _ = getTreeModelFilterVirtualRoot
    attrSet _ = undefined
    attrConstruct _ = constructTreeModelFilterVirtualRoot

type instance AttributeList TreeModelFilter = TreeModelFilterAttributeList
type TreeModelFilterAttributeList = ('[ '("child-model", TreeModelFilterChildModelPropertyInfo), '("virtual-root", TreeModelFilterVirtualRootPropertyInfo)] :: [(Symbol, *)])

type instance SignalList TreeModelFilter = TreeModelFilterSignalList
type TreeModelFilterSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("row-changed", TreeModelRowChangedSignalInfo), '("row-deleted", TreeModelRowDeletedSignalInfo), '("row-has-child-toggled", TreeModelRowHasChildToggledSignalInfo), '("row-inserted", TreeModelRowInsertedSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method TreeModelFilter::clear_cache
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", 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_model_filter_clear_cache" gtk_tree_model_filter_clear_cache :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    IO ()


treeModelFilterClearCache ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    m ()
treeModelFilterClearCache _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_filter_clear_cache _obj'
    touchManagedPtr _obj
    return ()

-- method TreeModelFilter::convert_child_iter_to_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", 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_model_filter_convert_child_iter_to_iter" gtk_tree_model_filter_convert_child_iter_to_iter :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreeIter ->                         -- filter_iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- child_iter : TInterface "Gtk" "TreeIter"
    IO CInt


treeModelFilterConvertChildIterToIter ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- child_iter
    m (Bool,TreeIter)
treeModelFilterConvertChildIterToIter _obj child_iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    filter_iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let child_iter' = unsafeManagedPtrGetPtr child_iter
    result <- gtk_tree_model_filter_convert_child_iter_to_iter _obj' filter_iter child_iter'
    let result' = (/= 0) result
    filter_iter' <- (wrapBoxed TreeIter) filter_iter
    touchManagedPtr _obj
    touchManagedPtr child_iter
    return (result', filter_iter')

-- method TreeModelFilter::convert_child_path_to_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_path", 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_model_filter_convert_child_path_to_path" gtk_tree_model_filter_convert_child_path_to_path :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreePath ->                         -- child_path : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treeModelFilterConvertChildPathToPath ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- child_path
    m TreePath
treeModelFilterConvertChildPathToPath _obj child_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let child_path' = unsafeManagedPtrGetPtr child_path
    result <- gtk_tree_model_filter_convert_child_path_to_path _obj' child_path'
    checkUnexpectedReturnNULL "gtk_tree_model_filter_convert_child_path_to_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr child_path
    return result'

-- method TreeModelFilter::convert_iter_to_child_iter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_iter", argType = TInterface "Gtk" "TreeIter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_iter", argType = TInterface "Gtk" "TreeIter", 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_model_filter_convert_iter_to_child_iter" gtk_tree_model_filter_convert_iter_to_child_iter :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreeIter ->                         -- child_iter : TInterface "Gtk" "TreeIter"
    Ptr TreeIter ->                         -- filter_iter : TInterface "Gtk" "TreeIter"
    IO ()


treeModelFilterConvertIterToChildIter ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreeIter ->                             -- filter_iter
    m (TreeIter)
treeModelFilterConvertIterToChildIter _obj filter_iter = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    child_iter <- callocBoxedBytes 32 :: IO (Ptr TreeIter)
    let filter_iter' = unsafeManagedPtrGetPtr filter_iter
    gtk_tree_model_filter_convert_iter_to_child_iter _obj' child_iter filter_iter'
    child_iter' <- (wrapBoxed TreeIter) child_iter
    touchManagedPtr _obj
    touchManagedPtr filter_iter
    return child_iter'

-- method TreeModelFilter::convert_path_to_child_path
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "filter_path", 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_model_filter_convert_path_to_child_path" gtk_tree_model_filter_convert_path_to_child_path :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Ptr TreePath ->                         -- filter_path : TInterface "Gtk" "TreePath"
    IO (Ptr TreePath)


treeModelFilterConvertPathToChildPath ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreePath ->                             -- filter_path
    m TreePath
treeModelFilterConvertPathToChildPath _obj filter_path = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let filter_path' = unsafeManagedPtrGetPtr filter_path
    result <- gtk_tree_model_filter_convert_path_to_child_path _obj' filter_path'
    checkUnexpectedReturnNULL "gtk_tree_model_filter_convert_path_to_child_path" result
    result' <- (wrapBoxed TreePath) result
    touchManagedPtr _obj
    touchManagedPtr filter_path
    return result'

-- method TreeModelFilter::get_model
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "TreeModel"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_get_model" gtk_tree_model_filter_get_model :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    IO (Ptr TreeModel)


treeModelFilterGetModel ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    m TreeModel
treeModelFilterGetModel _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tree_model_filter_get_model _obj'
    checkUnexpectedReturnNULL "gtk_tree_model_filter_get_model" result
    result' <- (newObject TreeModel) result
    touchManagedPtr _obj
    return result'

-- method TreeModelFilter::refilter
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", 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_model_filter_refilter" gtk_tree_model_filter_refilter :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    IO ()


treeModelFilterRefilter ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    m ()
treeModelFilterRefilter _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_filter_refilter _obj'
    touchManagedPtr _obj
    return ()

-- method TreeModelFilter::set_visible_column
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "column", 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_model_filter_set_visible_column" gtk_tree_model_filter_set_visible_column :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    Int32 ->                                -- column : TBasicType TInt32
    IO ()


treeModelFilterSetVisibleColumn ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    Int32 ->                                -- column
    m ()
treeModelFilterSetVisibleColumn _obj column = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tree_model_filter_set_visible_column _obj' column
    touchManagedPtr _obj
    return ()

-- method TreeModelFilter::set_visible_func
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeModelFilterVisibleFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing},Arg {argName = "data", argType = TBasicType TVoid, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "destroy", argType = TInterface "GLib" "DestroyNotify", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeAsync, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeModelFilter", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "func", argType = TInterface "Gtk" "TreeModelFilterVisibleFunc", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeNotified, argClosure = 2, argDestroy = 3, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tree_model_filter_set_visible_func" gtk_tree_model_filter_set_visible_func :: 
    Ptr TreeModelFilter ->                  -- _obj : TInterface "Gtk" "TreeModelFilter"
    FunPtr TreeModelFilterVisibleFuncC ->   -- func : TInterface "Gtk" "TreeModelFilterVisibleFunc"
    Ptr () ->                               -- data : TBasicType TVoid
    FunPtr GLib.DestroyNotifyC ->           -- destroy : TInterface "GLib" "DestroyNotify"
    IO ()


treeModelFilterSetVisibleFunc ::
    (MonadIO m, TreeModelFilterK a) =>
    a ->                                    -- _obj
    TreeModelFilterVisibleFunc ->           -- func
    m ()
treeModelFilterSetVisibleFunc _obj func = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    func' <- mkTreeModelFilterVisibleFunc (treeModelFilterVisibleFuncWrapper Nothing func)
    let data_ = castFunPtrToPtr func'
    let destroy = safeFreeFunPtrPtr
    gtk_tree_model_filter_set_visible_func _obj' func' data_ destroy
    touchManagedPtr _obj
    return ()