{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.TreeListRow
(
TreeListRow(..) ,
IsTreeListRow ,
toTreeListRow ,
noTreeListRow ,
#if defined(ENABLE_OVERLOADING)
ResolveTreeListRowMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeListRowGetChildRowMethodInfo ,
#endif
treeListRowGetChildRow ,
#if defined(ENABLE_OVERLOADING)
TreeListRowGetChildrenMethodInfo ,
#endif
treeListRowGetChildren ,
#if defined(ENABLE_OVERLOADING)
TreeListRowGetDepthMethodInfo ,
#endif
treeListRowGetDepth ,
#if defined(ENABLE_OVERLOADING)
TreeListRowGetExpandedMethodInfo ,
#endif
treeListRowGetExpanded ,
#if defined(ENABLE_OVERLOADING)
TreeListRowGetItemMethodInfo ,
#endif
treeListRowGetItem ,
#if defined(ENABLE_OVERLOADING)
TreeListRowGetParentMethodInfo ,
#endif
treeListRowGetParent ,
#if defined(ENABLE_OVERLOADING)
TreeListRowGetPositionMethodInfo ,
#endif
treeListRowGetPosition ,
#if defined(ENABLE_OVERLOADING)
TreeListRowIsExpandableMethodInfo ,
#endif
treeListRowIsExpandable ,
#if defined(ENABLE_OVERLOADING)
TreeListRowSetExpandedMethodInfo ,
#endif
treeListRowSetExpanded ,
#if defined(ENABLE_OVERLOADING)
TreeListRowChildrenPropertyInfo ,
#endif
getTreeListRowChildren ,
#if defined(ENABLE_OVERLOADING)
treeListRowChildren ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeListRowDepthPropertyInfo ,
#endif
getTreeListRowDepth ,
#if defined(ENABLE_OVERLOADING)
treeListRowDepth ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeListRowExpandablePropertyInfo ,
#endif
getTreeListRowExpandable ,
#if defined(ENABLE_OVERLOADING)
treeListRowExpandable ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeListRowExpandedPropertyInfo ,
#endif
constructTreeListRowExpanded ,
getTreeListRowExpanded ,
setTreeListRowExpanded ,
#if defined(ENABLE_OVERLOADING)
treeListRowExpanded ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeListRowItemPropertyInfo ,
#endif
getTreeListRowItem ,
#if defined(ENABLE_OVERLOADING)
treeListRowItem ,
#endif
) 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.Gio.Interfaces.ListModel as Gio.ListModel
newtype TreeListRow = TreeListRow (ManagedPtr TreeListRow)
deriving (TreeListRow -> TreeListRow -> Bool
(TreeListRow -> TreeListRow -> Bool)
-> (TreeListRow -> TreeListRow -> Bool) -> Eq TreeListRow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TreeListRow -> TreeListRow -> Bool
$c/= :: TreeListRow -> TreeListRow -> Bool
== :: TreeListRow -> TreeListRow -> Bool
$c== :: TreeListRow -> TreeListRow -> Bool
Eq)
foreign import ccall "gtk_tree_list_row_get_type"
c_gtk_tree_list_row_get_type :: IO GType
instance GObject TreeListRow where
gobjectType :: IO GType
gobjectType = IO GType
c_gtk_tree_list_row_get_type
instance B.GValue.IsGValue TreeListRow where
toGValue :: TreeListRow -> IO GValue
toGValue o :: TreeListRow
o = do
GType
gtype <- IO GType
c_gtk_tree_list_row_get_type
TreeListRow -> (Ptr TreeListRow -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TreeListRow
o (GType
-> (GValue -> Ptr TreeListRow -> IO ())
-> Ptr TreeListRow
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr TreeListRow -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO TreeListRow
fromGValue gv :: GValue
gv = do
Ptr TreeListRow
ptr <- GValue -> IO (Ptr TreeListRow)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr TreeListRow)
(ManagedPtr TreeListRow -> TreeListRow)
-> Ptr TreeListRow -> IO TreeListRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr TreeListRow -> TreeListRow
TreeListRow Ptr TreeListRow
ptr
class (GObject o, O.IsDescendantOf TreeListRow o) => IsTreeListRow o
instance (GObject o, O.IsDescendantOf TreeListRow o) => IsTreeListRow o
instance O.HasParentTypes TreeListRow
type instance O.ParentTypes TreeListRow = '[GObject.Object.Object]
toTreeListRow :: (MonadIO m, IsTreeListRow o) => o -> m TreeListRow
toTreeListRow :: o -> m TreeListRow
toTreeListRow = IO TreeListRow -> m TreeListRow
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeListRow -> m TreeListRow)
-> (o -> IO TreeListRow) -> o -> m TreeListRow
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TreeListRow -> TreeListRow) -> o -> IO TreeListRow
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr TreeListRow -> TreeListRow
TreeListRow
noTreeListRow :: Maybe TreeListRow
noTreeListRow :: Maybe TreeListRow
noTreeListRow = Maybe TreeListRow
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTreeListRowMethod (t :: Symbol) (o :: *) :: * where
ResolveTreeListRowMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTreeListRowMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTreeListRowMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTreeListRowMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTreeListRowMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTreeListRowMethod "isExpandable" o = TreeListRowIsExpandableMethodInfo
ResolveTreeListRowMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTreeListRowMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTreeListRowMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTreeListRowMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTreeListRowMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTreeListRowMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTreeListRowMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTreeListRowMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTreeListRowMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTreeListRowMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTreeListRowMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTreeListRowMethod "getChildRow" o = TreeListRowGetChildRowMethodInfo
ResolveTreeListRowMethod "getChildren" o = TreeListRowGetChildrenMethodInfo
ResolveTreeListRowMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTreeListRowMethod "getDepth" o = TreeListRowGetDepthMethodInfo
ResolveTreeListRowMethod "getExpanded" o = TreeListRowGetExpandedMethodInfo
ResolveTreeListRowMethod "getItem" o = TreeListRowGetItemMethodInfo
ResolveTreeListRowMethod "getParent" o = TreeListRowGetParentMethodInfo
ResolveTreeListRowMethod "getPosition" o = TreeListRowGetPositionMethodInfo
ResolveTreeListRowMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTreeListRowMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTreeListRowMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTreeListRowMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTreeListRowMethod "setExpanded" o = TreeListRowSetExpandedMethodInfo
ResolveTreeListRowMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTreeListRowMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreeListRowMethod t TreeListRow, O.MethodInfo info TreeListRow p) => OL.IsLabel t (TreeListRow -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getTreeListRowChildren :: (MonadIO m, IsTreeListRow o) => o -> m (Maybe Gio.ListModel.ListModel)
getTreeListRowChildren :: o -> m (Maybe ListModel)
getTreeListRowChildren obj :: o
obj = IO (Maybe ListModel) -> m (Maybe ListModel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ListModel) -> m (Maybe ListModel))
-> IO (Maybe ListModel) -> m (Maybe ListModel)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ListModel -> ListModel)
-> IO (Maybe ListModel)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "children" ManagedPtr ListModel -> ListModel
Gio.ListModel.ListModel
#if defined(ENABLE_OVERLOADING)
data TreeListRowChildrenPropertyInfo
instance AttrInfo TreeListRowChildrenPropertyInfo where
type AttrAllowedOps TreeListRowChildrenPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TreeListRowChildrenPropertyInfo = IsTreeListRow
type AttrSetTypeConstraint TreeListRowChildrenPropertyInfo = (~) ()
type AttrTransferTypeConstraint TreeListRowChildrenPropertyInfo = (~) ()
type AttrTransferType TreeListRowChildrenPropertyInfo = ()
type AttrGetType TreeListRowChildrenPropertyInfo = (Maybe Gio.ListModel.ListModel)
type AttrLabel TreeListRowChildrenPropertyInfo = "children"
type AttrOrigin TreeListRowChildrenPropertyInfo = TreeListRow
attrGet = getTreeListRowChildren
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getTreeListRowDepth :: (MonadIO m, IsTreeListRow o) => o -> m Word32
getTreeListRowDepth :: o -> m Word32
getTreeListRowDepth obj :: o
obj = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj "depth"
#if defined(ENABLE_OVERLOADING)
data TreeListRowDepthPropertyInfo
instance AttrInfo TreeListRowDepthPropertyInfo where
type AttrAllowedOps TreeListRowDepthPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TreeListRowDepthPropertyInfo = IsTreeListRow
type AttrSetTypeConstraint TreeListRowDepthPropertyInfo = (~) ()
type AttrTransferTypeConstraint TreeListRowDepthPropertyInfo = (~) ()
type AttrTransferType TreeListRowDepthPropertyInfo = ()
type AttrGetType TreeListRowDepthPropertyInfo = Word32
type AttrLabel TreeListRowDepthPropertyInfo = "depth"
type AttrOrigin TreeListRowDepthPropertyInfo = TreeListRow
attrGet = getTreeListRowDepth
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getTreeListRowExpandable :: (MonadIO m, IsTreeListRow o) => o -> m Bool
getTreeListRowExpandable :: o -> m Bool
getTreeListRowExpandable obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "expandable"
#if defined(ENABLE_OVERLOADING)
data TreeListRowExpandablePropertyInfo
instance AttrInfo TreeListRowExpandablePropertyInfo where
type AttrAllowedOps TreeListRowExpandablePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint TreeListRowExpandablePropertyInfo = IsTreeListRow
type AttrSetTypeConstraint TreeListRowExpandablePropertyInfo = (~) ()
type AttrTransferTypeConstraint TreeListRowExpandablePropertyInfo = (~) ()
type AttrTransferType TreeListRowExpandablePropertyInfo = ()
type AttrGetType TreeListRowExpandablePropertyInfo = Bool
type AttrLabel TreeListRowExpandablePropertyInfo = "expandable"
type AttrOrigin TreeListRowExpandablePropertyInfo = TreeListRow
attrGet = getTreeListRowExpandable
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getTreeListRowExpanded :: (MonadIO m, IsTreeListRow o) => o -> m Bool
getTreeListRowExpanded :: o -> m Bool
getTreeListRowExpanded obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "expanded"
setTreeListRowExpanded :: (MonadIO m, IsTreeListRow o) => o -> Bool -> m ()
setTreeListRowExpanded :: o -> Bool -> m ()
setTreeListRowExpanded obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "expanded" Bool
val
constructTreeListRowExpanded :: (IsTreeListRow o) => Bool -> IO (GValueConstruct o)
constructTreeListRowExpanded :: Bool -> IO (GValueConstruct o)
constructTreeListRowExpanded val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "expanded" Bool
val
#if defined(ENABLE_OVERLOADING)
data TreeListRowExpandedPropertyInfo
instance AttrInfo TreeListRowExpandedPropertyInfo where
type AttrAllowedOps TreeListRowExpandedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint TreeListRowExpandedPropertyInfo = IsTreeListRow
type AttrSetTypeConstraint TreeListRowExpandedPropertyInfo = (~) Bool
type AttrTransferTypeConstraint TreeListRowExpandedPropertyInfo = (~) Bool
type AttrTransferType TreeListRowExpandedPropertyInfo = Bool
type AttrGetType TreeListRowExpandedPropertyInfo = Bool
type AttrLabel TreeListRowExpandedPropertyInfo = "expanded"
type AttrOrigin TreeListRowExpandedPropertyInfo = TreeListRow
attrGet = getTreeListRowExpanded
attrSet = setTreeListRowExpanded
attrTransfer _ v = do
return v
attrConstruct = constructTreeListRowExpanded
attrClear = undefined
#endif
getTreeListRowItem :: (MonadIO m, IsTreeListRow o) => o -> m (Maybe GObject.Object.Object)
getTreeListRowItem :: o -> m (Maybe Object)
getTreeListRowItem obj :: o
obj = IO (Maybe Object) -> m (Maybe Object)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Object -> Object) -> IO (Maybe Object)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "item" ManagedPtr Object -> Object
GObject.Object.Object
#if defined(ENABLE_OVERLOADING)
data TreeListRowItemPropertyInfo
instance AttrInfo TreeListRowItemPropertyInfo where
type AttrAllowedOps TreeListRowItemPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TreeListRowItemPropertyInfo = IsTreeListRow
type AttrSetTypeConstraint TreeListRowItemPropertyInfo = (~) ()
type AttrTransferTypeConstraint TreeListRowItemPropertyInfo = (~) ()
type AttrTransferType TreeListRowItemPropertyInfo = ()
type AttrGetType TreeListRowItemPropertyInfo = (Maybe GObject.Object.Object)
type AttrLabel TreeListRowItemPropertyInfo = "item"
type AttrOrigin TreeListRowItemPropertyInfo = TreeListRow
attrGet = getTreeListRowItem
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TreeListRow
type instance O.AttributeList TreeListRow = TreeListRowAttributeList
type TreeListRowAttributeList = ('[ '("children", TreeListRowChildrenPropertyInfo), '("depth", TreeListRowDepthPropertyInfo), '("expandable", TreeListRowExpandablePropertyInfo), '("expanded", TreeListRowExpandedPropertyInfo), '("item", TreeListRowItemPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
treeListRowChildren :: AttrLabelProxy "children"
treeListRowChildren = AttrLabelProxy
treeListRowDepth :: AttrLabelProxy "depth"
treeListRowDepth = AttrLabelProxy
treeListRowExpandable :: AttrLabelProxy "expandable"
treeListRowExpandable = AttrLabelProxy
treeListRowExpanded :: AttrLabelProxy "expanded"
treeListRowExpanded = AttrLabelProxy
treeListRowItem :: AttrLabelProxy "item"
treeListRowItem = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TreeListRow = TreeListRowSignalList
type TreeListRowSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_list_row_get_child_row" gtk_tree_list_row_get_child_row ::
Ptr TreeListRow ->
Word32 ->
IO (Ptr TreeListRow)
treeListRowGetChildRow ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> Word32
-> m (Maybe TreeListRow)
treeListRowGetChildRow :: a -> Word32 -> m (Maybe TreeListRow)
treeListRowGetChildRow self :: a
self position :: Word32
position = IO (Maybe TreeListRow) -> m (Maybe TreeListRow)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreeListRow) -> m (Maybe TreeListRow))
-> IO (Maybe TreeListRow) -> m (Maybe TreeListRow)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr TreeListRow
result <- Ptr TreeListRow -> Word32 -> IO (Ptr TreeListRow)
gtk_tree_list_row_get_child_row Ptr TreeListRow
self' Word32
position
Maybe TreeListRow
maybeResult <- Ptr TreeListRow
-> (Ptr TreeListRow -> IO TreeListRow) -> IO (Maybe TreeListRow)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreeListRow
result ((Ptr TreeListRow -> IO TreeListRow) -> IO (Maybe TreeListRow))
-> (Ptr TreeListRow -> IO TreeListRow) -> IO (Maybe TreeListRow)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr TreeListRow
result' -> do
TreeListRow
result'' <- ((ManagedPtr TreeListRow -> TreeListRow)
-> Ptr TreeListRow -> IO TreeListRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeListRow -> TreeListRow
TreeListRow) Ptr TreeListRow
result'
TreeListRow -> IO TreeListRow
forall (m :: * -> *) a. Monad m => a -> m a
return TreeListRow
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe TreeListRow -> IO (Maybe TreeListRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeListRow
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetChildRowMethodInfo
instance (signature ~ (Word32 -> m (Maybe TreeListRow)), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetChildRowMethodInfo a signature where
overloadedMethod = treeListRowGetChildRow
#endif
foreign import ccall "gtk_tree_list_row_get_children" gtk_tree_list_row_get_children ::
Ptr TreeListRow ->
IO (Ptr Gio.ListModel.ListModel)
treeListRowGetChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m (Maybe Gio.ListModel.ListModel)
treeListRowGetChildren :: a -> m (Maybe ListModel)
treeListRowGetChildren self :: a
self = IO (Maybe ListModel) -> m (Maybe ListModel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ListModel) -> m (Maybe ListModel))
-> IO (Maybe ListModel) -> m (Maybe ListModel)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr ListModel
result <- Ptr TreeListRow -> IO (Ptr ListModel)
gtk_tree_list_row_get_children Ptr TreeListRow
self'
Maybe ListModel
maybeResult <- Ptr ListModel
-> (Ptr ListModel -> IO ListModel) -> IO (Maybe ListModel)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ListModel
result ((Ptr ListModel -> IO ListModel) -> IO (Maybe ListModel))
-> (Ptr ListModel -> IO ListModel) -> IO (Maybe ListModel)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr ListModel
result' -> do
ListModel
result'' <- ((ManagedPtr ListModel -> ListModel)
-> Ptr ListModel -> IO ListModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ListModel -> ListModel
Gio.ListModel.ListModel) Ptr ListModel
result'
ListModel -> IO ListModel
forall (m :: * -> *) a. Monad m => a -> m a
return ListModel
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe ListModel -> IO (Maybe ListModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ListModel
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetChildrenMethodInfo
instance (signature ~ (m (Maybe Gio.ListModel.ListModel)), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetChildrenMethodInfo a signature where
overloadedMethod = treeListRowGetChildren
#endif
foreign import ccall "gtk_tree_list_row_get_depth" gtk_tree_list_row_get_depth ::
Ptr TreeListRow ->
IO Word32
treeListRowGetDepth ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m Word32
treeListRowGetDepth :: a -> m Word32
treeListRowGetDepth self :: a
self = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Word32
result <- Ptr TreeListRow -> IO Word32
gtk_tree_list_row_get_depth Ptr TreeListRow
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetDepthMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetDepthMethodInfo a signature where
overloadedMethod = treeListRowGetDepth
#endif
foreign import ccall "gtk_tree_list_row_get_expanded" gtk_tree_list_row_get_expanded ::
Ptr TreeListRow ->
IO CInt
treeListRowGetExpanded ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m Bool
treeListRowGetExpanded :: a -> m Bool
treeListRowGetExpanded self :: a
self = 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 TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr TreeListRow -> IO CInt
gtk_tree_list_row_get_expanded Ptr TreeListRow
self'
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
self
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetExpandedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetExpandedMethodInfo a signature where
overloadedMethod = treeListRowGetExpanded
#endif
foreign import ccall "gtk_tree_list_row_get_item" gtk_tree_list_row_get_item ::
Ptr TreeListRow ->
IO (Ptr GObject.Object.Object)
treeListRowGetItem ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m (Maybe GObject.Object.Object)
treeListRowGetItem :: a -> m (Maybe Object)
treeListRowGetItem self :: a
self = IO (Maybe Object) -> m (Maybe Object)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Object
result <- Ptr TreeListRow -> IO (Ptr Object)
gtk_tree_list_row_get_item Ptr TreeListRow
self'
Maybe Object
maybeResult <- Ptr Object -> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Object
result ((Ptr Object -> IO Object) -> IO (Maybe Object))
-> (Ptr Object -> IO Object) -> IO (Maybe Object)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Object
result' -> do
Object
result'' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
result'
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Object -> IO (Maybe Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Object
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetItemMethodInfo
instance (signature ~ (m (Maybe GObject.Object.Object)), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetItemMethodInfo a signature where
overloadedMethod = treeListRowGetItem
#endif
foreign import ccall "gtk_tree_list_row_get_parent" gtk_tree_list_row_get_parent ::
Ptr TreeListRow ->
IO (Ptr TreeListRow)
treeListRowGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m (Maybe TreeListRow)
treeListRowGetParent :: a -> m (Maybe TreeListRow)
treeListRowGetParent self :: a
self = IO (Maybe TreeListRow) -> m (Maybe TreeListRow)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TreeListRow) -> m (Maybe TreeListRow))
-> IO (Maybe TreeListRow) -> m (Maybe TreeListRow)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr TreeListRow
result <- Ptr TreeListRow -> IO (Ptr TreeListRow)
gtk_tree_list_row_get_parent Ptr TreeListRow
self'
Maybe TreeListRow
maybeResult <- Ptr TreeListRow
-> (Ptr TreeListRow -> IO TreeListRow) -> IO (Maybe TreeListRow)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TreeListRow
result ((Ptr TreeListRow -> IO TreeListRow) -> IO (Maybe TreeListRow))
-> (Ptr TreeListRow -> IO TreeListRow) -> IO (Maybe TreeListRow)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr TreeListRow
result' -> do
TreeListRow
result'' <- ((ManagedPtr TreeListRow -> TreeListRow)
-> Ptr TreeListRow -> IO TreeListRow
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeListRow -> TreeListRow
TreeListRow) Ptr TreeListRow
result'
TreeListRow -> IO TreeListRow
forall (m :: * -> *) a. Monad m => a -> m a
return TreeListRow
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe TreeListRow -> IO (Maybe TreeListRow)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeListRow
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetParentMethodInfo
instance (signature ~ (m (Maybe TreeListRow)), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetParentMethodInfo a signature where
overloadedMethod = treeListRowGetParent
#endif
foreign import ccall "gtk_tree_list_row_get_position" gtk_tree_list_row_get_position ::
Ptr TreeListRow ->
IO Word32
treeListRowGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m Word32
treeListRowGetPosition :: a -> m Word32
treeListRowGetPosition self :: a
self = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Word32
result <- Ptr TreeListRow -> IO Word32
gtk_tree_list_row_get_position Ptr TreeListRow
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data TreeListRowGetPositionMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowGetPositionMethodInfo a signature where
overloadedMethod = treeListRowGetPosition
#endif
foreign import ccall "gtk_tree_list_row_is_expandable" gtk_tree_list_row_is_expandable ::
Ptr TreeListRow ->
IO CInt
treeListRowIsExpandable ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> m Bool
treeListRowIsExpandable :: a -> m Bool
treeListRowIsExpandable self :: a
self = 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 TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr TreeListRow -> IO CInt
gtk_tree_list_row_is_expandable Ptr TreeListRow
self'
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
self
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TreeListRowIsExpandableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowIsExpandableMethodInfo a signature where
overloadedMethod = treeListRowIsExpandable
#endif
foreign import ccall "gtk_tree_list_row_set_expanded" gtk_tree_list_row_set_expanded ::
Ptr TreeListRow ->
CInt ->
IO ()
treeListRowSetExpanded ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRow a) =>
a
-> Bool
-> m ()
treeListRowSetExpanded :: a -> Bool -> m ()
treeListRowSetExpanded self :: a
self expanded :: Bool
expanded = 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 TreeListRow
self' <- a -> IO (Ptr TreeListRow)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let expanded' :: CInt
expanded' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
expanded
Ptr TreeListRow -> CInt -> IO ()
gtk_tree_list_row_set_expanded Ptr TreeListRow
self' CInt
expanded'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeListRowSetExpandedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsTreeListRow a) => O.MethodInfo TreeListRowSetExpandedMethodInfo a signature where
overloadedMethod = treeListRowSetExpanded
#endif