{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.TreeListRowSorter
(
TreeListRowSorter(..) ,
IsTreeListRowSorter ,
toTreeListRowSorter ,
#if defined(ENABLE_OVERLOADING)
ResolveTreeListRowSorterMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TreeListRowSorterGetSorterMethodInfo ,
#endif
treeListRowSorterGetSorter ,
treeListRowSorterNew ,
#if defined(ENABLE_OVERLOADING)
TreeListRowSorterSetSorterMethodInfo ,
#endif
treeListRowSorterSetSorter ,
#if defined(ENABLE_OVERLOADING)
TreeListRowSorterSorterPropertyInfo ,
#endif
clearTreeListRowSorterSorter ,
constructTreeListRowSorterSorter ,
getTreeListRowSorterSorter ,
setTreeListRowSorterSorter ,
#if defined(ENABLE_OVERLOADING)
treeListRowSorterSorter ,
#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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
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 Control.Monad.IO.Class as MIO
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 GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.Sorter as Gtk.Sorter
newtype TreeListRowSorter = TreeListRowSorter (SP.ManagedPtr TreeListRowSorter)
deriving (TreeListRowSorter -> TreeListRowSorter -> Bool
(TreeListRowSorter -> TreeListRowSorter -> Bool)
-> (TreeListRowSorter -> TreeListRowSorter -> Bool)
-> Eq TreeListRowSorter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TreeListRowSorter -> TreeListRowSorter -> Bool
$c/= :: TreeListRowSorter -> TreeListRowSorter -> Bool
== :: TreeListRowSorter -> TreeListRowSorter -> Bool
$c== :: TreeListRowSorter -> TreeListRowSorter -> Bool
Eq)
instance SP.ManagedPtrNewtype TreeListRowSorter where
toManagedPtr :: TreeListRowSorter -> ManagedPtr TreeListRowSorter
toManagedPtr (TreeListRowSorter ManagedPtr TreeListRowSorter
p) = ManagedPtr TreeListRowSorter
p
foreign import ccall "gtk_tree_list_row_sorter_get_type"
c_gtk_tree_list_row_sorter_get_type :: IO B.Types.GType
instance B.Types.TypedObject TreeListRowSorter where
glibType :: IO GType
glibType = IO GType
c_gtk_tree_list_row_sorter_get_type
instance B.Types.GObject TreeListRowSorter
class (SP.GObject o, O.IsDescendantOf TreeListRowSorter o) => IsTreeListRowSorter o
instance (SP.GObject o, O.IsDescendantOf TreeListRowSorter o) => IsTreeListRowSorter o
instance O.HasParentTypes TreeListRowSorter
type instance O.ParentTypes TreeListRowSorter = '[Gtk.Sorter.Sorter, GObject.Object.Object]
toTreeListRowSorter :: (MIO.MonadIO m, IsTreeListRowSorter o) => o -> m TreeListRowSorter
toTreeListRowSorter :: forall (m :: * -> *) o.
(MonadIO m, IsTreeListRowSorter o) =>
o -> m TreeListRowSorter
toTreeListRowSorter = IO TreeListRowSorter -> m TreeListRowSorter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TreeListRowSorter -> m TreeListRowSorter)
-> (o -> IO TreeListRowSorter) -> o -> m TreeListRowSorter
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TreeListRowSorter -> TreeListRowSorter)
-> o -> IO TreeListRowSorter
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TreeListRowSorter -> TreeListRowSorter
TreeListRowSorter
instance B.GValue.IsGValue (Maybe TreeListRowSorter) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_tree_list_row_sorter_get_type
gvalueSet_ :: Ptr GValue -> Maybe TreeListRowSorter -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TreeListRowSorter
P.Nothing = Ptr GValue -> Ptr TreeListRowSorter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TreeListRowSorter
forall a. Ptr a
FP.nullPtr :: FP.Ptr TreeListRowSorter)
gvalueSet_ Ptr GValue
gv (P.Just TreeListRowSorter
obj) = TreeListRowSorter -> (Ptr TreeListRowSorter -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TreeListRowSorter
obj (Ptr GValue -> Ptr TreeListRowSorter -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TreeListRowSorter)
gvalueGet_ Ptr GValue
gv = do
Ptr TreeListRowSorter
ptr <- Ptr GValue -> IO (Ptr TreeListRowSorter)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TreeListRowSorter)
if Ptr TreeListRowSorter
ptr Ptr TreeListRowSorter -> Ptr TreeListRowSorter -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr TreeListRowSorter
forall a. Ptr a
FP.nullPtr
then TreeListRowSorter -> Maybe TreeListRowSorter
forall a. a -> Maybe a
P.Just (TreeListRowSorter -> Maybe TreeListRowSorter)
-> IO TreeListRowSorter -> IO (Maybe TreeListRowSorter)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr TreeListRowSorter -> TreeListRowSorter)
-> Ptr TreeListRowSorter -> IO TreeListRowSorter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr TreeListRowSorter -> TreeListRowSorter
TreeListRowSorter Ptr TreeListRowSorter
ptr
else Maybe TreeListRowSorter -> IO (Maybe TreeListRowSorter)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TreeListRowSorter
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTreeListRowSorterMethod (t :: Symbol) (o :: *) :: * where
ResolveTreeListRowSorterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTreeListRowSorterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTreeListRowSorterMethod "changed" o = Gtk.Sorter.SorterChangedMethodInfo
ResolveTreeListRowSorterMethod "compare" o = Gtk.Sorter.SorterCompareMethodInfo
ResolveTreeListRowSorterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTreeListRowSorterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTreeListRowSorterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTreeListRowSorterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTreeListRowSorterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTreeListRowSorterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTreeListRowSorterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTreeListRowSorterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTreeListRowSorterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTreeListRowSorterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTreeListRowSorterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTreeListRowSorterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTreeListRowSorterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTreeListRowSorterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTreeListRowSorterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTreeListRowSorterMethod "getOrder" o = Gtk.Sorter.SorterGetOrderMethodInfo
ResolveTreeListRowSorterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTreeListRowSorterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTreeListRowSorterMethod "getSorter" o = TreeListRowSorterGetSorterMethodInfo
ResolveTreeListRowSorterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTreeListRowSorterMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTreeListRowSorterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTreeListRowSorterMethod "setSorter" o = TreeListRowSorterSetSorterMethodInfo
ResolveTreeListRowSorterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTreeListRowSorterMethod t TreeListRowSorter, O.OverloadedMethod info TreeListRowSorter p) => OL.IsLabel t (TreeListRowSorter -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveTreeListRowSorterMethod t TreeListRowSorter, O.OverloadedMethod info TreeListRowSorter p, R.HasField t TreeListRowSorter p) => R.HasField t TreeListRowSorter p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTreeListRowSorterMethod t TreeListRowSorter, O.OverloadedMethodInfo info TreeListRowSorter) => OL.IsLabel t (O.MethodProxy info TreeListRowSorter) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m (Maybe Gtk.Sorter.Sorter)
getTreeListRowSorterSorter :: forall (m :: * -> *) o.
(MonadIO m, IsTreeListRowSorter o) =>
o -> m (Maybe Sorter)
getTreeListRowSorterSorter o
obj = IO (Maybe Sorter) -> m (Maybe Sorter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Sorter) -> m (Maybe Sorter))
-> IO (Maybe Sorter) -> m (Maybe Sorter)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Sorter -> Sorter) -> IO (Maybe Sorter)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"sorter" ManagedPtr Sorter -> Sorter
Gtk.Sorter.Sorter
setTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o, Gtk.Sorter.IsSorter a) => o -> a -> m ()
setTreeListRowSorterSorter :: forall (m :: * -> *) o a.
(MonadIO m, IsTreeListRowSorter o, IsSorter a) =>
o -> a -> m ()
setTreeListRowSorterSorter o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"sorter" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructTreeListRowSorterSorter :: (IsTreeListRowSorter o, MIO.MonadIO m, Gtk.Sorter.IsSorter a) => a -> m (GValueConstruct o)
constructTreeListRowSorterSorter :: forall o (m :: * -> *) a.
(IsTreeListRowSorter o, MonadIO m, IsSorter a) =>
a -> m (GValueConstruct o)
constructTreeListRowSorterSorter a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"sorter" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearTreeListRowSorterSorter :: (MonadIO m, IsTreeListRowSorter o) => o -> m ()
clearTreeListRowSorterSorter :: forall (m :: * -> *) o.
(MonadIO m, IsTreeListRowSorter o) =>
o -> m ()
clearTreeListRowSorterSorter o
obj = 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 -> Maybe Sorter -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"sorter" (Maybe Sorter
forall a. Maybe a
Nothing :: Maybe Gtk.Sorter.Sorter)
#if defined(ENABLE_OVERLOADING)
data TreeListRowSorterSorterPropertyInfo
instance AttrInfo TreeListRowSorterSorterPropertyInfo where
type AttrAllowedOps TreeListRowSorterSorterPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint TreeListRowSorterSorterPropertyInfo = IsTreeListRowSorter
type AttrSetTypeConstraint TreeListRowSorterSorterPropertyInfo = Gtk.Sorter.IsSorter
type AttrTransferTypeConstraint TreeListRowSorterSorterPropertyInfo = Gtk.Sorter.IsSorter
type AttrTransferType TreeListRowSorterSorterPropertyInfo = Gtk.Sorter.Sorter
type AttrGetType TreeListRowSorterSorterPropertyInfo = (Maybe Gtk.Sorter.Sorter)
type AttrLabel TreeListRowSorterSorterPropertyInfo = "sorter"
type AttrOrigin TreeListRowSorterSorterPropertyInfo = TreeListRowSorter
attrGet = getTreeListRowSorterSorter
attrSet = setTreeListRowSorterSorter
attrTransfer _ v = do
unsafeCastTo Gtk.Sorter.Sorter v
attrConstruct = constructTreeListRowSorterSorter
attrClear = clearTreeListRowSorterSorter
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TreeListRowSorter
type instance O.AttributeList TreeListRowSorter = TreeListRowSorterAttributeList
type TreeListRowSorterAttributeList = ('[ '("sorter", TreeListRowSorterSorterPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
treeListRowSorterSorter :: AttrLabelProxy "sorter"
treeListRowSorterSorter = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TreeListRowSorter = TreeListRowSorterSignalList
type TreeListRowSorterSignalList = ('[ '("changed", Gtk.Sorter.SorterChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_tree_list_row_sorter_new" gtk_tree_list_row_sorter_new ::
Ptr Gtk.Sorter.Sorter ->
IO (Ptr TreeListRowSorter)
treeListRowSorterNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.Sorter.IsSorter a) =>
Maybe (a)
-> m TreeListRowSorter
treeListRowSorterNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSorter a) =>
Maybe a -> m TreeListRowSorter
treeListRowSorterNew Maybe a
sorter = IO TreeListRowSorter -> m TreeListRowSorter
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TreeListRowSorter -> m TreeListRowSorter)
-> IO TreeListRowSorter -> m TreeListRowSorter
forall a b. (a -> b) -> a -> b
$ do
Ptr Sorter
maybeSorter <- case Maybe a
sorter of
Maybe a
Nothing -> Ptr Sorter -> IO (Ptr Sorter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sorter
forall a. Ptr a
nullPtr
Just a
jSorter -> do
Ptr Sorter
jSorter' <- a -> IO (Ptr Sorter)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
jSorter
Ptr Sorter -> IO (Ptr Sorter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sorter
jSorter'
Ptr TreeListRowSorter
result <- Ptr Sorter -> IO (Ptr TreeListRowSorter)
gtk_tree_list_row_sorter_new Ptr Sorter
maybeSorter
Text -> Ptr TreeListRowSorter -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"treeListRowSorterNew" Ptr TreeListRowSorter
result
TreeListRowSorter
result' <- ((ManagedPtr TreeListRowSorter -> TreeListRowSorter)
-> Ptr TreeListRowSorter -> IO TreeListRowSorter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TreeListRowSorter -> TreeListRowSorter
TreeListRowSorter) Ptr TreeListRowSorter
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
sorter a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
TreeListRowSorter -> IO TreeListRowSorter
forall (m :: * -> *) a. Monad m => a -> m a
return TreeListRowSorter
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_tree_list_row_sorter_get_sorter" gtk_tree_list_row_sorter_get_sorter ::
Ptr TreeListRowSorter ->
IO (Ptr Gtk.Sorter.Sorter)
treeListRowSorterGetSorter ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRowSorter a) =>
a
-> m (Maybe Gtk.Sorter.Sorter)
treeListRowSorterGetSorter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTreeListRowSorter a) =>
a -> m (Maybe Sorter)
treeListRowSorterGetSorter a
self = IO (Maybe Sorter) -> m (Maybe Sorter)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Sorter) -> m (Maybe Sorter))
-> IO (Maybe Sorter) -> m (Maybe Sorter)
forall a b. (a -> b) -> a -> b
$ do
Ptr TreeListRowSorter
self' <- a -> IO (Ptr TreeListRowSorter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Sorter
result <- Ptr TreeListRowSorter -> IO (Ptr Sorter)
gtk_tree_list_row_sorter_get_sorter Ptr TreeListRowSorter
self'
Maybe Sorter
maybeResult <- Ptr Sorter -> (Ptr Sorter -> IO Sorter) -> IO (Maybe Sorter)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Sorter
result ((Ptr Sorter -> IO Sorter) -> IO (Maybe Sorter))
-> (Ptr Sorter -> IO Sorter) -> IO (Maybe Sorter)
forall a b. (a -> b) -> a -> b
$ \Ptr Sorter
result' -> do
Sorter
result'' <- ((ManagedPtr Sorter -> Sorter) -> Ptr Sorter -> IO Sorter
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Sorter -> Sorter
Gtk.Sorter.Sorter) Ptr Sorter
result'
Sorter -> IO Sorter
forall (m :: * -> *) a. Monad m => a -> m a
return Sorter
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Sorter -> IO (Maybe Sorter)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Sorter
maybeResult
#if defined(ENABLE_OVERLOADING)
data TreeListRowSorterGetSorterMethodInfo
instance (signature ~ (m (Maybe Gtk.Sorter.Sorter)), MonadIO m, IsTreeListRowSorter a) => O.OverloadedMethod TreeListRowSorterGetSorterMethodInfo a signature where
overloadedMethod = treeListRowSorterGetSorter
instance O.OverloadedMethodInfo TreeListRowSorterGetSorterMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TreeListRowSorter.treeListRowSorterGetSorter",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-TreeListRowSorter.html#v:treeListRowSorterGetSorter"
}
#endif
foreign import ccall "gtk_tree_list_row_sorter_set_sorter" gtk_tree_list_row_sorter_set_sorter ::
Ptr TreeListRowSorter ->
Ptr Gtk.Sorter.Sorter ->
IO ()
treeListRowSorterSetSorter ::
(B.CallStack.HasCallStack, MonadIO m, IsTreeListRowSorter a, Gtk.Sorter.IsSorter b) =>
a
-> Maybe (b)
-> m ()
treeListRowSorterSetSorter :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTreeListRowSorter a, IsSorter b) =>
a -> Maybe b -> m ()
treeListRowSorterSetSorter a
self Maybe b
sorter = 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 TreeListRowSorter
self' <- a -> IO (Ptr TreeListRowSorter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Sorter
maybeSorter <- case Maybe b
sorter of
Maybe b
Nothing -> Ptr Sorter -> IO (Ptr Sorter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sorter
forall a. Ptr a
nullPtr
Just b
jSorter -> do
Ptr Sorter
jSorter' <- b -> IO (Ptr Sorter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSorter
Ptr Sorter -> IO (Ptr Sorter)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Sorter
jSorter'
Ptr TreeListRowSorter -> Ptr Sorter -> IO ()
gtk_tree_list_row_sorter_set_sorter Ptr TreeListRowSorter
self' Ptr Sorter
maybeSorter
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
sorter b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TreeListRowSorterSetSorterMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsTreeListRowSorter a, Gtk.Sorter.IsSorter b) => O.OverloadedMethod TreeListRowSorterSetSorterMethodInfo a signature where
overloadedMethod = treeListRowSorterSetSorter
instance O.OverloadedMethodInfo TreeListRowSorterSetSorterMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TreeListRowSorter.treeListRowSorterSetSorter",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-TreeListRowSorter.html#v:treeListRowSorterSetSorter"
}
#endif