{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.SelectionFilterModel
(
SelectionFilterModel(..) ,
IsSelectionFilterModel ,
toSelectionFilterModel ,
#if defined(ENABLE_OVERLOADING)
ResolveSelectionFilterModelMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SelectionFilterModelGetModelMethodInfo ,
#endif
selectionFilterModelGetModel ,
selectionFilterModelNew ,
#if defined(ENABLE_OVERLOADING)
SelectionFilterModelSetModelMethodInfo ,
#endif
selectionFilterModelSetModel ,
#if defined(ENABLE_OVERLOADING)
SelectionFilterModelModelPropertyInfo ,
#endif
clearSelectionFilterModelModel ,
constructSelectionFilterModelModel ,
getSelectionFilterModelModel ,
#if defined(ENABLE_OVERLOADING)
selectionFilterModelModel ,
#endif
setSelectionFilterModelModel ,
) 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 qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.SelectionModel as Gtk.SelectionModel
newtype SelectionFilterModel = SelectionFilterModel (SP.ManagedPtr SelectionFilterModel)
deriving (SelectionFilterModel -> SelectionFilterModel -> Bool
(SelectionFilterModel -> SelectionFilterModel -> Bool)
-> (SelectionFilterModel -> SelectionFilterModel -> Bool)
-> Eq SelectionFilterModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SelectionFilterModel -> SelectionFilterModel -> Bool
$c/= :: SelectionFilterModel -> SelectionFilterModel -> Bool
== :: SelectionFilterModel -> SelectionFilterModel -> Bool
$c== :: SelectionFilterModel -> SelectionFilterModel -> Bool
Eq)
instance SP.ManagedPtrNewtype SelectionFilterModel where
toManagedPtr :: SelectionFilterModel -> ManagedPtr SelectionFilterModel
toManagedPtr (SelectionFilterModel ManagedPtr SelectionFilterModel
p) = ManagedPtr SelectionFilterModel
p
foreign import ccall "gtk_selection_filter_model_get_type"
c_gtk_selection_filter_model_get_type :: IO B.Types.GType
instance B.Types.TypedObject SelectionFilterModel where
glibType :: IO GType
glibType = IO GType
c_gtk_selection_filter_model_get_type
instance B.Types.GObject SelectionFilterModel
class (SP.GObject o, O.IsDescendantOf SelectionFilterModel o) => IsSelectionFilterModel o
instance (SP.GObject o, O.IsDescendantOf SelectionFilterModel o) => IsSelectionFilterModel o
instance O.HasParentTypes SelectionFilterModel
type instance O.ParentTypes SelectionFilterModel = '[GObject.Object.Object, Gio.ListModel.ListModel]
toSelectionFilterModel :: (MIO.MonadIO m, IsSelectionFilterModel o) => o -> m SelectionFilterModel
toSelectionFilterModel :: forall (m :: * -> *) o.
(MonadIO m, IsSelectionFilterModel o) =>
o -> m SelectionFilterModel
toSelectionFilterModel = IO SelectionFilterModel -> m SelectionFilterModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO SelectionFilterModel -> m SelectionFilterModel)
-> (o -> IO SelectionFilterModel) -> o -> m SelectionFilterModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr SelectionFilterModel -> SelectionFilterModel)
-> o -> IO SelectionFilterModel
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr SelectionFilterModel -> SelectionFilterModel
SelectionFilterModel
instance B.GValue.IsGValue (Maybe SelectionFilterModel) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_selection_filter_model_get_type
gvalueSet_ :: Ptr GValue -> Maybe SelectionFilterModel -> IO ()
gvalueSet_ Ptr GValue
gv Maybe SelectionFilterModel
P.Nothing = Ptr GValue -> Ptr SelectionFilterModel -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr SelectionFilterModel
forall a. Ptr a
FP.nullPtr :: FP.Ptr SelectionFilterModel)
gvalueSet_ Ptr GValue
gv (P.Just SelectionFilterModel
obj) = SelectionFilterModel
-> (Ptr SelectionFilterModel -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr SelectionFilterModel
obj (Ptr GValue -> Ptr SelectionFilterModel -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe SelectionFilterModel)
gvalueGet_ Ptr GValue
gv = do
Ptr SelectionFilterModel
ptr <- Ptr GValue -> IO (Ptr SelectionFilterModel)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr SelectionFilterModel)
if Ptr SelectionFilterModel
ptr Ptr SelectionFilterModel -> Ptr SelectionFilterModel -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr SelectionFilterModel
forall a. Ptr a
FP.nullPtr
then SelectionFilterModel -> Maybe SelectionFilterModel
forall a. a -> Maybe a
P.Just (SelectionFilterModel -> Maybe SelectionFilterModel)
-> IO SelectionFilterModel -> IO (Maybe SelectionFilterModel)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr SelectionFilterModel -> SelectionFilterModel)
-> Ptr SelectionFilterModel -> IO SelectionFilterModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr SelectionFilterModel -> SelectionFilterModel
SelectionFilterModel Ptr SelectionFilterModel
ptr
else Maybe SelectionFilterModel -> IO (Maybe SelectionFilterModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SelectionFilterModel
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSelectionFilterModelMethod (t :: Symbol) (o :: *) :: * where
ResolveSelectionFilterModelMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSelectionFilterModelMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSelectionFilterModelMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSelectionFilterModelMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSelectionFilterModelMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSelectionFilterModelMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSelectionFilterModelMethod "itemsChanged" o = Gio.ListModel.ListModelItemsChangedMethodInfo
ResolveSelectionFilterModelMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSelectionFilterModelMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSelectionFilterModelMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSelectionFilterModelMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSelectionFilterModelMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSelectionFilterModelMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSelectionFilterModelMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSelectionFilterModelMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSelectionFilterModelMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSelectionFilterModelMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSelectionFilterModelMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSelectionFilterModelMethod "getItem" o = Gio.ListModel.ListModelGetItemMethodInfo
ResolveSelectionFilterModelMethod "getItemType" o = Gio.ListModel.ListModelGetItemTypeMethodInfo
ResolveSelectionFilterModelMethod "getModel" o = SelectionFilterModelGetModelMethodInfo
ResolveSelectionFilterModelMethod "getNItems" o = Gio.ListModel.ListModelGetNItemsMethodInfo
ResolveSelectionFilterModelMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSelectionFilterModelMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSelectionFilterModelMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSelectionFilterModelMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSelectionFilterModelMethod "setModel" o = SelectionFilterModelSetModelMethodInfo
ResolveSelectionFilterModelMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSelectionFilterModelMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSelectionFilterModelMethod t SelectionFilterModel, O.OverloadedMethod info SelectionFilterModel p) => OL.IsLabel t (SelectionFilterModel -> 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 ~ ResolveSelectionFilterModelMethod t SelectionFilterModel, O.OverloadedMethod info SelectionFilterModel p, R.HasField t SelectionFilterModel p) => R.HasField t SelectionFilterModel p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveSelectionFilterModelMethod t SelectionFilterModel, O.OverloadedMethodInfo info SelectionFilterModel) => OL.IsLabel t (O.MethodProxy info SelectionFilterModel) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m (Maybe Gtk.SelectionModel.SelectionModel)
getSelectionFilterModelModel :: forall (m :: * -> *) o.
(MonadIO m, IsSelectionFilterModel o) =>
o -> m (Maybe SelectionModel)
getSelectionFilterModelModel o
obj = IO (Maybe SelectionModel) -> m (Maybe SelectionModel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe SelectionModel) -> m (Maybe SelectionModel))
-> IO (Maybe SelectionModel) -> m (Maybe SelectionModel)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr SelectionModel -> SelectionModel)
-> IO (Maybe SelectionModel)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"model" ManagedPtr SelectionModel -> SelectionModel
Gtk.SelectionModel.SelectionModel
setSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o, Gtk.SelectionModel.IsSelectionModel a) => o -> a -> m ()
setSelectionFilterModelModel :: forall (m :: * -> *) o a.
(MonadIO m, IsSelectionFilterModel o, IsSelectionModel a) =>
o -> a -> m ()
setSelectionFilterModelModel 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
"model" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructSelectionFilterModelModel :: (IsSelectionFilterModel o, MIO.MonadIO m, Gtk.SelectionModel.IsSelectionModel a) => a -> m (GValueConstruct o)
constructSelectionFilterModelModel :: forall o (m :: * -> *) a.
(IsSelectionFilterModel o, MonadIO m, IsSelectionModel a) =>
a -> m (GValueConstruct o)
constructSelectionFilterModelModel 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
"model" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearSelectionFilterModelModel :: (MonadIO m, IsSelectionFilterModel o) => o -> m ()
clearSelectionFilterModelModel :: forall (m :: * -> *) o.
(MonadIO m, IsSelectionFilterModel o) =>
o -> m ()
clearSelectionFilterModelModel 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 SelectionModel -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"model" (Maybe SelectionModel
forall a. Maybe a
Nothing :: Maybe Gtk.SelectionModel.SelectionModel)
#if defined(ENABLE_OVERLOADING)
data SelectionFilterModelModelPropertyInfo
instance AttrInfo SelectionFilterModelModelPropertyInfo where
type AttrAllowedOps SelectionFilterModelModelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SelectionFilterModelModelPropertyInfo = IsSelectionFilterModel
type AttrSetTypeConstraint SelectionFilterModelModelPropertyInfo = Gtk.SelectionModel.IsSelectionModel
type AttrTransferTypeConstraint SelectionFilterModelModelPropertyInfo = Gtk.SelectionModel.IsSelectionModel
type AttrTransferType SelectionFilterModelModelPropertyInfo = Gtk.SelectionModel.SelectionModel
type AttrGetType SelectionFilterModelModelPropertyInfo = (Maybe Gtk.SelectionModel.SelectionModel)
type AttrLabel SelectionFilterModelModelPropertyInfo = "model"
type AttrOrigin SelectionFilterModelModelPropertyInfo = SelectionFilterModel
attrGet = getSelectionFilterModelModel
attrSet = setSelectionFilterModelModel
attrTransfer _ v = do
unsafeCastTo Gtk.SelectionModel.SelectionModel v
attrConstruct = constructSelectionFilterModelModel
attrClear = clearSelectionFilterModelModel
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SelectionFilterModel
type instance O.AttributeList SelectionFilterModel = SelectionFilterModelAttributeList
type SelectionFilterModelAttributeList = ('[ '("model", SelectionFilterModelModelPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
selectionFilterModelModel :: AttrLabelProxy "model"
selectionFilterModelModel = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList SelectionFilterModel = SelectionFilterModelSignalList
type SelectionFilterModelSignalList = ('[ '("itemsChanged", Gio.ListModel.ListModelItemsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_selection_filter_model_new" gtk_selection_filter_model_new ::
Ptr Gtk.SelectionModel.SelectionModel ->
IO (Ptr SelectionFilterModel)
selectionFilterModelNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.SelectionModel.IsSelectionModel a) =>
Maybe (a)
-> m SelectionFilterModel
selectionFilterModelNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSelectionModel a) =>
Maybe a -> m SelectionFilterModel
selectionFilterModelNew Maybe a
model = IO SelectionFilterModel -> m SelectionFilterModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SelectionFilterModel -> m SelectionFilterModel)
-> IO SelectionFilterModel -> m SelectionFilterModel
forall a b. (a -> b) -> a -> b
$ do
Ptr SelectionModel
maybeModel <- case Maybe a
model of
Maybe a
Nothing -> Ptr SelectionModel -> IO (Ptr SelectionModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SelectionModel
forall a. Ptr a
nullPtr
Just a
jModel -> do
Ptr SelectionModel
jModel' <- a -> IO (Ptr SelectionModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jModel
Ptr SelectionModel -> IO (Ptr SelectionModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SelectionModel
jModel'
Ptr SelectionFilterModel
result <- Ptr SelectionModel -> IO (Ptr SelectionFilterModel)
gtk_selection_filter_model_new Ptr SelectionModel
maybeModel
Text -> Ptr SelectionFilterModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"selectionFilterModelNew" Ptr SelectionFilterModel
result
SelectionFilterModel
result' <- ((ManagedPtr SelectionFilterModel -> SelectionFilterModel)
-> Ptr SelectionFilterModel -> IO SelectionFilterModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SelectionFilterModel -> SelectionFilterModel
SelectionFilterModel) Ptr SelectionFilterModel
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
model a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
SelectionFilterModel -> IO SelectionFilterModel
forall (m :: * -> *) a. Monad m => a -> m a
return SelectionFilterModel
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_selection_filter_model_get_model" gtk_selection_filter_model_get_model ::
Ptr SelectionFilterModel ->
IO (Ptr Gtk.SelectionModel.SelectionModel)
selectionFilterModelGetModel ::
(B.CallStack.HasCallStack, MonadIO m, IsSelectionFilterModel a) =>
a
-> m (Maybe Gtk.SelectionModel.SelectionModel)
selectionFilterModelGetModel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSelectionFilterModel a) =>
a -> m (Maybe SelectionModel)
selectionFilterModelGetModel a
self = IO (Maybe SelectionModel) -> m (Maybe SelectionModel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe SelectionModel) -> m (Maybe SelectionModel))
-> IO (Maybe SelectionModel) -> m (Maybe SelectionModel)
forall a b. (a -> b) -> a -> b
$ do
Ptr SelectionFilterModel
self' <- a -> IO (Ptr SelectionFilterModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SelectionModel
result <- Ptr SelectionFilterModel -> IO (Ptr SelectionModel)
gtk_selection_filter_model_get_model Ptr SelectionFilterModel
self'
Maybe SelectionModel
maybeResult <- Ptr SelectionModel
-> (Ptr SelectionModel -> IO SelectionModel)
-> IO (Maybe SelectionModel)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr SelectionModel
result ((Ptr SelectionModel -> IO SelectionModel)
-> IO (Maybe SelectionModel))
-> (Ptr SelectionModel -> IO SelectionModel)
-> IO (Maybe SelectionModel)
forall a b. (a -> b) -> a -> b
$ \Ptr SelectionModel
result' -> do
SelectionModel
result'' <- ((ManagedPtr SelectionModel -> SelectionModel)
-> Ptr SelectionModel -> IO SelectionModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr SelectionModel -> SelectionModel
Gtk.SelectionModel.SelectionModel) Ptr SelectionModel
result'
SelectionModel -> IO SelectionModel
forall (m :: * -> *) a. Monad m => a -> m a
return SelectionModel
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe SelectionModel -> IO (Maybe SelectionModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe SelectionModel
maybeResult
#if defined(ENABLE_OVERLOADING)
data SelectionFilterModelGetModelMethodInfo
instance (signature ~ (m (Maybe Gtk.SelectionModel.SelectionModel)), MonadIO m, IsSelectionFilterModel a) => O.OverloadedMethod SelectionFilterModelGetModelMethodInfo a signature where
overloadedMethod = selectionFilterModelGetModel
instance O.OverloadedMethodInfo SelectionFilterModelGetModelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.SelectionFilterModel.selectionFilterModelGetModel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-SelectionFilterModel.html#v:selectionFilterModelGetModel"
}
#endif
foreign import ccall "gtk_selection_filter_model_set_model" gtk_selection_filter_model_set_model ::
Ptr SelectionFilterModel ->
Ptr Gtk.SelectionModel.SelectionModel ->
IO ()
selectionFilterModelSetModel ::
(B.CallStack.HasCallStack, MonadIO m, IsSelectionFilterModel a, Gtk.SelectionModel.IsSelectionModel b) =>
a
-> Maybe (b)
-> m ()
selectionFilterModelSetModel :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsSelectionFilterModel a,
IsSelectionModel b) =>
a -> Maybe b -> m ()
selectionFilterModelSetModel a
self Maybe b
model = 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 SelectionFilterModel
self' <- a -> IO (Ptr SelectionFilterModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr SelectionModel
maybeModel <- case Maybe b
model of
Maybe b
Nothing -> Ptr SelectionModel -> IO (Ptr SelectionModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SelectionModel
forall a. Ptr a
nullPtr
Just b
jModel -> do
Ptr SelectionModel
jModel' <- b -> IO (Ptr SelectionModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jModel
Ptr SelectionModel -> IO (Ptr SelectionModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr SelectionModel
jModel'
Ptr SelectionFilterModel -> Ptr SelectionModel -> IO ()
gtk_selection_filter_model_set_model Ptr SelectionFilterModel
self' Ptr SelectionModel
maybeModel
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
model b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SelectionFilterModelSetModelMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSelectionFilterModel a, Gtk.SelectionModel.IsSelectionModel b) => O.OverloadedMethod SelectionFilterModelSetModelMethodInfo a signature where
overloadedMethod = selectionFilterModelSetModel
instance O.OverloadedMethodInfo SelectionFilterModelSetModelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.SelectionFilterModel.selectionFilterModelSetModel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-SelectionFilterModel.html#v:selectionFilterModelSetModel"
}
#endif