gi-glib-0.2.46.12: GI/GLib/Structs/Sequence.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
The #GSequence struct is an opaque data type representing a
[sequence][glib-Sequences] data type.
-}
module GI.GLib.Structs.Sequence
(
-- * Exported types
Sequence(..) ,
noSequence ,
-- * Methods
-- ** sequenceFree
sequenceFree ,
-- ** sequenceGetLength
sequenceGetLength ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.GLib.Types
import GI.GLib.Callbacks
newtype Sequence = Sequence (ForeignPtr Sequence)
noSequence :: Maybe Sequence
noSequence = Nothing
-- method Sequence::free
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "GLib" "Sequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "GLib" "Sequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "g_sequence_free" g_sequence_free ::
Ptr Sequence -> -- _obj : TInterface "GLib" "Sequence"
IO ()
sequenceFree ::
(MonadIO m) =>
Sequence -> -- _obj
m ()
sequenceFree _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
g_sequence_free _obj'
touchManagedPtr _obj
return ()
-- method Sequence::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "GLib" "Sequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "GLib" "Sequence", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "g_sequence_get_length" g_sequence_get_length ::
Ptr Sequence -> -- _obj : TInterface "GLib" "Sequence"
IO Int32
sequenceGetLength ::
(MonadIO m) =>
Sequence -> -- _obj
m Int32
sequenceGetLength _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- g_sequence_get_length _obj'
touchManagedPtr _obj
return result