module GI.Gtk.Objects.TreeSelection
(
TreeSelection(..) ,
IsTreeSelection ,
toTreeSelection ,
noTreeSelection ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionCountSelectedRowsMethodInfo,
#endif
treeSelectionCountSelectedRows ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionGetModeMethodInfo ,
#endif
treeSelectionGetMode ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionGetSelectedMethodInfo ,
#endif
treeSelectionGetSelected ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionGetSelectedRowsMethodInfo ,
#endif
treeSelectionGetSelectedRows ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionGetTreeViewMethodInfo ,
#endif
treeSelectionGetTreeView ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionIterIsSelectedMethodInfo ,
#endif
treeSelectionIterIsSelected ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionPathIsSelectedMethodInfo ,
#endif
treeSelectionPathIsSelected ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSelectAllMethodInfo ,
#endif
treeSelectionSelectAll ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSelectIterMethodInfo ,
#endif
treeSelectionSelectIter ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSelectPathMethodInfo ,
#endif
treeSelectionSelectPath ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSelectRangeMethodInfo ,
#endif
treeSelectionSelectRange ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSelectedForeachMethodInfo ,
#endif
treeSelectionSelectedForeach ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSetModeMethodInfo ,
#endif
treeSelectionSetMode ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionSetSelectFunctionMethodInfo,
#endif
treeSelectionSetSelectFunction ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionUnselectAllMethodInfo ,
#endif
treeSelectionUnselectAll ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionUnselectIterMethodInfo ,
#endif
treeSelectionUnselectIter ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionUnselectPathMethodInfo ,
#endif
treeSelectionUnselectPath ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionUnselectRangeMethodInfo ,
#endif
treeSelectionUnselectRange ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionModePropertyInfo ,
#endif
constructTreeSelectionMode ,
getTreeSelectionMode ,
setTreeSelectionMode ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
treeSelectionMode ,
#endif
C_TreeSelectionChangedCallback ,
TreeSelectionChangedCallback ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
TreeSelectionChangedSignalInfo ,
#endif
afterTreeSelectionChanged ,
genClosure_TreeSelectionChanged ,
mk_TreeSelectionChangedCallback ,
noTreeSelectionChangedCallback ,
onTreeSelectionChanged ,
wrap_TreeSelectionChangedCallback ,
) 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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import qualified GI.Gtk.Enums as Gtk.Enums
import qualified GI.Gtk.Interfaces.TreeModel as Gtk.TreeModel
import qualified GI.Gtk.Objects.TreeView as Gtk.TreeView
import qualified GI.Gtk.Structs.TreeIter as Gtk.TreeIter
import qualified GI.Gtk.Structs.TreePath as Gtk.TreePath
newtype TreeSelection = TreeSelection (ManagedPtr TreeSelection)
foreign import ccall "gtk_tree_selection_get_type"
c_gtk_tree_selection_get_type :: IO GType
instance GObject TreeSelection where
gobjectType _ = c_gtk_tree_selection_get_type
class GObject o => IsTreeSelection o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError TreeSelection a) =>
IsTreeSelection a
#endif
instance IsTreeSelection TreeSelection
instance GObject.Object.IsObject TreeSelection
toTreeSelection :: (MonadIO m, IsTreeSelection o) => o -> m TreeSelection
toTreeSelection = liftIO . unsafeCastTo TreeSelection
noTreeSelection :: Maybe TreeSelection
noTreeSelection = Nothing
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveTreeSelectionMethod (t :: Symbol) (o :: *) :: * where
ResolveTreeSelectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTreeSelectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTreeSelectionMethod "countSelectedRows" o = TreeSelectionCountSelectedRowsMethodInfo
ResolveTreeSelectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTreeSelectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTreeSelectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTreeSelectionMethod "iterIsSelected" o = TreeSelectionIterIsSelectedMethodInfo
ResolveTreeSelectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTreeSelectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTreeSelectionMethod "pathIsSelected" o = TreeSelectionPathIsSelectedMethodInfo
ResolveTreeSelectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTreeSelectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTreeSelectionMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveTreeSelectionMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveTreeSelectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTreeSelectionMethod "selectAll" o = TreeSelectionSelectAllMethodInfo
ResolveTreeSelectionMethod "selectIter" o = TreeSelectionSelectIterMethodInfo
ResolveTreeSelectionMethod "selectPath" o = TreeSelectionSelectPathMethodInfo
ResolveTreeSelectionMethod "selectRange" o = TreeSelectionSelectRangeMethodInfo
ResolveTreeSelectionMethod "selectedForeach" o = TreeSelectionSelectedForeachMethodInfo
ResolveTreeSelectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTreeSelectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTreeSelectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTreeSelectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTreeSelectionMethod "unselectAll" o = TreeSelectionUnselectAllMethodInfo
ResolveTreeSelectionMethod "unselectIter" o = TreeSelectionUnselectIterMethodInfo
ResolveTreeSelectionMethod "unselectPath" o = TreeSelectionUnselectPathMethodInfo
ResolveTreeSelectionMethod "unselectRange" o = TreeSelectionUnselectRangeMethodInfo
ResolveTreeSelectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTreeSelectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTreeSelectionMethod "getMode" o = TreeSelectionGetModeMethodInfo
ResolveTreeSelectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTreeSelectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTreeSelectionMethod "getSelected" o = TreeSelectionGetSelectedMethodInfo
ResolveTreeSelectionMethod "getSelectedRows" o = TreeSelectionGetSelectedRowsMethodInfo
ResolveTreeSelectionMethod "getTreeView" o = TreeSelectionGetTreeViewMethodInfo
ResolveTreeSelectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTreeSelectionMethod "setMode" o = TreeSelectionSetModeMethodInfo
ResolveTreeSelectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTreeSelectionMethod "setSelectFunction" o = TreeSelectionSetSelectFunctionMethodInfo
ResolveTreeSelectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreeSelectionMethod t TreeSelection, O.MethodInfo info TreeSelection p) => O.IsLabelProxy t (TreeSelection -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveTreeSelectionMethod t TreeSelection, O.MethodInfo info TreeSelection p) => O.IsLabel t (TreeSelection -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif
type TreeSelectionChangedCallback =
IO ()
noTreeSelectionChangedCallback :: Maybe TreeSelectionChangedCallback
noTreeSelectionChangedCallback = Nothing
type C_TreeSelectionChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TreeSelectionChangedCallback :: C_TreeSelectionChangedCallback -> IO (FunPtr C_TreeSelectionChangedCallback)
genClosure_TreeSelectionChanged :: TreeSelectionChangedCallback -> IO Closure
genClosure_TreeSelectionChanged cb = do
let cb' = wrap_TreeSelectionChangedCallback cb
mk_TreeSelectionChangedCallback cb' >>= newCClosure
wrap_TreeSelectionChangedCallback ::
TreeSelectionChangedCallback ->
Ptr () ->
Ptr () ->
IO ()
wrap_TreeSelectionChangedCallback _cb _ _ = do
_cb
onTreeSelectionChanged :: (IsTreeSelection a, MonadIO m) => a -> TreeSelectionChangedCallback -> m SignalHandlerId
onTreeSelectionChanged obj cb = liftIO $ do
let cb' = wrap_TreeSelectionChangedCallback cb
cb'' <- mk_TreeSelectionChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' SignalConnectBefore
afterTreeSelectionChanged :: (IsTreeSelection a, MonadIO m) => a -> TreeSelectionChangedCallback -> m SignalHandlerId
afterTreeSelectionChanged obj cb = liftIO $ do
let cb' = wrap_TreeSelectionChangedCallback cb
cb'' <- mk_TreeSelectionChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' SignalConnectAfter
getTreeSelectionMode :: (MonadIO m, IsTreeSelection o) => o -> m Gtk.Enums.SelectionMode
getTreeSelectionMode obj = liftIO $ getObjectPropertyEnum obj "mode"
setTreeSelectionMode :: (MonadIO m, IsTreeSelection o) => o -> Gtk.Enums.SelectionMode -> m ()
setTreeSelectionMode obj val = liftIO $ setObjectPropertyEnum obj "mode" val
constructTreeSelectionMode :: (IsTreeSelection o) => Gtk.Enums.SelectionMode -> IO (GValueConstruct o)
constructTreeSelectionMode val = constructObjectPropertyEnum "mode" val
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionModePropertyInfo
instance AttrInfo TreeSelectionModePropertyInfo where
type AttrAllowedOps TreeSelectionModePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint TreeSelectionModePropertyInfo = (~) Gtk.Enums.SelectionMode
type AttrBaseTypeConstraint TreeSelectionModePropertyInfo = IsTreeSelection
type AttrGetType TreeSelectionModePropertyInfo = Gtk.Enums.SelectionMode
type AttrLabel TreeSelectionModePropertyInfo = "mode"
type AttrOrigin TreeSelectionModePropertyInfo = TreeSelection
attrGet _ = getTreeSelectionMode
attrSet _ = setTreeSelectionMode
attrConstruct _ = constructTreeSelectionMode
attrClear _ = undefined
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList TreeSelection
type instance O.AttributeList TreeSelection = TreeSelectionAttributeList
type TreeSelectionAttributeList = ('[ '("mode", TreeSelectionModePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
treeSelectionMode :: AttrLabelProxy "mode"
treeSelectionMode = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionChangedSignalInfo
instance SignalInfo TreeSelectionChangedSignalInfo where
type HaskellCallbackType TreeSelectionChangedSignalInfo = TreeSelectionChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_TreeSelectionChangedCallback cb
cb'' <- mk_TreeSelectionChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode
type instance O.SignalList TreeSelection = TreeSelectionSignalList
type TreeSelectionSignalList = ('[ '("changed", TreeSelectionChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_selection_count_selected_rows" gtk_tree_selection_count_selected_rows ::
Ptr TreeSelection ->
IO Int32
treeSelectionCountSelectedRows ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m Int32
treeSelectionCountSelectedRows selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
result <- gtk_tree_selection_count_selected_rows selection'
touchManagedPtr selection
return result
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionCountSelectedRowsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionCountSelectedRowsMethodInfo a signature where
overloadedMethod _ = treeSelectionCountSelectedRows
#endif
foreign import ccall "gtk_tree_selection_get_mode" gtk_tree_selection_get_mode ::
Ptr TreeSelection ->
IO CUInt
treeSelectionGetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m Gtk.Enums.SelectionMode
treeSelectionGetMode selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
result <- gtk_tree_selection_get_mode selection'
let result' = (toEnum . fromIntegral) result
touchManagedPtr selection
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionGetModeMethodInfo
instance (signature ~ (m Gtk.Enums.SelectionMode), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionGetModeMethodInfo a signature where
overloadedMethod _ = treeSelectionGetMode
#endif
foreign import ccall "gtk_tree_selection_get_selected" gtk_tree_selection_get_selected ::
Ptr TreeSelection ->
Ptr (Ptr Gtk.TreeModel.TreeModel) ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeSelectionGetSelected ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m ((Bool, Gtk.TreeModel.TreeModel, Gtk.TreeIter.TreeIter))
treeSelectionGetSelected selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
model <- allocMem :: IO (Ptr (Ptr Gtk.TreeModel.TreeModel))
iter <- callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
result <- gtk_tree_selection_get_selected selection' model iter
let result' = (/= 0) result
model' <- peek model
model'' <- (newObject Gtk.TreeModel.TreeModel) model'
iter' <- (wrapBoxed Gtk.TreeIter.TreeIter) iter
touchManagedPtr selection
freeMem model
return (result', model'', iter')
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionGetSelectedMethodInfo
instance (signature ~ (m ((Bool, Gtk.TreeModel.TreeModel, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionGetSelectedMethodInfo a signature where
overloadedMethod _ = treeSelectionGetSelected
#endif
foreign import ccall "gtk_tree_selection_get_selected_rows" gtk_tree_selection_get_selected_rows ::
Ptr TreeSelection ->
Ptr (Ptr Gtk.TreeModel.TreeModel) ->
IO (Ptr (GList (Ptr Gtk.TreePath.TreePath)))
treeSelectionGetSelectedRows ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m (([Gtk.TreePath.TreePath], Gtk.TreeModel.TreeModel))
treeSelectionGetSelectedRows selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
model <- allocMem :: IO (Ptr (Ptr Gtk.TreeModel.TreeModel))
result <- gtk_tree_selection_get_selected_rows selection' model
result' <- unpackGList result
result'' <- mapM (wrapBoxed Gtk.TreePath.TreePath) result'
g_list_free result
model' <- peek model
model'' <- (newObject Gtk.TreeModel.TreeModel) model'
touchManagedPtr selection
freeMem model
return (result'', model'')
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionGetSelectedRowsMethodInfo
instance (signature ~ (m (([Gtk.TreePath.TreePath], Gtk.TreeModel.TreeModel))), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionGetSelectedRowsMethodInfo a signature where
overloadedMethod _ = treeSelectionGetSelectedRows
#endif
foreign import ccall "gtk_tree_selection_get_tree_view" gtk_tree_selection_get_tree_view ::
Ptr TreeSelection ->
IO (Ptr Gtk.TreeView.TreeView)
treeSelectionGetTreeView ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m Gtk.TreeView.TreeView
treeSelectionGetTreeView selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
result <- gtk_tree_selection_get_tree_view selection'
checkUnexpectedReturnNULL "treeSelectionGetTreeView" result
result' <- (newObject Gtk.TreeView.TreeView) result
touchManagedPtr selection
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionGetTreeViewMethodInfo
instance (signature ~ (m Gtk.TreeView.TreeView), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionGetTreeViewMethodInfo a signature where
overloadedMethod _ = treeSelectionGetTreeView
#endif
foreign import ccall "gtk_tree_selection_iter_is_selected" gtk_tree_selection_iter_is_selected ::
Ptr TreeSelection ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeSelectionIterIsSelected ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreeIter.TreeIter
-> m Bool
treeSelectionIterIsSelected selection iter = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
iter' <- unsafeManagedPtrGetPtr iter
result <- gtk_tree_selection_iter_is_selected selection' iter'
let result' = (/= 0) result
touchManagedPtr selection
touchManagedPtr iter
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionIterIsSelectedMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m Bool), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionIterIsSelectedMethodInfo a signature where
overloadedMethod _ = treeSelectionIterIsSelected
#endif
foreign import ccall "gtk_tree_selection_path_is_selected" gtk_tree_selection_path_is_selected ::
Ptr TreeSelection ->
Ptr Gtk.TreePath.TreePath ->
IO CInt
treeSelectionPathIsSelected ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreePath.TreePath
-> m Bool
treeSelectionPathIsSelected selection path = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
path' <- unsafeManagedPtrGetPtr path
result <- gtk_tree_selection_path_is_selected selection' path'
let result' = (/= 0) result
touchManagedPtr selection
touchManagedPtr path
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionPathIsSelectedMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> m Bool), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionPathIsSelectedMethodInfo a signature where
overloadedMethod _ = treeSelectionPathIsSelected
#endif
foreign import ccall "gtk_tree_selection_select_all" gtk_tree_selection_select_all ::
Ptr TreeSelection ->
IO ()
treeSelectionSelectAll ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m ()
treeSelectionSelectAll selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
gtk_tree_selection_select_all selection'
touchManagedPtr selection
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSelectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSelectAllMethodInfo a signature where
overloadedMethod _ = treeSelectionSelectAll
#endif
foreign import ccall "gtk_tree_selection_select_iter" gtk_tree_selection_select_iter ::
Ptr TreeSelection ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeSelectionSelectIter ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreeIter.TreeIter
-> m ()
treeSelectionSelectIter selection iter = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
iter' <- unsafeManagedPtrGetPtr iter
gtk_tree_selection_select_iter selection' iter'
touchManagedPtr selection
touchManagedPtr iter
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSelectIterMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSelectIterMethodInfo a signature where
overloadedMethod _ = treeSelectionSelectIter
#endif
foreign import ccall "gtk_tree_selection_select_path" gtk_tree_selection_select_path ::
Ptr TreeSelection ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeSelectionSelectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreePath.TreePath
-> m ()
treeSelectionSelectPath selection path = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
path' <- unsafeManagedPtrGetPtr path
gtk_tree_selection_select_path selection' path'
touchManagedPtr selection
touchManagedPtr path
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSelectPathMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSelectPathMethodInfo a signature where
overloadedMethod _ = treeSelectionSelectPath
#endif
foreign import ccall "gtk_tree_selection_select_range" gtk_tree_selection_select_range ::
Ptr TreeSelection ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeSelectionSelectRange ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreePath.TreePath
-> Gtk.TreePath.TreePath
-> m ()
treeSelectionSelectRange selection startPath endPath = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
startPath' <- unsafeManagedPtrGetPtr startPath
endPath' <- unsafeManagedPtrGetPtr endPath
gtk_tree_selection_select_range selection' startPath' endPath'
touchManagedPtr selection
touchManagedPtr startPath
touchManagedPtr endPath
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSelectRangeMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> Gtk.TreePath.TreePath -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSelectRangeMethodInfo a signature where
overloadedMethod _ = treeSelectionSelectRange
#endif
foreign import ccall "gtk_tree_selection_selected_foreach" gtk_tree_selection_selected_foreach ::
Ptr TreeSelection ->
FunPtr Gtk.Callbacks.C_TreeSelectionForeachFunc ->
Ptr () ->
IO ()
treeSelectionSelectedForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.Callbacks.TreeSelectionForeachFunc
-> m ()
treeSelectionSelectedForeach selection func = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
func' <- Gtk.Callbacks.mk_TreeSelectionForeachFunc (Gtk.Callbacks.wrap_TreeSelectionForeachFunc Nothing (Gtk.Callbacks.drop_closures_TreeSelectionForeachFunc func))
let data_ = nullPtr
gtk_tree_selection_selected_foreach selection' func' data_
safeFreeFunPtr $ castFunPtrToPtr func'
touchManagedPtr selection
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSelectedForeachMethodInfo
instance (signature ~ (Gtk.Callbacks.TreeSelectionForeachFunc -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSelectedForeachMethodInfo a signature where
overloadedMethod _ = treeSelectionSelectedForeach
#endif
foreign import ccall "gtk_tree_selection_set_mode" gtk_tree_selection_set_mode ::
Ptr TreeSelection ->
CUInt ->
IO ()
treeSelectionSetMode ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.Enums.SelectionMode
-> m ()
treeSelectionSetMode selection type_ = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
let type_' = (fromIntegral . fromEnum) type_
gtk_tree_selection_set_mode selection' type_'
touchManagedPtr selection
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSetModeMethodInfo
instance (signature ~ (Gtk.Enums.SelectionMode -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSetModeMethodInfo a signature where
overloadedMethod _ = treeSelectionSetMode
#endif
foreign import ccall "gtk_tree_selection_set_select_function" gtk_tree_selection_set_select_function ::
Ptr TreeSelection ->
FunPtr Gtk.Callbacks.C_TreeSelectionFunc ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
treeSelectionSetSelectFunction ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.Callbacks.TreeSelectionFunc
-> m ()
treeSelectionSetSelectFunction selection func = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
func' <- Gtk.Callbacks.mk_TreeSelectionFunc (Gtk.Callbacks.wrap_TreeSelectionFunc Nothing (Gtk.Callbacks.drop_closures_TreeSelectionFunc func))
let data_ = castFunPtrToPtr func'
let destroy = safeFreeFunPtrPtr
gtk_tree_selection_set_select_function selection' func' data_ destroy
touchManagedPtr selection
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionSetSelectFunctionMethodInfo
instance (signature ~ (Gtk.Callbacks.TreeSelectionFunc -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionSetSelectFunctionMethodInfo a signature where
overloadedMethod _ = treeSelectionSetSelectFunction
#endif
foreign import ccall "gtk_tree_selection_unselect_all" gtk_tree_selection_unselect_all ::
Ptr TreeSelection ->
IO ()
treeSelectionUnselectAll ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> m ()
treeSelectionUnselectAll selection = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
gtk_tree_selection_unselect_all selection'
touchManagedPtr selection
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionUnselectAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionUnselectAllMethodInfo a signature where
overloadedMethod _ = treeSelectionUnselectAll
#endif
foreign import ccall "gtk_tree_selection_unselect_iter" gtk_tree_selection_unselect_iter ::
Ptr TreeSelection ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeSelectionUnselectIter ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreeIter.TreeIter
-> m ()
treeSelectionUnselectIter selection iter = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
iter' <- unsafeManagedPtrGetPtr iter
gtk_tree_selection_unselect_iter selection' iter'
touchManagedPtr selection
touchManagedPtr iter
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionUnselectIterMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionUnselectIterMethodInfo a signature where
overloadedMethod _ = treeSelectionUnselectIter
#endif
foreign import ccall "gtk_tree_selection_unselect_path" gtk_tree_selection_unselect_path ::
Ptr TreeSelection ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeSelectionUnselectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreePath.TreePath
-> m ()
treeSelectionUnselectPath selection path = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
path' <- unsafeManagedPtrGetPtr path
gtk_tree_selection_unselect_path selection' path'
touchManagedPtr selection
touchManagedPtr path
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionUnselectPathMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionUnselectPathMethodInfo a signature where
overloadedMethod _ = treeSelectionUnselectPath
#endif
foreign import ccall "gtk_tree_selection_unselect_range" gtk_tree_selection_unselect_range ::
Ptr TreeSelection ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeSelectionUnselectRange ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeSelection a) =>
a
-> Gtk.TreePath.TreePath
-> Gtk.TreePath.TreePath
-> m ()
treeSelectionUnselectRange selection startPath endPath = liftIO $ do
selection' <- unsafeManagedPtrCastPtr selection
startPath' <- unsafeManagedPtrGetPtr startPath
endPath' <- unsafeManagedPtrGetPtr endPath
gtk_tree_selection_unselect_range selection' startPath' endPath'
touchManagedPtr selection
touchManagedPtr startPath
touchManagedPtr endPath
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data TreeSelectionUnselectRangeMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> Gtk.TreePath.TreePath -> m ()), MonadIO m, IsTreeSelection a) => O.MethodInfo TreeSelectionUnselectRangeMethodInfo a signature where
overloadedMethod _ = treeSelectionUnselectRange
#endif