{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.TreeModel
(
TreeModel(..) ,
noTreeModel ,
IsTreeModel ,
toTreeModel ,
#if defined(ENABLE_OVERLOADING)
ResolveTreeModelMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeModelFilterNewMethodInfo ,
#endif
treeModelFilterNew ,
#if defined(ENABLE_OVERLOADING)
TreeModelForeachMethodInfo ,
#endif
treeModelForeach ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetColumnTypeMethodInfo ,
#endif
treeModelGetColumnType ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetFlagsMethodInfo ,
#endif
treeModelGetFlags ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetIterMethodInfo ,
#endif
treeModelGetIter ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetIterFirstMethodInfo ,
#endif
treeModelGetIterFirst ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetIterFromStringMethodInfo ,
#endif
treeModelGetIterFromString ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetNColumnsMethodInfo ,
#endif
treeModelGetNColumns ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetPathMethodInfo ,
#endif
treeModelGetPath ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetStringFromIterMethodInfo ,
#endif
treeModelGetStringFromIter ,
#if defined(ENABLE_OVERLOADING)
TreeModelGetValueMethodInfo ,
#endif
treeModelGetValue ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterChildrenMethodInfo ,
#endif
treeModelIterChildren ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterHasChildMethodInfo ,
#endif
treeModelIterHasChild ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterNChildrenMethodInfo ,
#endif
treeModelIterNChildren ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterNextMethodInfo ,
#endif
treeModelIterNext ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterNthChildMethodInfo ,
#endif
treeModelIterNthChild ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterParentMethodInfo ,
#endif
treeModelIterParent ,
#if defined(ENABLE_OVERLOADING)
TreeModelIterPreviousMethodInfo ,
#endif
treeModelIterPrevious ,
#if defined(ENABLE_OVERLOADING)
TreeModelRefNodeMethodInfo ,
#endif
treeModelRefNode ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowChangedMethodInfo ,
#endif
treeModelRowChanged ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowDeletedMethodInfo ,
#endif
treeModelRowDeleted ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowHasChildToggledMethodInfo ,
#endif
treeModelRowHasChildToggled ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowInsertedMethodInfo ,
#endif
treeModelRowInserted ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowsReorderedMethodInfo ,
#endif
treeModelRowsReordered ,
#if defined(ENABLE_OVERLOADING)
TreeModelSortNewWithModelMethodInfo ,
#endif
treeModelSortNewWithModel ,
#if defined(ENABLE_OVERLOADING)
TreeModelUnrefNodeMethodInfo ,
#endif
treeModelUnrefNode ,
C_TreeModelRowChangedCallback ,
TreeModelRowChangedCallback ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowChangedSignalInfo ,
#endif
afterTreeModelRowChanged ,
genClosure_TreeModelRowChanged ,
mk_TreeModelRowChangedCallback ,
noTreeModelRowChangedCallback ,
onTreeModelRowChanged ,
wrap_TreeModelRowChangedCallback ,
C_TreeModelRowDeletedCallback ,
TreeModelRowDeletedCallback ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowDeletedSignalInfo ,
#endif
afterTreeModelRowDeleted ,
genClosure_TreeModelRowDeleted ,
mk_TreeModelRowDeletedCallback ,
noTreeModelRowDeletedCallback ,
onTreeModelRowDeleted ,
wrap_TreeModelRowDeletedCallback ,
C_TreeModelRowHasChildToggledCallback ,
TreeModelRowHasChildToggledCallback ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowHasChildToggledSignalInfo ,
#endif
afterTreeModelRowHasChildToggled ,
genClosure_TreeModelRowHasChildToggled ,
mk_TreeModelRowHasChildToggledCallback ,
noTreeModelRowHasChildToggledCallback ,
onTreeModelRowHasChildToggled ,
wrap_TreeModelRowHasChildToggledCallback,
C_TreeModelRowInsertedCallback ,
TreeModelRowInsertedCallback ,
#if defined(ENABLE_OVERLOADING)
TreeModelRowInsertedSignalInfo ,
#endif
afterTreeModelRowInserted ,
genClosure_TreeModelRowInserted ,
mk_TreeModelRowInsertedCallback ,
noTreeModelRowInsertedCallback ,
onTreeModelRowInserted ,
wrap_TreeModelRowInsertedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Structs.TreeIter as Gtk.TreeIter
import {-# SOURCE #-} qualified GI.Gtk.Structs.TreePath as Gtk.TreePath
newtype TreeModel = TreeModel (ManagedPtr TreeModel)
deriving (TreeModel -> TreeModel -> Bool
(TreeModel -> TreeModel -> Bool)
-> (TreeModel -> TreeModel -> Bool) -> Eq TreeModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TreeModel -> TreeModel -> Bool
$c/= :: TreeModel -> TreeModel -> Bool
== :: TreeModel -> TreeModel -> Bool
$c== :: TreeModel -> TreeModel -> Bool
Eq)
noTreeModel :: Maybe TreeModel
noTreeModel :: Maybe TreeModel
noTreeModel = Maybe TreeModel
forall a. Maybe a
Nothing
type TreeModelRowChangedCallback =
Gtk.TreePath.TreePath
-> Gtk.TreeIter.TreeIter
-> IO ()
noTreeModelRowChangedCallback :: Maybe TreeModelRowChangedCallback
noTreeModelRowChangedCallback :: Maybe TreeModelRowChangedCallback
noTreeModelRowChangedCallback = Maybe TreeModelRowChangedCallback
forall a. Maybe a
Nothing
type C_TreeModelRowChangedCallback =
Ptr () ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TreeModelRowChangedCallback :: C_TreeModelRowChangedCallback -> IO (FunPtr C_TreeModelRowChangedCallback)
genClosure_TreeModelRowChanged :: MonadIO m => TreeModelRowChangedCallback -> m (GClosure C_TreeModelRowChangedCallback)
genClosure_TreeModelRowChanged :: TreeModelRowChangedCallback
-> m (GClosure C_TreeModelRowChangedCallback)
genClosure_TreeModelRowChanged cb :: TreeModelRowChangedCallback
cb = IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback))
-> IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowChangedCallback TreeModelRowChangedCallback
cb
C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowChangedCallback C_TreeModelRowChangedCallback
cb' IO (FunPtr C_TreeModelRowChangedCallback)
-> (FunPtr C_TreeModelRowChangedCallback
-> IO (GClosure C_TreeModelRowChangedCallback))
-> IO (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeModelRowChangedCallback
-> IO (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TreeModelRowChangedCallback ::
TreeModelRowChangedCallback ->
C_TreeModelRowChangedCallback
wrap_TreeModelRowChangedCallback :: TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowChangedCallback _cb :: TreeModelRowChangedCallback
_cb _ path :: Ptr TreePath
path iter :: Ptr TreeIter
iter _ = do
(ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
(ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
TreeModelRowChangedCallback
_cb TreePath
path' TreeIter
iter'
onTreeModelRowChanged :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowChangedCallback -> m SignalHandlerId
onTreeModelRowChanged :: a -> TreeModelRowChangedCallback -> m SignalHandlerId
onTreeModelRowChanged obj :: a
obj cb :: TreeModelRowChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowChangedCallback TreeModelRowChangedCallback
cb
FunPtr C_TreeModelRowChangedCallback
cb'' <- C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowChangedCallback C_TreeModelRowChangedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-changed" FunPtr C_TreeModelRowChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTreeModelRowChanged :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowChangedCallback -> m SignalHandlerId
afterTreeModelRowChanged :: a -> TreeModelRowChangedCallback -> m SignalHandlerId
afterTreeModelRowChanged obj :: a
obj cb :: TreeModelRowChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowChangedCallback TreeModelRowChangedCallback
cb
FunPtr C_TreeModelRowChangedCallback
cb'' <- C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowChangedCallback C_TreeModelRowChangedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-changed" FunPtr C_TreeModelRowChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TreeModelRowChangedSignalInfo
instance SignalInfo TreeModelRowChangedSignalInfo where
type HaskellCallbackType TreeModelRowChangedSignalInfo = TreeModelRowChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TreeModelRowChangedCallback cb
cb'' <- mk_TreeModelRowChangedCallback cb'
connectSignalFunPtr obj "row-changed" cb'' connectMode detail
#endif
type TreeModelRowDeletedCallback =
Gtk.TreePath.TreePath
-> IO ()
noTreeModelRowDeletedCallback :: Maybe TreeModelRowDeletedCallback
noTreeModelRowDeletedCallback :: Maybe (TreePath -> IO ())
noTreeModelRowDeletedCallback = Maybe (TreePath -> IO ())
forall a. Maybe a
Nothing
type C_TreeModelRowDeletedCallback =
Ptr () ->
Ptr Gtk.TreePath.TreePath ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TreeModelRowDeletedCallback :: C_TreeModelRowDeletedCallback -> IO (FunPtr C_TreeModelRowDeletedCallback)
genClosure_TreeModelRowDeleted :: MonadIO m => TreeModelRowDeletedCallback -> m (GClosure C_TreeModelRowDeletedCallback)
genClosure_TreeModelRowDeleted :: (TreePath -> IO ()) -> m (GClosure C_TreeModelRowDeletedCallback)
genClosure_TreeModelRowDeleted cb :: TreePath -> IO ()
cb = IO (GClosure C_TreeModelRowDeletedCallback)
-> m (GClosure C_TreeModelRowDeletedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeModelRowDeletedCallback)
-> m (GClosure C_TreeModelRowDeletedCallback))
-> IO (GClosure C_TreeModelRowDeletedCallback)
-> m (GClosure C_TreeModelRowDeletedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowDeletedCallback
cb' = (TreePath -> IO ()) -> C_TreeModelRowDeletedCallback
wrap_TreeModelRowDeletedCallback TreePath -> IO ()
cb
C_TreeModelRowDeletedCallback
-> IO (FunPtr C_TreeModelRowDeletedCallback)
mk_TreeModelRowDeletedCallback C_TreeModelRowDeletedCallback
cb' IO (FunPtr C_TreeModelRowDeletedCallback)
-> (FunPtr C_TreeModelRowDeletedCallback
-> IO (GClosure C_TreeModelRowDeletedCallback))
-> IO (GClosure C_TreeModelRowDeletedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeModelRowDeletedCallback
-> IO (GClosure C_TreeModelRowDeletedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TreeModelRowDeletedCallback ::
TreeModelRowDeletedCallback ->
C_TreeModelRowDeletedCallback
wrap_TreeModelRowDeletedCallback :: (TreePath -> IO ()) -> C_TreeModelRowDeletedCallback
wrap_TreeModelRowDeletedCallback _cb :: TreePath -> IO ()
_cb _ path :: Ptr TreePath
path _ = do
(ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
TreePath -> IO ()
_cb TreePath
path'
onTreeModelRowDeleted :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowDeletedCallback -> m SignalHandlerId
onTreeModelRowDeleted :: a -> (TreePath -> IO ()) -> m SignalHandlerId
onTreeModelRowDeleted obj :: a
obj cb :: TreePath -> IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowDeletedCallback
cb' = (TreePath -> IO ()) -> C_TreeModelRowDeletedCallback
wrap_TreeModelRowDeletedCallback TreePath -> IO ()
cb
FunPtr C_TreeModelRowDeletedCallback
cb'' <- C_TreeModelRowDeletedCallback
-> IO (FunPtr C_TreeModelRowDeletedCallback)
mk_TreeModelRowDeletedCallback C_TreeModelRowDeletedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowDeletedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-deleted" FunPtr C_TreeModelRowDeletedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTreeModelRowDeleted :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowDeletedCallback -> m SignalHandlerId
afterTreeModelRowDeleted :: a -> (TreePath -> IO ()) -> m SignalHandlerId
afterTreeModelRowDeleted obj :: a
obj cb :: TreePath -> IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowDeletedCallback
cb' = (TreePath -> IO ()) -> C_TreeModelRowDeletedCallback
wrap_TreeModelRowDeletedCallback TreePath -> IO ()
cb
FunPtr C_TreeModelRowDeletedCallback
cb'' <- C_TreeModelRowDeletedCallback
-> IO (FunPtr C_TreeModelRowDeletedCallback)
mk_TreeModelRowDeletedCallback C_TreeModelRowDeletedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowDeletedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-deleted" FunPtr C_TreeModelRowDeletedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TreeModelRowDeletedSignalInfo
instance SignalInfo TreeModelRowDeletedSignalInfo where
type HaskellCallbackType TreeModelRowDeletedSignalInfo = TreeModelRowDeletedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TreeModelRowDeletedCallback cb
cb'' <- mk_TreeModelRowDeletedCallback cb'
connectSignalFunPtr obj "row-deleted" cb'' connectMode detail
#endif
type TreeModelRowHasChildToggledCallback =
Gtk.TreePath.TreePath
-> Gtk.TreeIter.TreeIter
-> IO ()
noTreeModelRowHasChildToggledCallback :: Maybe TreeModelRowHasChildToggledCallback
noTreeModelRowHasChildToggledCallback :: Maybe TreeModelRowChangedCallback
noTreeModelRowHasChildToggledCallback = Maybe TreeModelRowChangedCallback
forall a. Maybe a
Nothing
type C_TreeModelRowHasChildToggledCallback =
Ptr () ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TreeModelRowHasChildToggledCallback :: C_TreeModelRowHasChildToggledCallback -> IO (FunPtr C_TreeModelRowHasChildToggledCallback)
genClosure_TreeModelRowHasChildToggled :: MonadIO m => TreeModelRowHasChildToggledCallback -> m (GClosure C_TreeModelRowHasChildToggledCallback)
genClosure_TreeModelRowHasChildToggled :: TreeModelRowChangedCallback
-> m (GClosure C_TreeModelRowChangedCallback)
genClosure_TreeModelRowHasChildToggled cb :: TreeModelRowChangedCallback
cb = IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback))
-> IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowHasChildToggledCallback TreeModelRowChangedCallback
cb
C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowHasChildToggledCallback C_TreeModelRowChangedCallback
cb' IO (FunPtr C_TreeModelRowChangedCallback)
-> (FunPtr C_TreeModelRowChangedCallback
-> IO (GClosure C_TreeModelRowChangedCallback))
-> IO (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeModelRowChangedCallback
-> IO (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TreeModelRowHasChildToggledCallback ::
TreeModelRowHasChildToggledCallback ->
C_TreeModelRowHasChildToggledCallback
wrap_TreeModelRowHasChildToggledCallback :: TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowHasChildToggledCallback _cb :: TreeModelRowChangedCallback
_cb _ path :: Ptr TreePath
path iter :: Ptr TreeIter
iter _ = do
(ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
(ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
TreeModelRowChangedCallback
_cb TreePath
path' TreeIter
iter'
onTreeModelRowHasChildToggled :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowHasChildToggledCallback -> m SignalHandlerId
onTreeModelRowHasChildToggled :: a -> TreeModelRowChangedCallback -> m SignalHandlerId
onTreeModelRowHasChildToggled obj :: a
obj cb :: TreeModelRowChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowHasChildToggledCallback TreeModelRowChangedCallback
cb
FunPtr C_TreeModelRowChangedCallback
cb'' <- C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowHasChildToggledCallback C_TreeModelRowChangedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-has-child-toggled" FunPtr C_TreeModelRowChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTreeModelRowHasChildToggled :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowHasChildToggledCallback -> m SignalHandlerId
afterTreeModelRowHasChildToggled :: a -> TreeModelRowChangedCallback -> m SignalHandlerId
afterTreeModelRowHasChildToggled obj :: a
obj cb :: TreeModelRowChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowHasChildToggledCallback TreeModelRowChangedCallback
cb
FunPtr C_TreeModelRowChangedCallback
cb'' <- C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowHasChildToggledCallback C_TreeModelRowChangedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-has-child-toggled" FunPtr C_TreeModelRowChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TreeModelRowHasChildToggledSignalInfo
instance SignalInfo TreeModelRowHasChildToggledSignalInfo where
type HaskellCallbackType TreeModelRowHasChildToggledSignalInfo = TreeModelRowHasChildToggledCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TreeModelRowHasChildToggledCallback cb
cb'' <- mk_TreeModelRowHasChildToggledCallback cb'
connectSignalFunPtr obj "row-has-child-toggled" cb'' connectMode detail
#endif
type TreeModelRowInsertedCallback =
Gtk.TreePath.TreePath
-> Gtk.TreeIter.TreeIter
-> IO ()
noTreeModelRowInsertedCallback :: Maybe TreeModelRowInsertedCallback
noTreeModelRowInsertedCallback :: Maybe TreeModelRowChangedCallback
noTreeModelRowInsertedCallback = Maybe TreeModelRowChangedCallback
forall a. Maybe a
Nothing
type C_TreeModelRowInsertedCallback =
Ptr () ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TreeModelRowInsertedCallback :: C_TreeModelRowInsertedCallback -> IO (FunPtr C_TreeModelRowInsertedCallback)
genClosure_TreeModelRowInserted :: MonadIO m => TreeModelRowInsertedCallback -> m (GClosure C_TreeModelRowInsertedCallback)
genClosure_TreeModelRowInserted :: TreeModelRowChangedCallback
-> m (GClosure C_TreeModelRowChangedCallback)
genClosure_TreeModelRowInserted cb :: TreeModelRowChangedCallback
cb = IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback))
-> IO (GClosure C_TreeModelRowChangedCallback)
-> m (GClosure C_TreeModelRowChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowInsertedCallback TreeModelRowChangedCallback
cb
C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowInsertedCallback C_TreeModelRowChangedCallback
cb' IO (FunPtr C_TreeModelRowChangedCallback)
-> (FunPtr C_TreeModelRowChangedCallback
-> IO (GClosure C_TreeModelRowChangedCallback))
-> IO (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TreeModelRowChangedCallback
-> IO (GClosure C_TreeModelRowChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TreeModelRowInsertedCallback ::
TreeModelRowInsertedCallback ->
C_TreeModelRowInsertedCallback
wrap_TreeModelRowInsertedCallback :: TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowInsertedCallback _cb :: TreeModelRowChangedCallback
_cb _ path :: Ptr TreePath
path iter :: Ptr TreeIter
iter _ = do
(ManagedPtr TreePath -> TreePath)
-> Ptr TreePath -> (TreePath -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath Ptr TreePath
path ((TreePath -> IO ()) -> IO ()) -> (TreePath -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \path' :: TreePath
path' -> do
(ManagedPtr TreeIter -> TreeIter)
-> Ptr TreeIter -> (TreeIter -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter Ptr TreeIter
iter ((TreeIter -> IO ()) -> IO ()) -> (TreeIter -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \iter' :: TreeIter
iter' -> do
TreeModelRowChangedCallback
_cb TreePath
path' TreeIter
iter'
onTreeModelRowInserted :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowInsertedCallback -> m SignalHandlerId
onTreeModelRowInserted :: a -> TreeModelRowChangedCallback -> m SignalHandlerId
onTreeModelRowInserted obj :: a
obj cb :: TreeModelRowChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowInsertedCallback TreeModelRowChangedCallback
cb
FunPtr C_TreeModelRowChangedCallback
cb'' <- C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowInsertedCallback C_TreeModelRowChangedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-inserted" FunPtr C_TreeModelRowChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTreeModelRowInserted :: (IsTreeModel a, MonadIO m) => a -> TreeModelRowInsertedCallback -> m SignalHandlerId
afterTreeModelRowInserted :: a -> TreeModelRowChangedCallback -> m SignalHandlerId
afterTreeModelRowInserted obj :: a
obj cb :: TreeModelRowChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TreeModelRowChangedCallback
cb' = TreeModelRowChangedCallback -> C_TreeModelRowChangedCallback
wrap_TreeModelRowInsertedCallback TreeModelRowChangedCallback
cb
FunPtr C_TreeModelRowChangedCallback
cb'' <- C_TreeModelRowChangedCallback
-> IO (FunPtr C_TreeModelRowChangedCallback)
mk_TreeModelRowInsertedCallback C_TreeModelRowChangedCallback
cb'
a
-> Text
-> FunPtr C_TreeModelRowChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "row-inserted" FunPtr C_TreeModelRowChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TreeModelRowInsertedSignalInfo
instance SignalInfo TreeModelRowInsertedSignalInfo where
type HaskellCallbackType TreeModelRowInsertedSignalInfo = TreeModelRowInsertedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TreeModelRowInsertedCallback cb
cb'' <- mk_TreeModelRowInsertedCallback cb'
connectSignalFunPtr obj "row-inserted" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TreeModel = TreeModelSignalList
type TreeModelSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("rowChanged", TreeModelRowChangedSignalInfo), '("rowDeleted", TreeModelRowDeletedSignalInfo), '("rowHasChildToggled", TreeModelRowHasChildToggledSignalInfo), '("rowInserted", TreeModelRowInsertedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_model_get_type"
c_gtk_tree_model_get_type :: IO GType
instance GObject TreeModel where
gobjectType :: IO GType
gobjectType = IO GType
c_gtk_tree_model_get_type
instance B.GValue.IsGValue TreeModel where
toGValue :: TreeModel -> IO GValue
toGValue o :: TreeModel
o = do
GType
gtype <- IO GType
c_gtk_tree_model_get_type
TreeModel -> (Ptr TreeModel -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TreeModel
o (GType
-> (GValue -> Ptr TreeModel -> IO ()) -> Ptr TreeModel -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr TreeModel -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO TreeModel
fromGValue gv :: GValue
gv = do
Ptr TreeModel
ptr <- GValue -> IO (Ptr TreeModel)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr TreeModel)
(ManagedPtr TreeModel -> TreeModel)
-> Ptr TreeModel -> IO TreeModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr TreeModel -> TreeModel
TreeModel Ptr TreeModel
ptr
class (GObject o, O.IsDescendantOf TreeModel o) => IsTreeModel o
instance (GObject o, O.IsDescendantOf TreeModel o) => IsTreeModel o
instance O.HasParentTypes TreeModel
type instance O.ParentTypes TreeModel = '[GObject.Object.Object]
toTreeModel :: (MonadIO m, IsTreeModel o) => o -> m TreeModel
toTreeModel :: o -> m TreeModel
toTreeModel = IO TreeModel -> m TreeModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeModel -> m TreeModel)
-> (o -> IO TreeModel) -> o -> m TreeModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TreeModel -> TreeModel) -> o -> IO TreeModel
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr TreeModel -> TreeModel
TreeModel
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TreeModel
type instance O.AttributeList TreeModel = TreeModelAttributeList
type TreeModelAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveTreeModelMethod (t :: Symbol) (o :: *) :: * where
ResolveTreeModelMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTreeModelMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTreeModelMethod "filterNew" o = TreeModelFilterNewMethodInfo
ResolveTreeModelMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTreeModelMethod "foreach" o = TreeModelForeachMethodInfo
ResolveTreeModelMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTreeModelMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTreeModelMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTreeModelMethod "iterChildren" o = TreeModelIterChildrenMethodInfo
ResolveTreeModelMethod "iterHasChild" o = TreeModelIterHasChildMethodInfo
ResolveTreeModelMethod "iterNChildren" o = TreeModelIterNChildrenMethodInfo
ResolveTreeModelMethod "iterNext" o = TreeModelIterNextMethodInfo
ResolveTreeModelMethod "iterNthChild" o = TreeModelIterNthChildMethodInfo
ResolveTreeModelMethod "iterParent" o = TreeModelIterParentMethodInfo
ResolveTreeModelMethod "iterPrevious" o = TreeModelIterPreviousMethodInfo
ResolveTreeModelMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTreeModelMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTreeModelMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTreeModelMethod "refNode" o = TreeModelRefNodeMethodInfo
ResolveTreeModelMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTreeModelMethod "rowChanged" o = TreeModelRowChangedMethodInfo
ResolveTreeModelMethod "rowDeleted" o = TreeModelRowDeletedMethodInfo
ResolveTreeModelMethod "rowHasChildToggled" o = TreeModelRowHasChildToggledMethodInfo
ResolveTreeModelMethod "rowInserted" o = TreeModelRowInsertedMethodInfo
ResolveTreeModelMethod "rowsReordered" o = TreeModelRowsReorderedMethodInfo
ResolveTreeModelMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTreeModelMethod "sortNewWithModel" o = TreeModelSortNewWithModelMethodInfo
ResolveTreeModelMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTreeModelMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTreeModelMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTreeModelMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTreeModelMethod "unrefNode" o = TreeModelUnrefNodeMethodInfo
ResolveTreeModelMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTreeModelMethod "getColumnType" o = TreeModelGetColumnTypeMethodInfo
ResolveTreeModelMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTreeModelMethod "getFlags" o = TreeModelGetFlagsMethodInfo
ResolveTreeModelMethod "getIter" o = TreeModelGetIterMethodInfo
ResolveTreeModelMethod "getIterFirst" o = TreeModelGetIterFirstMethodInfo
ResolveTreeModelMethod "getIterFromString" o = TreeModelGetIterFromStringMethodInfo
ResolveTreeModelMethod "getNColumns" o = TreeModelGetNColumnsMethodInfo
ResolveTreeModelMethod "getPath" o = TreeModelGetPathMethodInfo
ResolveTreeModelMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTreeModelMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTreeModelMethod "getStringFromIter" o = TreeModelGetStringFromIterMethodInfo
ResolveTreeModelMethod "getValue" o = TreeModelGetValueMethodInfo
ResolveTreeModelMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTreeModelMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTreeModelMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTreeModelMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreeModelMethod t TreeModel, O.MethodInfo info TreeModel p) => OL.IsLabel t (TreeModel -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "gtk_tree_model_filter_new" gtk_tree_model_filter_new ::
Ptr TreeModel ->
Ptr Gtk.TreePath.TreePath ->
IO (Ptr TreeModel)
treeModelFilterNew ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Maybe (Gtk.TreePath.TreePath)
-> m TreeModel
treeModelFilterNew :: a -> Maybe TreePath -> m TreeModel
treeModelFilterNew childModel :: a
childModel root :: Maybe TreePath
root = 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 TreeModel
childModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
childModel
Ptr TreePath
maybeRoot <- case Maybe TreePath
root of
Nothing -> Ptr TreePath -> IO (Ptr TreePath)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreePath
forall a. Ptr a
nullPtr
Just jRoot :: TreePath
jRoot -> do
Ptr TreePath
jRoot' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
jRoot
Ptr TreePath -> IO (Ptr TreePath)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreePath
jRoot'
Ptr TreeModel
result <- Ptr TreeModel -> Ptr TreePath -> IO (Ptr TreeModel)
gtk_tree_model_filter_new Ptr TreeModel
childModel' Ptr TreePath
maybeRoot
Text -> Ptr TreeModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "treeModelFilterNew" 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
wrapObject ManagedPtr TreeModel -> TreeModel
TreeModel) Ptr TreeModel
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
childModel
Maybe TreePath -> (TreePath -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TreePath
root TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
TreeModel -> IO TreeModel
forall (m :: * -> *) a. Monad m => a -> m a
return TreeModel
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelFilterNewMethodInfo
instance (signature ~ (Maybe (Gtk.TreePath.TreePath) -> m TreeModel), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelFilterNewMethodInfo a signature where
overloadedMethod = treeModelFilterNew
#endif
foreign import ccall "gtk_tree_model_foreach" gtk_tree_model_foreach ::
Ptr TreeModel ->
FunPtr Gtk.Callbacks.C_TreeModelForeachFunc ->
Ptr () ->
IO ()
treeModelForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.Callbacks.TreeModelForeachFunc
-> m ()
treeModelForeach :: a -> TreeModelForeachFunc -> m ()
treeModelForeach model :: a
model func :: TreeModelForeachFunc
func = 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 TreeModel
model' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
model
FunPtr C_TreeModelForeachFunc
func' <- C_TreeModelForeachFunc -> IO (FunPtr C_TreeModelForeachFunc)
Gtk.Callbacks.mk_TreeModelForeachFunc (Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
-> TreeModelForeachFunc_WithClosures -> C_TreeModelForeachFunc
Gtk.Callbacks.wrap_TreeModelForeachFunc Maybe (Ptr (FunPtr C_TreeModelForeachFunc))
forall a. Maybe a
Nothing (TreeModelForeachFunc -> TreeModelForeachFunc_WithClosures
Gtk.Callbacks.drop_closures_TreeModelForeachFunc TreeModelForeachFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr TreeModel -> FunPtr C_TreeModelForeachFunc -> Ptr () -> IO ()
gtk_tree_model_foreach Ptr TreeModel
model' FunPtr C_TreeModelForeachFunc
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TreeModelForeachFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TreeModelForeachFunc
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
model
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelForeachMethodInfo
instance (signature ~ (Gtk.Callbacks.TreeModelForeachFunc -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelForeachMethodInfo a signature where
overloadedMethod = treeModelForeach
#endif
foreign import ccall "gtk_tree_model_get_column_type" gtk_tree_model_get_column_type ::
Ptr TreeModel ->
Int32 ->
IO CGType
treeModelGetColumnType ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Int32
-> m GType
treeModelGetColumnType :: a -> Int32 -> m GType
treeModelGetColumnType treeModel :: a
treeModel index_ :: Int32
index_ = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
CGType
result <- Ptr TreeModel -> Int32 -> IO CGType
gtk_tree_model_get_column_type Ptr TreeModel
treeModel' Int32
index_
let result' :: GType
result' = CGType -> GType
GType CGType
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelGetColumnTypeMethodInfo
instance (signature ~ (Int32 -> m GType), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetColumnTypeMethodInfo a signature where
overloadedMethod = treeModelGetColumnType
#endif
foreign import ccall "gtk_tree_model_get_flags" gtk_tree_model_get_flags ::
Ptr TreeModel ->
IO CUInt
treeModelGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> m [Gtk.Flags.TreeModelFlags]
treeModelGetFlags :: a -> m [TreeModelFlags]
treeModelGetFlags treeModel :: a
treeModel = IO [TreeModelFlags] -> m [TreeModelFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TreeModelFlags] -> m [TreeModelFlags])
-> IO [TreeModelFlags] -> m [TreeModelFlags]
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
CUInt
result <- Ptr TreeModel -> IO CUInt
gtk_tree_model_get_flags Ptr TreeModel
treeModel'
let result' :: [TreeModelFlags]
result' = CUInt -> [TreeModelFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
[TreeModelFlags] -> IO [TreeModelFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [TreeModelFlags]
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelGetFlagsMethodInfo
instance (signature ~ (m [Gtk.Flags.TreeModelFlags]), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetFlagsMethodInfo a signature where
overloadedMethod = treeModelGetFlags
#endif
foreign import ccall "gtk_tree_model_get_iter" gtk_tree_model_get_iter ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr Gtk.TreePath.TreePath ->
IO CInt
treeModelGetIter ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> m ((Bool, Gtk.TreeIter.TreeIter))
treeModelGetIter :: a -> TreePath -> m (Bool, TreeIter)
treeModelGetIter treeModel :: a
treeModel path :: TreePath
path = IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TreeIter) -> m (Bool, TreeIter))
-> IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> Ptr TreePath -> IO CInt
gtk_tree_model_get_iter Ptr TreeModel
treeModel' Ptr TreeIter
iter Ptr TreePath
path'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
(Bool, TreeIter) -> IO (Bool, TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TreeIter
iter')
#if defined(ENABLE_OVERLOADING)
data TreeModelGetIterMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> m ((Bool, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetIterMethodInfo a signature where
overloadedMethod = treeModelGetIter
#endif
foreign import ccall "gtk_tree_model_get_iter_first" gtk_tree_model_get_iter_first ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeModelGetIterFirst ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> m ((Bool, Gtk.TreeIter.TreeIter))
treeModelGetIterFirst :: a -> m (Bool, TreeIter)
treeModelGetIterFirst treeModel :: a
treeModel = IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TreeIter) -> m (Bool, TreeIter))
-> IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> IO CInt
gtk_tree_model_get_iter_first Ptr TreeModel
treeModel' Ptr TreeIter
iter
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
(Bool, TreeIter) -> IO (Bool, TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TreeIter
iter')
#if defined(ENABLE_OVERLOADING)
data TreeModelGetIterFirstMethodInfo
instance (signature ~ (m ((Bool, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetIterFirstMethodInfo a signature where
overloadedMethod = treeModelGetIterFirst
#endif
foreign import ccall "gtk_tree_model_get_iter_from_string" gtk_tree_model_get_iter_from_string ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
CString ->
IO CInt
treeModelGetIterFromString ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> T.Text
-> m ((Bool, Gtk.TreeIter.TreeIter))
treeModelGetIterFromString :: a -> Text -> m (Bool, TreeIter)
treeModelGetIterFromString treeModel :: a
treeModel pathString :: Text
pathString = IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TreeIter) -> m (Bool, TreeIter))
-> IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
CString
pathString' <- Text -> IO CString
textToCString Text
pathString
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> CString -> IO CInt
gtk_tree_model_get_iter_from_string Ptr TreeModel
treeModel' Ptr TreeIter
iter CString
pathString'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
pathString'
(Bool, TreeIter) -> IO (Bool, TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TreeIter
iter')
#if defined(ENABLE_OVERLOADING)
data TreeModelGetIterFromStringMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetIterFromStringMethodInfo a signature where
overloadedMethod = treeModelGetIterFromString
#endif
foreign import ccall "gtk_tree_model_get_n_columns" gtk_tree_model_get_n_columns ::
Ptr TreeModel ->
IO Int32
treeModelGetNColumns ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> m Int32
treeModelGetNColumns :: a -> m Int32
treeModelGetNColumns treeModel :: a
treeModel = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Int32
result <- Ptr TreeModel -> IO Int32
gtk_tree_model_get_n_columns Ptr TreeModel
treeModel'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TreeModelGetNColumnsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetNColumnsMethodInfo a signature where
overloadedMethod = treeModelGetNColumns
#endif
foreign import ccall "gtk_tree_model_get_path" gtk_tree_model_get_path ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO (Ptr Gtk.TreePath.TreePath)
treeModelGetPath ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m Gtk.TreePath.TreePath
treeModelGetPath :: a -> TreeIter -> m TreePath
treeModelGetPath treeModel :: a
treeModel iter :: TreeIter
iter = IO TreePath -> m TreePath
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreePath -> m TreePath) -> IO TreePath -> m TreePath
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreePath
result <- Ptr TreeModel -> Ptr TreeIter -> IO (Ptr TreePath)
gtk_tree_model_get_path Ptr TreeModel
treeModel' Ptr TreeIter
iter'
Text -> Ptr TreePath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "treeModelGetPath" Ptr TreePath
result
TreePath
result' <- ((ManagedPtr TreePath -> TreePath) -> Ptr TreePath -> IO TreePath
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreePath -> TreePath
Gtk.TreePath.TreePath) Ptr TreePath
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
TreePath -> IO TreePath
forall (m :: * -> *) a. Monad m => a -> m a
return TreePath
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelGetPathMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m Gtk.TreePath.TreePath), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetPathMethodInfo a signature where
overloadedMethod = treeModelGetPath
#endif
foreign import ccall "gtk_tree_model_get_string_from_iter" gtk_tree_model_get_string_from_iter ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO CString
treeModelGetStringFromIter ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m T.Text
treeModelGetStringFromIter :: a -> TreeIter -> m Text
treeModelGetStringFromIter treeModel :: a
treeModel iter :: TreeIter
iter = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
CString
result <- Ptr TreeModel -> Ptr TreeIter -> IO CString
gtk_tree_model_get_string_from_iter Ptr TreeModel
treeModel' Ptr TreeIter
iter'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "treeModelGetStringFromIter" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelGetStringFromIterMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m T.Text), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetStringFromIterMethodInfo a signature where
overloadedMethod = treeModelGetStringFromIter
#endif
foreign import ccall "gtk_tree_model_get_value" gtk_tree_model_get_value ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
Int32 ->
Ptr GValue ->
IO ()
treeModelGetValue ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> Int32
-> m (GValue)
treeModelGetValue :: a -> TreeIter -> Int32 -> m GValue
treeModelGetValue treeModel :: a
treeModel iter :: TreeIter
iter column :: Int32
column = IO GValue -> m GValue
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr GValue
value <- Int -> IO (Ptr GValue)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 24 :: IO (Ptr GValue)
Ptr TreeModel -> Ptr TreeIter -> Int32 -> Ptr GValue -> IO ()
gtk_tree_model_get_value Ptr TreeModel
treeModel' Ptr TreeIter
iter' Int32
column Ptr GValue
value
GValue
value' <- ((ManagedPtr GValue -> GValue) -> Ptr GValue -> IO GValue
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr GValue -> GValue
GValue) Ptr GValue
value
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
value'
#if defined(ENABLE_OVERLOADING)
data TreeModelGetValueMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> Int32 -> m (GValue)), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelGetValueMethodInfo a signature where
overloadedMethod = treeModelGetValue
#endif
foreign import ccall "gtk_tree_model_iter_children" gtk_tree_model_iter_children ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeModelIterChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Maybe (Gtk.TreeIter.TreeIter)
-> m ((Bool, Gtk.TreeIter.TreeIter))
treeModelIterChildren :: a -> Maybe TreeIter -> m (Bool, TreeIter)
treeModelIterChildren treeModel :: a
treeModel parent :: Maybe TreeIter
parent = IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TreeIter) -> m (Bool, TreeIter))
-> IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
Ptr TreeIter
maybeParent <- case Maybe TreeIter
parent of
Nothing -> Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
forall a. Ptr a
nullPtr
Just jParent :: TreeIter
jParent -> do
Ptr TreeIter
jParent' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
jParent
Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
jParent'
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> Ptr TreeIter -> IO CInt
gtk_tree_model_iter_children Ptr TreeModel
treeModel' Ptr TreeIter
iter Ptr TreeIter
maybeParent
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
Maybe TreeIter -> (TreeIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TreeIter
parent TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
(Bool, TreeIter) -> IO (Bool, TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TreeIter
iter')
#if defined(ENABLE_OVERLOADING)
data TreeModelIterChildrenMethodInfo
instance (signature ~ (Maybe (Gtk.TreeIter.TreeIter) -> m ((Bool, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterChildrenMethodInfo a signature where
overloadedMethod = treeModelIterChildren
#endif
foreign import ccall "gtk_tree_model_iter_has_child" gtk_tree_model_iter_has_child ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeModelIterHasChild ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m Bool
treeModelIterHasChild :: a -> TreeIter -> m Bool
treeModelIterHasChild treeModel :: a
treeModel iter :: TreeIter
iter = 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 TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> IO CInt
gtk_tree_model_iter_has_child Ptr TreeModel
treeModel' Ptr TreeIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelIterHasChildMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m Bool), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterHasChildMethodInfo a signature where
overloadedMethod = treeModelIterHasChild
#endif
foreign import ccall "gtk_tree_model_iter_n_children" gtk_tree_model_iter_n_children ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO Int32
treeModelIterNChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Maybe (Gtk.TreeIter.TreeIter)
-> m Int32
treeModelIterNChildren :: a -> Maybe TreeIter -> m Int32
treeModelIterNChildren treeModel :: a
treeModel iter :: Maybe TreeIter
iter = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
maybeIter <- case Maybe TreeIter
iter of
Nothing -> Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
forall a. Ptr a
nullPtr
Just jIter :: TreeIter
jIter -> do
Ptr TreeIter
jIter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
jIter
Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
jIter'
Int32
result <- Ptr TreeModel -> Ptr TreeIter -> IO Int32
gtk_tree_model_iter_n_children Ptr TreeModel
treeModel' Ptr TreeIter
maybeIter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
Maybe TreeIter -> (TreeIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TreeIter
iter TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TreeModelIterNChildrenMethodInfo
instance (signature ~ (Maybe (Gtk.TreeIter.TreeIter) -> m Int32), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterNChildrenMethodInfo a signature where
overloadedMethod = treeModelIterNChildren
#endif
foreign import ccall "gtk_tree_model_iter_next" gtk_tree_model_iter_next ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeModelIterNext ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m Bool
treeModelIterNext :: a -> TreeIter -> m Bool
treeModelIterNext treeModel :: a
treeModel iter :: TreeIter
iter = 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 TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> IO CInt
gtk_tree_model_iter_next Ptr TreeModel
treeModel' Ptr TreeIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelIterNextMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m Bool), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterNextMethodInfo a signature where
overloadedMethod = treeModelIterNext
#endif
foreign import ccall "gtk_tree_model_iter_nth_child" gtk_tree_model_iter_nth_child ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr Gtk.TreeIter.TreeIter ->
Int32 ->
IO CInt
treeModelIterNthChild ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Maybe (Gtk.TreeIter.TreeIter)
-> Int32
-> m ((Bool, Gtk.TreeIter.TreeIter))
treeModelIterNthChild :: a -> Maybe TreeIter -> Int32 -> m (Bool, TreeIter)
treeModelIterNthChild treeModel :: a
treeModel parent :: Maybe TreeIter
parent n :: Int32
n = IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TreeIter) -> m (Bool, TreeIter))
-> IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
Ptr TreeIter
maybeParent <- case Maybe TreeIter
parent of
Nothing -> Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
forall a. Ptr a
nullPtr
Just jParent :: TreeIter
jParent -> do
Ptr TreeIter
jParent' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
jParent
Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
jParent'
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> Ptr TreeIter -> Int32 -> IO CInt
gtk_tree_model_iter_nth_child Ptr TreeModel
treeModel' Ptr TreeIter
iter Ptr TreeIter
maybeParent Int32
n
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
Maybe TreeIter -> (TreeIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TreeIter
parent TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
(Bool, TreeIter) -> IO (Bool, TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TreeIter
iter')
#if defined(ENABLE_OVERLOADING)
data TreeModelIterNthChildMethodInfo
instance (signature ~ (Maybe (Gtk.TreeIter.TreeIter) -> Int32 -> m ((Bool, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterNthChildMethodInfo a signature where
overloadedMethod = treeModelIterNthChild
#endif
foreign import ccall "gtk_tree_model_iter_parent" gtk_tree_model_iter_parent ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeModelIterParent ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m ((Bool, Gtk.TreeIter.TreeIter))
treeModelIterParent :: a -> TreeIter -> m (Bool, TreeIter)
treeModelIterParent treeModel :: a
treeModel child :: TreeIter
child = IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, TreeIter) -> m (Bool, TreeIter))
-> IO (Bool, TreeIter) -> m (Bool, TreeIter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter <- Int -> IO (Ptr TreeIter)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 32 :: IO (Ptr Gtk.TreeIter.TreeIter)
Ptr TreeIter
child' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
child
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> Ptr TreeIter -> IO CInt
gtk_tree_model_iter_parent Ptr TreeModel
treeModel' Ptr TreeIter
iter Ptr TreeIter
child'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
TreeIter
iter' <- ((ManagedPtr TreeIter -> TreeIter) -> Ptr TreeIter -> IO TreeIter
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr TreeIter -> TreeIter
Gtk.TreeIter.TreeIter) Ptr TreeIter
iter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
child
(Bool, TreeIter) -> IO (Bool, TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', TreeIter
iter')
#if defined(ENABLE_OVERLOADING)
data TreeModelIterParentMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m ((Bool, Gtk.TreeIter.TreeIter))), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterParentMethodInfo a signature where
overloadedMethod = treeModelIterParent
#endif
foreign import ccall "gtk_tree_model_iter_previous" gtk_tree_model_iter_previous ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO CInt
treeModelIterPrevious ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m Bool
treeModelIterPrevious :: a -> TreeIter -> m Bool
treeModelIterPrevious treeModel :: a
treeModel iter :: TreeIter
iter = 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 TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
CInt
result <- Ptr TreeModel -> Ptr TreeIter -> IO CInt
gtk_tree_model_iter_previous Ptr TreeModel
treeModel' Ptr TreeIter
iter'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelIterPreviousMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m Bool), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelIterPreviousMethodInfo a signature where
overloadedMethod = treeModelIterPrevious
#endif
foreign import ccall "gtk_tree_model_ref_node" gtk_tree_model_ref_node ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeModelRefNode ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m ()
treeModelRefNode :: a -> TreeIter -> m ()
treeModelRefNode treeModel :: a
treeModel iter :: TreeIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeModel -> Ptr TreeIter -> IO ()
gtk_tree_model_ref_node Ptr TreeModel
treeModel' Ptr TreeIter
iter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelRefNodeMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelRefNodeMethodInfo a signature where
overloadedMethod = treeModelRefNode
#endif
foreign import ccall "gtk_tree_model_row_changed" gtk_tree_model_row_changed ::
Ptr TreeModel ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeModelRowChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> Gtk.TreeIter.TreeIter
-> m ()
treeModelRowChanged :: a -> TreePath -> TreeIter -> m ()
treeModelRowChanged treeModel :: a
treeModel path :: TreePath
path iter :: TreeIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeModel -> Ptr TreePath -> Ptr TreeIter -> IO ()
gtk_tree_model_row_changed Ptr TreeModel
treeModel' Ptr TreePath
path' Ptr TreeIter
iter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelRowChangedMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelRowChangedMethodInfo a signature where
overloadedMethod = treeModelRowChanged
#endif
foreign import ccall "gtk_tree_model_row_deleted" gtk_tree_model_row_deleted ::
Ptr TreeModel ->
Ptr Gtk.TreePath.TreePath ->
IO ()
treeModelRowDeleted ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> m ()
treeModelRowDeleted :: a -> TreePath -> m ()
treeModelRowDeleted treeModel :: a
treeModel path :: 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 TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeModel -> Ptr TreePath -> IO ()
gtk_tree_model_row_deleted Ptr TreeModel
treeModel' Ptr TreePath
path'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
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)
data TreeModelRowDeletedMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelRowDeletedMethodInfo a signature where
overloadedMethod = treeModelRowDeleted
#endif
foreign import ccall "gtk_tree_model_row_has_child_toggled" gtk_tree_model_row_has_child_toggled ::
Ptr TreeModel ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeModelRowHasChildToggled ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> Gtk.TreeIter.TreeIter
-> m ()
treeModelRowHasChildToggled :: a -> TreePath -> TreeIter -> m ()
treeModelRowHasChildToggled treeModel :: a
treeModel path :: TreePath
path iter :: TreeIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeModel -> Ptr TreePath -> Ptr TreeIter -> IO ()
gtk_tree_model_row_has_child_toggled Ptr TreeModel
treeModel' Ptr TreePath
path' Ptr TreeIter
iter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelRowHasChildToggledMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelRowHasChildToggledMethodInfo a signature where
overloadedMethod = treeModelRowHasChildToggled
#endif
foreign import ccall "gtk_tree_model_row_inserted" gtk_tree_model_row_inserted ::
Ptr TreeModel ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeModelRowInserted ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> Gtk.TreeIter.TreeIter
-> m ()
treeModelRowInserted :: a -> TreePath -> TreeIter -> m ()
treeModelRowInserted treeModel :: a
treeModel path :: TreePath
path iter :: TreeIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeModel -> Ptr TreePath -> Ptr TreeIter -> IO ()
gtk_tree_model_row_inserted Ptr TreeModel
treeModel' Ptr TreePath
path' Ptr TreeIter
iter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelRowInsertedMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelRowInsertedMethodInfo a signature where
overloadedMethod = treeModelRowInserted
#endif
foreign import ccall "gtk_tree_model_rows_reordered_with_length" gtk_tree_model_rows_reordered_with_length ::
Ptr TreeModel ->
Ptr Gtk.TreePath.TreePath ->
Ptr Gtk.TreeIter.TreeIter ->
Ptr Int32 ->
Int32 ->
IO ()
treeModelRowsReordered ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreePath.TreePath
-> Maybe (Gtk.TreeIter.TreeIter)
-> [Int32]
-> m ()
treeModelRowsReordered :: a -> TreePath -> Maybe TreeIter -> [Int32] -> m ()
treeModelRowsReordered treeModel :: a
treeModel path :: TreePath
path iter :: Maybe TreeIter
iter newOrder :: [Int32]
newOrder = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let length_ :: Int32
length_ = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Int32] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [Int32]
newOrder
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreePath
path' <- TreePath -> IO (Ptr TreePath)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreePath
path
Ptr TreeIter
maybeIter <- case Maybe TreeIter
iter of
Nothing -> Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
forall a. Ptr a
nullPtr
Just jIter :: TreeIter
jIter -> do
Ptr TreeIter
jIter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
jIter
Ptr TreeIter -> IO (Ptr TreeIter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TreeIter
jIter'
Ptr Int32
newOrder' <- [Int32] -> IO (Ptr Int32)
forall a. Storable a => [a] -> IO (Ptr a)
packStorableArray [Int32]
newOrder
Ptr TreeModel
-> Ptr TreePath -> Ptr TreeIter -> Ptr Int32 -> Int32 -> IO ()
gtk_tree_model_rows_reordered_with_length Ptr TreeModel
treeModel' Ptr TreePath
path' Ptr TreeIter
maybeIter Ptr Int32
newOrder' Int32
length_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreePath -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreePath
path
Maybe TreeIter -> (TreeIter -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TreeIter
iter TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
newOrder'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelRowsReorderedMethodInfo
instance (signature ~ (Gtk.TreePath.TreePath -> Maybe (Gtk.TreeIter.TreeIter) -> [Int32] -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelRowsReorderedMethodInfo a signature where
overloadedMethod = treeModelRowsReordered
#endif
foreign import ccall "gtk_tree_model_sort_new_with_model" gtk_tree_model_sort_new_with_model ::
Ptr TreeModel ->
IO (Ptr TreeModel)
treeModelSortNewWithModel ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> m TreeModel
treeModelSortNewWithModel :: a -> m TreeModel
treeModelSortNewWithModel childModel :: a
childModel = 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 TreeModel
childModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
childModel
Ptr TreeModel
result <- Ptr TreeModel -> IO (Ptr TreeModel)
gtk_tree_model_sort_new_with_model Ptr TreeModel
childModel'
Text -> Ptr TreeModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "treeModelSortNewWithModel" 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
wrapObject ManagedPtr TreeModel -> TreeModel
TreeModel) Ptr TreeModel
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
childModel
TreeModel -> IO TreeModel
forall (m :: * -> *) a. Monad m => a -> m a
return TreeModel
result'
#if defined(ENABLE_OVERLOADING)
data TreeModelSortNewWithModelMethodInfo
instance (signature ~ (m TreeModel), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelSortNewWithModelMethodInfo a signature where
overloadedMethod = treeModelSortNewWithModel
#endif
foreign import ccall "gtk_tree_model_unref_node" gtk_tree_model_unref_node ::
Ptr TreeModel ->
Ptr Gtk.TreeIter.TreeIter ->
IO ()
treeModelUnrefNode ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeModel a) =>
a
-> Gtk.TreeIter.TreeIter
-> m ()
treeModelUnrefNode :: a -> TreeIter -> m ()
treeModelUnrefNode treeModel :: a
treeModel iter :: TreeIter
iter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeModel
treeModel' <- a -> IO (Ptr TreeModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
treeModel
Ptr TreeIter
iter' <- TreeIter -> IO (Ptr TreeIter)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TreeIter
iter
Ptr TreeModel -> Ptr TreeIter -> IO ()
gtk_tree_model_unref_node Ptr TreeModel
treeModel' Ptr TreeIter
iter'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
treeModel
TreeIter -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TreeIter
iter
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeModelUnrefNodeMethodInfo
instance (signature ~ (Gtk.TreeIter.TreeIter -> m ()), MonadIO m, IsTreeModel a) => O.MethodInfo TreeModelUnrefNodeMethodInfo a signature where
overloadedMethod = treeModelUnrefNode
#endif