{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.StringList
(
StringList(..) ,
IsStringList ,
toStringList ,
#if defined(ENABLE_OVERLOADING)
ResolveStringListMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
StringListAppendMethodInfo ,
#endif
stringListAppend ,
#if defined(ENABLE_OVERLOADING)
StringListGetStringMethodInfo ,
#endif
stringListGetString ,
stringListNew ,
#if defined(ENABLE_OVERLOADING)
StringListRemoveMethodInfo ,
#endif
stringListRemove ,
#if defined(ENABLE_OVERLOADING)
StringListSpliceMethodInfo ,
#endif
stringListSplice ,
#if defined(ENABLE_OVERLOADING)
StringListTakeMethodInfo ,
#endif
stringListTake ,
) 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.GHashTable as B.GHT
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.Coerce as Coerce
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.Buildable as Gtk.Buildable
newtype StringList = StringList (SP.ManagedPtr StringList)
deriving (StringList -> StringList -> Bool
(StringList -> StringList -> Bool)
-> (StringList -> StringList -> Bool) -> Eq StringList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StringList -> StringList -> Bool
== :: StringList -> StringList -> Bool
$c/= :: StringList -> StringList -> Bool
/= :: StringList -> StringList -> Bool
Eq)
instance SP.ManagedPtrNewtype StringList where
toManagedPtr :: StringList -> ManagedPtr StringList
toManagedPtr (StringList ManagedPtr StringList
p) = ManagedPtr StringList
p
foreign import ccall "gtk_string_list_get_type"
c_gtk_string_list_get_type :: IO B.Types.GType
instance B.Types.TypedObject StringList where
glibType :: IO GType
glibType = IO GType
c_gtk_string_list_get_type
instance B.Types.GObject StringList
class (SP.GObject o, O.IsDescendantOf StringList o) => IsStringList o
instance (SP.GObject o, O.IsDescendantOf StringList o) => IsStringList o
instance O.HasParentTypes StringList
type instance O.ParentTypes StringList = '[GObject.Object.Object, Gio.ListModel.ListModel, Gtk.Buildable.Buildable]
toStringList :: (MIO.MonadIO m, IsStringList o) => o -> m StringList
toStringList :: forall (m :: * -> *) o.
(MonadIO m, IsStringList o) =>
o -> m StringList
toStringList = IO StringList -> m StringList
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO StringList -> m StringList)
-> (o -> IO StringList) -> o -> m StringList
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr StringList -> StringList) -> o -> IO StringList
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr StringList -> StringList
StringList
instance B.GValue.IsGValue (Maybe StringList) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_string_list_get_type
gvalueSet_ :: Ptr GValue -> Maybe StringList -> IO ()
gvalueSet_ Ptr GValue
gv Maybe StringList
P.Nothing = Ptr GValue -> Ptr StringList -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr StringList
forall a. Ptr a
FP.nullPtr :: FP.Ptr StringList)
gvalueSet_ Ptr GValue
gv (P.Just StringList
obj) = StringList -> (Ptr StringList -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr StringList
obj (Ptr GValue -> Ptr StringList -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe StringList)
gvalueGet_ Ptr GValue
gv = do
Ptr StringList
ptr <- Ptr GValue -> IO (Ptr StringList)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr StringList)
if Ptr StringList
ptr Ptr StringList -> Ptr StringList -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr StringList
forall a. Ptr a
FP.nullPtr
then StringList -> Maybe StringList
forall a. a -> Maybe a
P.Just (StringList -> Maybe StringList)
-> IO StringList -> IO (Maybe StringList)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr StringList -> StringList)
-> Ptr StringList -> IO StringList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr StringList -> StringList
StringList Ptr StringList
ptr
else Maybe StringList -> IO (Maybe StringList)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe StringList
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveStringListMethod (t :: Symbol) (o :: *) :: * where
ResolveStringListMethod "append" o = StringListAppendMethodInfo
ResolveStringListMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveStringListMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveStringListMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveStringListMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveStringListMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveStringListMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveStringListMethod "itemsChanged" o = Gio.ListModel.ListModelItemsChangedMethodInfo
ResolveStringListMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveStringListMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveStringListMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveStringListMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveStringListMethod "remove" o = StringListRemoveMethodInfo
ResolveStringListMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveStringListMethod "splice" o = StringListSpliceMethodInfo
ResolveStringListMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveStringListMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveStringListMethod "take" o = StringListTakeMethodInfo
ResolveStringListMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveStringListMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveStringListMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveStringListMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveStringListMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveStringListMethod "getItem" o = Gio.ListModel.ListModelGetItemMethodInfo
ResolveStringListMethod "getItemType" o = Gio.ListModel.ListModelGetItemTypeMethodInfo
ResolveStringListMethod "getNItems" o = Gio.ListModel.ListModelGetNItemsMethodInfo
ResolveStringListMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveStringListMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveStringListMethod "getString" o = StringListGetStringMethodInfo
ResolveStringListMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveStringListMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveStringListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveStringListMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveStringListMethod t StringList, O.OverloadedMethod info StringList p) => OL.IsLabel t (StringList -> 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 ~ ResolveStringListMethod t StringList, O.OverloadedMethod info StringList p, R.HasField t StringList p) => R.HasField t StringList p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveStringListMethod t StringList, O.OverloadedMethodInfo info StringList) => OL.IsLabel t (O.MethodProxy info StringList) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList StringList
type instance O.AttributeList StringList = StringListAttributeList
type StringListAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList StringList = StringListSignalList
type StringListSignalList = ('[ '("itemsChanged", Gio.ListModel.ListModelItemsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_string_list_new" gtk_string_list_new ::
Ptr CString ->
IO (Ptr StringList)
stringListNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe ([T.Text])
-> m StringList
stringListNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe [Text] -> m StringList
stringListNew Maybe [Text]
strings = IO StringList -> m StringList
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StringList -> m StringList) -> IO StringList -> m StringList
forall a b. (a -> b) -> a -> b
$ do
Ptr CString
maybeStrings <- case Maybe [Text]
strings of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jStrings -> do
Ptr CString
jStrings' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jStrings
Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jStrings'
Ptr StringList
result <- Ptr CString -> IO (Ptr StringList)
gtk_string_list_new Ptr CString
maybeStrings
Text -> Ptr StringList -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"stringListNew" Ptr StringList
result
StringList
result' <- ((ManagedPtr StringList -> StringList)
-> Ptr StringList -> IO StringList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr StringList -> StringList
StringList) Ptr StringList
result
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeStrings
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeStrings
StringList -> IO StringList
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return StringList
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_string_list_append" gtk_string_list_append ::
Ptr StringList ->
CString ->
IO ()
stringListAppend ::
(B.CallStack.HasCallStack, MonadIO m, IsStringList a) =>
a
-> T.Text
-> m ()
stringListAppend :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStringList a) =>
a -> Text -> m ()
stringListAppend a
self Text
string = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StringList
self' <- a -> IO (Ptr StringList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr StringList -> CString -> IO ()
gtk_string_list_append Ptr StringList
self' CString
string'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StringListAppendMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsStringList a) => O.OverloadedMethod StringListAppendMethodInfo a signature where
overloadedMethod = stringListAppend
instance O.OverloadedMethodInfo StringListAppendMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.StringList.stringListAppend",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-StringList.html#v:stringListAppend"
})
#endif
foreign import ccall "gtk_string_list_get_string" gtk_string_list_get_string ::
Ptr StringList ->
Word32 ->
IO CString
stringListGetString ::
(B.CallStack.HasCallStack, MonadIO m, IsStringList a) =>
a
-> Word32
-> m (Maybe T.Text)
stringListGetString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStringList a) =>
a -> Word32 -> m (Maybe Text)
stringListGetString a
self Word32
position = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr StringList
self' <- a -> IO (Ptr StringList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
result <- Ptr StringList -> Word32 -> IO CString
gtk_string_list_get_string Ptr StringList
self' Word32
position
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data StringListGetStringMethodInfo
instance (signature ~ (Word32 -> m (Maybe T.Text)), MonadIO m, IsStringList a) => O.OverloadedMethod StringListGetStringMethodInfo a signature where
overloadedMethod = stringListGetString
instance O.OverloadedMethodInfo StringListGetStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.StringList.stringListGetString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-StringList.html#v:stringListGetString"
})
#endif
foreign import ccall "gtk_string_list_remove" gtk_string_list_remove ::
Ptr StringList ->
Word32 ->
IO ()
stringListRemove ::
(B.CallStack.HasCallStack, MonadIO m, IsStringList a) =>
a
-> Word32
-> m ()
stringListRemove :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStringList a) =>
a -> Word32 -> m ()
stringListRemove a
self Word32
position = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StringList
self' <- a -> IO (Ptr StringList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr StringList -> Word32 -> IO ()
gtk_string_list_remove Ptr StringList
self' Word32
position
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StringListRemoveMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsStringList a) => O.OverloadedMethod StringListRemoveMethodInfo a signature where
overloadedMethod = stringListRemove
instance O.OverloadedMethodInfo StringListRemoveMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.StringList.stringListRemove",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-StringList.html#v:stringListRemove"
})
#endif
foreign import ccall "gtk_string_list_splice" gtk_string_list_splice ::
Ptr StringList ->
Word32 ->
Word32 ->
Ptr CString ->
IO ()
stringListSplice ::
(B.CallStack.HasCallStack, MonadIO m, IsStringList a) =>
a
-> Word32
-> Word32
-> Maybe ([T.Text])
-> m ()
stringListSplice :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStringList a) =>
a -> Word32 -> Word32 -> Maybe [Text] -> m ()
stringListSplice a
self Word32
position Word32
nRemovals Maybe [Text]
additions = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StringList
self' <- a -> IO (Ptr StringList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CString
maybeAdditions <- case Maybe [Text]
additions of
Maybe [Text]
Nothing -> Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
forall a. Ptr a
nullPtr
Just [Text]
jAdditions -> do
Ptr CString
jAdditions' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
jAdditions
Ptr CString -> IO (Ptr CString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CString
jAdditions'
Ptr StringList -> Word32 -> Word32 -> Ptr CString -> IO ()
gtk_string_list_splice Ptr StringList
self' Word32
position Word32
nRemovals Ptr CString
maybeAdditions
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeAdditions
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
maybeAdditions
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StringListSpliceMethodInfo
instance (signature ~ (Word32 -> Word32 -> Maybe ([T.Text]) -> m ()), MonadIO m, IsStringList a) => O.OverloadedMethod StringListSpliceMethodInfo a signature where
overloadedMethod = stringListSplice
instance O.OverloadedMethodInfo StringListSpliceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.StringList.stringListSplice",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-StringList.html#v:stringListSplice"
})
#endif
foreign import ccall "gtk_string_list_take" gtk_string_list_take ::
Ptr StringList ->
CString ->
IO ()
stringListTake ::
(B.CallStack.HasCallStack, MonadIO m, IsStringList a) =>
a
-> T.Text
-> m ()
stringListTake :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsStringList a) =>
a -> Text -> m ()
stringListTake a
self Text
string = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr StringList
self' <- a -> IO (Ptr StringList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr StringList -> CString -> IO ()
gtk_string_list_take Ptr StringList
self' CString
string'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StringListTakeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsStringList a) => O.OverloadedMethod StringListTakeMethodInfo a signature where
overloadedMethod = stringListTake
instance O.OverloadedMethodInfo StringListTakeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.StringList.stringListTake",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-StringList.html#v:stringListTake"
})
#endif