{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Structs.Structure
(
Structure(..) ,
newZeroStructure ,
#if defined(ENABLE_OVERLOADING)
ResolveStructureMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
StructureCanIntersectMethodInfo ,
#endif
structureCanIntersect ,
#if defined(ENABLE_OVERLOADING)
StructureCopyMethodInfo ,
#endif
structureCopy ,
#if defined(ENABLE_OVERLOADING)
StructureFilterAndMapInPlaceMethodInfo ,
#endif
structureFilterAndMapInPlace ,
#if defined(ENABLE_OVERLOADING)
StructureFixateMethodInfo ,
#endif
structureFixate ,
#if defined(ENABLE_OVERLOADING)
StructureFixateFieldMethodInfo ,
#endif
structureFixateField ,
#if defined(ENABLE_OVERLOADING)
StructureFixateFieldBooleanMethodInfo ,
#endif
structureFixateFieldBoolean ,
#if defined(ENABLE_OVERLOADING)
StructureFixateFieldNearestDoubleMethodInfo,
#endif
structureFixateFieldNearestDouble ,
#if defined(ENABLE_OVERLOADING)
StructureFixateFieldNearestFractionMethodInfo,
#endif
structureFixateFieldNearestFraction ,
#if defined(ENABLE_OVERLOADING)
StructureFixateFieldNearestIntMethodInfo,
#endif
structureFixateFieldNearestInt ,
#if defined(ENABLE_OVERLOADING)
StructureFixateFieldStringMethodInfo ,
#endif
structureFixateFieldString ,
#if defined(ENABLE_OVERLOADING)
StructureForeachMethodInfo ,
#endif
structureForeach ,
#if defined(ENABLE_OVERLOADING)
StructureFreeMethodInfo ,
#endif
structureFree ,
structureFromString ,
#if defined(ENABLE_OVERLOADING)
StructureGetArrayMethodInfo ,
#endif
structureGetArray ,
#if defined(ENABLE_OVERLOADING)
StructureGetBooleanMethodInfo ,
#endif
structureGetBoolean ,
#if defined(ENABLE_OVERLOADING)
StructureGetClockTimeMethodInfo ,
#endif
structureGetClockTime ,
#if defined(ENABLE_OVERLOADING)
StructureGetDateMethodInfo ,
#endif
structureGetDate ,
#if defined(ENABLE_OVERLOADING)
StructureGetDateTimeMethodInfo ,
#endif
structureGetDateTime ,
#if defined(ENABLE_OVERLOADING)
StructureGetDoubleMethodInfo ,
#endif
structureGetDouble ,
#if defined(ENABLE_OVERLOADING)
StructureGetEnumMethodInfo ,
#endif
structureGetEnum ,
#if defined(ENABLE_OVERLOADING)
StructureGetFieldTypeMethodInfo ,
#endif
structureGetFieldType ,
#if defined(ENABLE_OVERLOADING)
StructureGetFlagsetMethodInfo ,
#endif
structureGetFlagset ,
#if defined(ENABLE_OVERLOADING)
StructureGetFractionMethodInfo ,
#endif
structureGetFraction ,
#if defined(ENABLE_OVERLOADING)
StructureGetIntMethodInfo ,
#endif
structureGetInt ,
#if defined(ENABLE_OVERLOADING)
StructureGetInt64MethodInfo ,
#endif
structureGetInt64 ,
#if defined(ENABLE_OVERLOADING)
StructureGetListMethodInfo ,
#endif
structureGetList ,
#if defined(ENABLE_OVERLOADING)
StructureGetNameMethodInfo ,
#endif
structureGetName ,
#if defined(ENABLE_OVERLOADING)
StructureGetNameIdMethodInfo ,
#endif
structureGetNameId ,
#if defined(ENABLE_OVERLOADING)
StructureGetStringMethodInfo ,
#endif
structureGetString ,
#if defined(ENABLE_OVERLOADING)
StructureGetUintMethodInfo ,
#endif
structureGetUint ,
#if defined(ENABLE_OVERLOADING)
StructureGetUint64MethodInfo ,
#endif
structureGetUint64 ,
#if defined(ENABLE_OVERLOADING)
StructureGetValueMethodInfo ,
#endif
structureGetValue ,
#if defined(ENABLE_OVERLOADING)
StructureHasFieldMethodInfo ,
#endif
structureHasField ,
#if defined(ENABLE_OVERLOADING)
StructureHasFieldTypedMethodInfo ,
#endif
structureHasFieldTyped ,
#if defined(ENABLE_OVERLOADING)
StructureHasNameMethodInfo ,
#endif
structureHasName ,
#if defined(ENABLE_OVERLOADING)
StructureIdGetValueMethodInfo ,
#endif
structureIdGetValue ,
#if defined(ENABLE_OVERLOADING)
StructureIdHasFieldMethodInfo ,
#endif
structureIdHasField ,
#if defined(ENABLE_OVERLOADING)
StructureIdHasFieldTypedMethodInfo ,
#endif
structureIdHasFieldTyped ,
#if defined(ENABLE_OVERLOADING)
StructureIdSetValueMethodInfo ,
#endif
structureIdSetValue ,
#if defined(ENABLE_OVERLOADING)
StructureIdTakeValueMethodInfo ,
#endif
structureIdTakeValue ,
#if defined(ENABLE_OVERLOADING)
StructureIntersectMethodInfo ,
#endif
structureIntersect ,
#if defined(ENABLE_OVERLOADING)
StructureIsEqualMethodInfo ,
#endif
structureIsEqual ,
#if defined(ENABLE_OVERLOADING)
StructureIsSubsetMethodInfo ,
#endif
structureIsSubset ,
#if defined(ENABLE_OVERLOADING)
StructureMapInPlaceMethodInfo ,
#endif
structureMapInPlace ,
#if defined(ENABLE_OVERLOADING)
StructureNFieldsMethodInfo ,
#endif
structureNFields ,
structureNewEmpty ,
structureNewFromString ,
structureNewIdEmpty ,
#if defined(ENABLE_OVERLOADING)
StructureNthFieldNameMethodInfo ,
#endif
structureNthFieldName ,
#if defined(ENABLE_OVERLOADING)
StructureRemoveAllFieldsMethodInfo ,
#endif
structureRemoveAllFields ,
#if defined(ENABLE_OVERLOADING)
StructureRemoveFieldMethodInfo ,
#endif
structureRemoveField ,
#if defined(ENABLE_OVERLOADING)
StructureSetArrayMethodInfo ,
#endif
structureSetArray ,
#if defined(ENABLE_OVERLOADING)
StructureSetListMethodInfo ,
#endif
structureSetList ,
#if defined(ENABLE_OVERLOADING)
StructureSetNameMethodInfo ,
#endif
structureSetName ,
#if defined(ENABLE_OVERLOADING)
StructureSetParentRefcountMethodInfo ,
#endif
structureSetParentRefcount ,
#if defined(ENABLE_OVERLOADING)
StructureSetValueMethodInfo ,
#endif
structureSetValue ,
#if defined(ENABLE_OVERLOADING)
StructureTakeValueMethodInfo ,
#endif
structureTakeValue ,
#if defined(ENABLE_OVERLOADING)
StructureToStringMethodInfo ,
#endif
structureToString ,
getStructureType ,
setStructureType ,
#if defined(ENABLE_OVERLOADING)
structure_type ,
#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.GLib.Structs.Date as GLib.Date
import qualified GI.GObject.Structs.ValueArray as GObject.ValueArray
import qualified GI.Gst.Callbacks as Gst.Callbacks
import {-# SOURCE #-} qualified GI.Gst.Structs.DateTime as Gst.DateTime
newtype Structure = Structure (SP.ManagedPtr Structure)
deriving (Structure -> Structure -> Bool
(Structure -> Structure -> Bool)
-> (Structure -> Structure -> Bool) -> Eq Structure
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Structure -> Structure -> Bool
$c/= :: Structure -> Structure -> Bool
== :: Structure -> Structure -> Bool
$c== :: Structure -> Structure -> Bool
Eq)
instance SP.ManagedPtrNewtype Structure where
toManagedPtr :: Structure -> ManagedPtr Structure
toManagedPtr (Structure ManagedPtr Structure
p) = ManagedPtr Structure
p
foreign import ccall "gst_structure_get_type" c_gst_structure_get_type ::
IO GType
type instance O.ParentTypes Structure = '[]
instance O.HasParentTypes Structure
instance B.Types.TypedObject Structure where
glibType :: IO GType
glibType = IO GType
c_gst_structure_get_type
instance B.Types.GBoxed Structure
instance B.GValue.IsGValue (Maybe Structure) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_structure_get_type
gvalueSet_ :: Ptr GValue -> Maybe Structure -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Structure
P.Nothing = Ptr GValue -> Ptr Structure -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Structure
forall a. Ptr a
FP.nullPtr :: FP.Ptr Structure)
gvalueSet_ Ptr GValue
gv (P.Just Structure
obj) = Structure -> (Ptr Structure -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Structure
obj (Ptr GValue -> Ptr Structure -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Structure)
gvalueGet_ Ptr GValue
gv = do
Ptr Structure
ptr <- Ptr GValue -> IO (Ptr Structure)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Structure)
if Ptr Structure
ptr Ptr Structure -> Ptr Structure -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Structure
forall a. Ptr a
FP.nullPtr
then Structure -> Maybe Structure
forall a. a -> Maybe a
P.Just (Structure -> Maybe Structure)
-> IO Structure -> IO (Maybe Structure)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Structure -> Structure
Structure Ptr Structure
ptr
else Maybe Structure -> IO (Maybe Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Structure
forall a. Maybe a
P.Nothing
newZeroStructure :: MonadIO m => m Structure
newZeroStructure :: forall (m :: * -> *). MonadIO m => m Structure
newZeroStructure = IO Structure -> m Structure
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Structure -> m Structure) -> IO Structure -> m Structure
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Structure)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
16 IO (Ptr Structure)
-> (Ptr Structure -> IO Structure) -> IO Structure
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure
instance tag ~ 'AttrSet => Constructible Structure tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Structure -> Structure)
-> [AttrOp Structure tag] -> m Structure
new ManagedPtr Structure -> Structure
_ [AttrOp Structure tag]
attrs = do
Structure
o <- m Structure
forall (m :: * -> *). MonadIO m => m Structure
newZeroStructure
Structure -> [AttrOp Structure 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Structure
o [AttrOp Structure tag]
[AttrOp Structure 'AttrSet]
attrs
Structure -> m Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
o
getStructureType :: MonadIO m => Structure -> m GType
getStructureType :: forall (m :: * -> *). MonadIO m => Structure -> m GType
getStructureType Structure
s = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ Structure -> (Ptr Structure -> IO GType) -> IO GType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Structure
s ((Ptr Structure -> IO GType) -> IO GType)
-> (Ptr Structure -> IO GType) -> IO GType
forall a b. (a -> b) -> a -> b
$ \Ptr Structure
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr Structure
ptr Ptr Structure -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CGType
let val' :: GType
val' = CGType -> GType
GType CGType
val
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'
setStructureType :: MonadIO m => Structure -> GType -> m ()
setStructureType :: forall (m :: * -> *). MonadIO m => Structure -> GType -> m ()
setStructureType Structure
s GType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Structure -> (Ptr Structure -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Structure
s ((Ptr Structure -> IO ()) -> IO ())
-> (Ptr Structure -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Structure
ptr -> do
let val' :: CGType
val' = GType -> CGType
gtypeToCGType GType
val
Ptr CGType -> CGType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Structure
ptr Ptr Structure -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CGType
val' :: CGType)
#if defined(ENABLE_OVERLOADING)
data StructureTypeFieldInfo
instance AttrInfo StructureTypeFieldInfo where
type AttrBaseTypeConstraint StructureTypeFieldInfo = (~) Structure
type AttrAllowedOps StructureTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint StructureTypeFieldInfo = (~) GType
type AttrTransferTypeConstraint StructureTypeFieldInfo = (~)GType
type AttrTransferType StructureTypeFieldInfo = GType
type AttrGetType StructureTypeFieldInfo = GType
type AttrLabel StructureTypeFieldInfo = "type"
type AttrOrigin StructureTypeFieldInfo = Structure
attrGet = getStructureType
attrSet = setStructureType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
structure_type :: AttrLabelProxy "type"
structure_type = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Structure
type instance O.AttributeList Structure = StructureAttributeList
type StructureAttributeList = ('[ '("type", StructureTypeFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_structure_from_string" gst_structure_from_string ::
CString ->
Ptr CString ->
IO (Ptr Structure)
structureFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m ((Maybe Structure, T.Text))
structureFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m (Maybe Structure, Text)
structureFromString Text
string = IO (Maybe Structure, Text) -> m (Maybe Structure, Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Structure, Text) -> m (Maybe Structure, Text))
-> IO (Maybe Structure, Text) -> m (Maybe Structure, Text)
forall a b. (a -> b) -> a -> b
$ do
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr CString
end <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Structure
result <- CString -> Ptr CString -> IO (Ptr Structure)
gst_structure_from_string CString
string' Ptr CString
end
Maybe Structure
maybeResult <- Ptr Structure
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Structure
result ((Ptr Structure -> IO Structure) -> IO (Maybe Structure))
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ \Ptr Structure
result' -> do
Structure
result'' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure) Ptr Structure
result'
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result''
CString
end' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
end
Text
end'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
end'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
end
(Maybe Structure, Text) -> IO (Maybe Structure, Text)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Structure
maybeResult, Text
end'')
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_structure_new_empty" gst_structure_new_empty ::
CString ->
IO (Ptr Structure)
structureNewEmpty ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Structure
structureNewEmpty :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m Structure
structureNewEmpty Text
name = IO Structure -> m Structure
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Structure -> m Structure) -> IO Structure -> m Structure
forall a b. (a -> b) -> a -> b
$ do
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr Structure
result <- CString -> IO (Ptr Structure)
gst_structure_new_empty CString
name'
Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"structureNewEmpty" Ptr Structure
result
Structure
result' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure) Ptr Structure
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_structure_new_from_string" gst_structure_new_from_string ::
CString ->
IO (Ptr Structure)
structureNewFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m (Maybe Structure)
structureNewFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m (Maybe Structure)
structureNewFromString Text
string = IO (Maybe Structure) -> m (Maybe Structure)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Structure) -> m (Maybe Structure))
-> IO (Maybe Structure) -> m (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ do
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr Structure
result <- CString -> IO (Ptr Structure)
gst_structure_new_from_string CString
string'
Maybe Structure
maybeResult <- Ptr Structure
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Structure
result ((Ptr Structure -> IO Structure) -> IO (Maybe Structure))
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ \Ptr Structure
result' -> do
Structure
result'' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure) Ptr Structure
result'
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
Maybe Structure -> IO (Maybe Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Structure
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_structure_new_id_empty" gst_structure_new_id_empty ::
Word32 ->
IO (Ptr Structure)
structureNewIdEmpty ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
-> m Structure
structureNewIdEmpty :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Word32 -> m Structure
structureNewIdEmpty Word32
quark = IO Structure -> m Structure
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Structure -> m Structure) -> IO Structure -> m Structure
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
result <- Word32 -> IO (Ptr Structure)
gst_structure_new_id_empty Word32
quark
Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"structureNewIdEmpty" Ptr Structure
result
Structure
result' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure) Ptr Structure
result
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_structure_can_intersect" gst_structure_can_intersect ::
Ptr Structure ->
Ptr Structure ->
IO CInt
structureCanIntersect ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Structure
-> m Bool
structureCanIntersect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Structure -> m Bool
structureCanIntersect Structure
struct1 Structure
struct2 = 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 Structure
struct1' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
struct1
Ptr Structure
struct2' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
struct2
CInt
result <- Ptr Structure -> Ptr Structure -> IO CInt
gst_structure_can_intersect Ptr Structure
struct1' Ptr Structure
struct2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
struct1
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
struct2
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureCanIntersectMethodInfo
instance (signature ~ (Structure -> m Bool), MonadIO m) => O.OverloadedMethod StructureCanIntersectMethodInfo Structure signature where
overloadedMethod = structureCanIntersect
instance O.OverloadedMethodInfo StructureCanIntersectMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureCanIntersect",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureCanIntersect"
}
#endif
foreign import ccall "gst_structure_copy" gst_structure_copy ::
Ptr Structure ->
IO (Ptr Structure)
structureCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m Structure
structureCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m Structure
structureCopy Structure
structure = IO Structure -> m Structure
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Structure -> m Structure) -> IO Structure -> m Structure
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr Structure
result <- Ptr Structure -> IO (Ptr Structure)
gst_structure_copy Ptr Structure
structure'
Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"structureCopy" Ptr Structure
result
Structure
result' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure) Ptr Structure
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result'
#if defined(ENABLE_OVERLOADING)
data StructureCopyMethodInfo
instance (signature ~ (m Structure), MonadIO m) => O.OverloadedMethod StructureCopyMethodInfo Structure signature where
overloadedMethod = structureCopy
instance O.OverloadedMethodInfo StructureCopyMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureCopy",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureCopy"
}
#endif
foreign import ccall "gst_structure_filter_and_map_in_place" gst_structure_filter_and_map_in_place ::
Ptr Structure ->
FunPtr Gst.Callbacks.C_StructureFilterMapFunc ->
Ptr () ->
IO ()
structureFilterAndMapInPlace ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Gst.Callbacks.StructureFilterMapFunc
-> m ()
structureFilterAndMapInPlace :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> StructureFilterMapFunc -> m ()
structureFilterAndMapInPlace Structure
structure StructureFilterMapFunc
func = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
FunPtr C_StructureFilterMapFunc
func' <- C_StructureFilterMapFunc -> IO (FunPtr C_StructureFilterMapFunc)
Gst.Callbacks.mk_StructureFilterMapFunc (Maybe (Ptr (FunPtr C_StructureFilterMapFunc))
-> StructureFilterMapFunc_WithClosures -> C_StructureFilterMapFunc
Gst.Callbacks.wrap_StructureFilterMapFunc Maybe (Ptr (FunPtr C_StructureFilterMapFunc))
forall a. Maybe a
Nothing (StructureFilterMapFunc -> StructureFilterMapFunc_WithClosures
Gst.Callbacks.drop_closures_StructureFilterMapFunc StructureFilterMapFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Structure -> FunPtr C_StructureFilterMapFunc -> Ptr () -> IO ()
gst_structure_filter_and_map_in_place Ptr Structure
structure' FunPtr C_StructureFilterMapFunc
func' Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StructureFilterMapFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StructureFilterMapFunc
func'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureFilterAndMapInPlaceMethodInfo
instance (signature ~ (Gst.Callbacks.StructureFilterMapFunc -> m ()), MonadIO m) => O.OverloadedMethod StructureFilterAndMapInPlaceMethodInfo Structure signature where
overloadedMethod = structureFilterAndMapInPlace
instance O.OverloadedMethodInfo StructureFilterAndMapInPlaceMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFilterAndMapInPlace",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFilterAndMapInPlace"
}
#endif
foreign import ccall "gst_structure_fixate" gst_structure_fixate ::
Ptr Structure ->
IO ()
structureFixate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m ()
structureFixate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m ()
structureFixate Structure
structure = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr Structure -> IO ()
gst_structure_fixate Ptr Structure
structure'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureFixateMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod StructureFixateMethodInfo Structure signature where
overloadedMethod = structureFixate
instance O.OverloadedMethodInfo StructureFixateMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixate"
}
#endif
foreign import ccall "gst_structure_fixate_field" gst_structure_fixate_field ::
Ptr Structure ->
CString ->
IO CInt
structureFixateField ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m Bool
structureFixateField :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m Bool
structureFixateField Structure
structure Text
fieldName = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldName' <- Text -> IO CString
textToCString Text
fieldName
CInt
result <- Ptr Structure -> CString -> IO CInt
gst_structure_fixate_field Ptr Structure
structure' CString
fieldName'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldName'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureFixateFieldMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.OverloadedMethod StructureFixateFieldMethodInfo Structure signature where
overloadedMethod = structureFixateField
instance O.OverloadedMethodInfo StructureFixateFieldMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixateField",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixateField"
}
#endif
foreign import ccall "gst_structure_fixate_field_boolean" gst_structure_fixate_field_boolean ::
Ptr Structure ->
CString ->
CInt ->
IO CInt
structureFixateFieldBoolean ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> Bool
-> m Bool
structureFixateFieldBoolean :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> Bool -> m Bool
structureFixateFieldBoolean Structure
structure Text
fieldName Bool
target = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldName' <- Text -> IO CString
textToCString Text
fieldName
let target' :: CInt
target' = (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
target
CInt
result <- Ptr Structure -> CString -> CInt -> IO CInt
gst_structure_fixate_field_boolean Ptr Structure
structure' CString
fieldName' CInt
target'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldName'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureFixateFieldBooleanMethodInfo
instance (signature ~ (T.Text -> Bool -> m Bool), MonadIO m) => O.OverloadedMethod StructureFixateFieldBooleanMethodInfo Structure signature where
overloadedMethod = structureFixateFieldBoolean
instance O.OverloadedMethodInfo StructureFixateFieldBooleanMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixateFieldBoolean",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixateFieldBoolean"
}
#endif
foreign import ccall "gst_structure_fixate_field_nearest_double" gst_structure_fixate_field_nearest_double ::
Ptr Structure ->
CString ->
CDouble ->
IO CInt
structureFixateFieldNearestDouble ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> Double
-> m Bool
structureFixateFieldNearestDouble :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> Double -> m Bool
structureFixateFieldNearestDouble Structure
structure Text
fieldName Double
target = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldName' <- Text -> IO CString
textToCString Text
fieldName
let target' :: CDouble
target' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
target
CInt
result <- Ptr Structure -> CString -> CDouble -> IO CInt
gst_structure_fixate_field_nearest_double Ptr Structure
structure' CString
fieldName' CDouble
target'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldName'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureFixateFieldNearestDoubleMethodInfo
instance (signature ~ (T.Text -> Double -> m Bool), MonadIO m) => O.OverloadedMethod StructureFixateFieldNearestDoubleMethodInfo Structure signature where
overloadedMethod = structureFixateFieldNearestDouble
instance O.OverloadedMethodInfo StructureFixateFieldNearestDoubleMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixateFieldNearestDouble",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixateFieldNearestDouble"
}
#endif
foreign import ccall "gst_structure_fixate_field_nearest_fraction" gst_structure_fixate_field_nearest_fraction ::
Ptr Structure ->
CString ->
Int32 ->
Int32 ->
IO CInt
structureFixateFieldNearestFraction ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> Int32
-> Int32
-> m Bool
structureFixateFieldNearestFraction :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> Int32 -> Int32 -> m Bool
structureFixateFieldNearestFraction Structure
structure Text
fieldName Int32
targetNumerator Int32
targetDenominator = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldName' <- Text -> IO CString
textToCString Text
fieldName
CInt
result <- Ptr Structure -> CString -> Int32 -> Int32 -> IO CInt
gst_structure_fixate_field_nearest_fraction Ptr Structure
structure' CString
fieldName' Int32
targetNumerator Int32
targetDenominator
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldName'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureFixateFieldNearestFractionMethodInfo
instance (signature ~ (T.Text -> Int32 -> Int32 -> m Bool), MonadIO m) => O.OverloadedMethod StructureFixateFieldNearestFractionMethodInfo Structure signature where
overloadedMethod = structureFixateFieldNearestFraction
instance O.OverloadedMethodInfo StructureFixateFieldNearestFractionMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixateFieldNearestFraction",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixateFieldNearestFraction"
}
#endif
foreign import ccall "gst_structure_fixate_field_nearest_int" gst_structure_fixate_field_nearest_int ::
Ptr Structure ->
CString ->
Int32 ->
IO CInt
structureFixateFieldNearestInt ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> Int32
-> m Bool
structureFixateFieldNearestInt :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> Int32 -> m Bool
structureFixateFieldNearestInt Structure
structure Text
fieldName Int32
target = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldName' <- Text -> IO CString
textToCString Text
fieldName
CInt
result <- Ptr Structure -> CString -> Int32 -> IO CInt
gst_structure_fixate_field_nearest_int Ptr Structure
structure' CString
fieldName' Int32
target
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldName'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureFixateFieldNearestIntMethodInfo
instance (signature ~ (T.Text -> Int32 -> m Bool), MonadIO m) => O.OverloadedMethod StructureFixateFieldNearestIntMethodInfo Structure signature where
overloadedMethod = structureFixateFieldNearestInt
instance O.OverloadedMethodInfo StructureFixateFieldNearestIntMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixateFieldNearestInt",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixateFieldNearestInt"
}
#endif
foreign import ccall "gst_structure_fixate_field_string" gst_structure_fixate_field_string ::
Ptr Structure ->
CString ->
CString ->
IO CInt
structureFixateFieldString ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> T.Text
-> m Bool
structureFixateFieldString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> Text -> m Bool
structureFixateFieldString Structure
structure Text
fieldName Text
target = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldName' <- Text -> IO CString
textToCString Text
fieldName
CString
target' <- Text -> IO CString
textToCString Text
target
CInt
result <- Ptr Structure -> CString -> CString -> IO CInt
gst_structure_fixate_field_string Ptr Structure
structure' CString
fieldName' CString
target'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
target'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureFixateFieldStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m Bool), MonadIO m) => O.OverloadedMethod StructureFixateFieldStringMethodInfo Structure signature where
overloadedMethod = structureFixateFieldString
instance O.OverloadedMethodInfo StructureFixateFieldStringMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFixateFieldString",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFixateFieldString"
}
#endif
foreign import ccall "gst_structure_foreach" gst_structure_foreach ::
Ptr Structure ->
FunPtr Gst.Callbacks.C_StructureForeachFunc ->
Ptr () ->
IO CInt
structureForeach ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Gst.Callbacks.StructureForeachFunc
-> m Bool
structureForeach :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> StructureFilterMapFunc -> m Bool
structureForeach Structure
structure StructureFilterMapFunc
func = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
FunPtr C_StructureFilterMapFunc
func' <- C_StructureFilterMapFunc -> IO (FunPtr C_StructureFilterMapFunc)
Gst.Callbacks.mk_StructureForeachFunc (Maybe (Ptr (FunPtr C_StructureFilterMapFunc))
-> StructureFilterMapFunc_WithClosures -> C_StructureFilterMapFunc
Gst.Callbacks.wrap_StructureForeachFunc Maybe (Ptr (FunPtr C_StructureFilterMapFunc))
forall a. Maybe a
Nothing (StructureFilterMapFunc -> StructureFilterMapFunc_WithClosures
Gst.Callbacks.drop_closures_StructureForeachFunc StructureFilterMapFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Structure
-> FunPtr C_StructureFilterMapFunc -> Ptr () -> IO CInt
gst_structure_foreach Ptr Structure
structure' FunPtr C_StructureFilterMapFunc
func' Ptr ()
forall a. Ptr a
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StructureFilterMapFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StructureFilterMapFunc
func'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureForeachMethodInfo
instance (signature ~ (Gst.Callbacks.StructureForeachFunc -> m Bool), MonadIO m) => O.OverloadedMethod StructureForeachMethodInfo Structure signature where
overloadedMethod = structureForeach
instance O.OverloadedMethodInfo StructureForeachMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureForeach",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureForeach"
}
#endif
foreign import ccall "gst_structure_free" gst_structure_free ::
Ptr Structure ->
IO ()
structureFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m ()
structureFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m ()
structureFree Structure
structure = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
structure
Ptr Structure -> IO ()
gst_structure_free Ptr Structure
structure'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod StructureFreeMethodInfo Structure signature where
overloadedMethod = structureFree
instance O.OverloadedMethodInfo StructureFreeMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureFree",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureFree"
}
#endif
foreign import ccall "gst_structure_get_array" gst_structure_get_array ::
Ptr Structure ->
CString ->
Ptr (Ptr GObject.ValueArray.ValueArray) ->
IO CInt
structureGetArray ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, GObject.ValueArray.ValueArray))
structureGetArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, ValueArray)
structureGetArray Structure
structure Text
fieldname = IO (Bool, ValueArray) -> m (Bool, ValueArray)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, ValueArray) -> m (Bool, ValueArray))
-> IO (Bool, ValueArray) -> m (Bool, ValueArray)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr (Ptr ValueArray)
array <- IO (Ptr (Ptr ValueArray))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GObject.ValueArray.ValueArray))
CInt
result <- Ptr Structure -> CString -> Ptr (Ptr ValueArray) -> IO CInt
gst_structure_get_array Ptr Structure
structure' CString
fieldname' Ptr (Ptr ValueArray)
array
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr ValueArray
array' <- Ptr (Ptr ValueArray) -> IO (Ptr ValueArray)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ValueArray)
array
ValueArray
array'' <- ((ManagedPtr ValueArray -> ValueArray)
-> Ptr ValueArray -> IO ValueArray
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ValueArray -> ValueArray
GObject.ValueArray.ValueArray) Ptr ValueArray
array'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr (Ptr ValueArray) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ValueArray)
array
(Bool, ValueArray) -> IO (Bool, ValueArray)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', ValueArray
array'')
#if defined(ENABLE_OVERLOADING)
data StructureGetArrayMethodInfo
instance (signature ~ (T.Text -> m ((Bool, GObject.ValueArray.ValueArray))), MonadIO m) => O.OverloadedMethod StructureGetArrayMethodInfo Structure signature where
overloadedMethod = structureGetArray
instance O.OverloadedMethodInfo StructureGetArrayMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetArray",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetArray"
}
#endif
foreign import ccall "gst_structure_get_boolean" gst_structure_get_boolean ::
Ptr Structure ->
CString ->
Ptr CInt ->
IO CInt
structureGetBoolean ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Bool))
structureGetBoolean :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Bool)
structureGetBoolean Structure
structure Text
fieldname = IO (Bool, Bool) -> m (Bool, Bool)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Bool) -> m (Bool, Bool))
-> IO (Bool, Bool) -> m (Bool, Bool)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr CInt
value <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
CInt
result <- Ptr Structure -> CString -> Ptr CInt -> IO CInt
gst_structure_get_boolean Ptr Structure
structure' CString
fieldname' Ptr CInt
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CInt
value' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
value
let value'' :: Bool
value'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
value
(Bool, Bool) -> IO (Bool, Bool)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Bool
value'')
#if defined(ENABLE_OVERLOADING)
data StructureGetBooleanMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Bool))), MonadIO m) => O.OverloadedMethod StructureGetBooleanMethodInfo Structure signature where
overloadedMethod = structureGetBoolean
instance O.OverloadedMethodInfo StructureGetBooleanMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetBoolean",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetBoolean"
}
#endif
foreign import ccall "gst_structure_get_clock_time" gst_structure_get_clock_time ::
Ptr Structure ->
CString ->
Ptr Word64 ->
IO CInt
structureGetClockTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Word64))
structureGetClockTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, CGType)
structureGetClockTime Structure
structure Text
fieldname = IO (Bool, CGType) -> m (Bool, CGType)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, CGType) -> m (Bool, CGType))
-> IO (Bool, CGType) -> m (Bool, CGType)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr CGType
value <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
CInt
result <- Ptr Structure -> CString -> Ptr CGType -> IO CInt
gst_structure_get_clock_time Ptr Structure
structure' CString
fieldname' Ptr CGType
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CGType
value' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
value
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
value
(Bool, CGType) -> IO (Bool, CGType)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', CGType
value')
#if defined(ENABLE_OVERLOADING)
data StructureGetClockTimeMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Word64))), MonadIO m) => O.OverloadedMethod StructureGetClockTimeMethodInfo Structure signature where
overloadedMethod = structureGetClockTime
instance O.OverloadedMethodInfo StructureGetClockTimeMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetClockTime",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetClockTime"
}
#endif
foreign import ccall "gst_structure_get_date" gst_structure_get_date ::
Ptr Structure ->
CString ->
Ptr (Ptr GLib.Date.Date) ->
IO CInt
structureGetDate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, GLib.Date.Date))
structureGetDate :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Date)
structureGetDate Structure
structure Text
fieldname = IO (Bool, Date) -> m (Bool, Date)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Date) -> m (Bool, Date))
-> IO (Bool, Date) -> m (Bool, Date)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr (Ptr Date)
value <- IO (Ptr (Ptr Date))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GLib.Date.Date))
CInt
result <- Ptr Structure -> CString -> Ptr (Ptr Date) -> IO CInt
gst_structure_get_date Ptr Structure
structure' CString
fieldname' Ptr (Ptr Date)
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr Date
value' <- Ptr (Ptr Date) -> IO (Ptr Date)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Date)
value
Date
value'' <- ((ManagedPtr Date -> Date) -> Ptr Date -> IO Date
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Date -> Date
GLib.Date.Date) Ptr Date
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr (Ptr Date) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Date)
value
(Bool, Date) -> IO (Bool, Date)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Date
value'')
#if defined(ENABLE_OVERLOADING)
data StructureGetDateMethodInfo
instance (signature ~ (T.Text -> m ((Bool, GLib.Date.Date))), MonadIO m) => O.OverloadedMethod StructureGetDateMethodInfo Structure signature where
overloadedMethod = structureGetDate
instance O.OverloadedMethodInfo StructureGetDateMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetDate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetDate"
}
#endif
foreign import ccall "gst_structure_get_date_time" gst_structure_get_date_time ::
Ptr Structure ->
CString ->
Ptr (Ptr Gst.DateTime.DateTime) ->
IO CInt
structureGetDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Gst.DateTime.DateTime))
structureGetDateTime :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, DateTime)
structureGetDateTime Structure
structure Text
fieldname = IO (Bool, DateTime) -> m (Bool, DateTime)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, DateTime) -> m (Bool, DateTime))
-> IO (Bool, DateTime) -> m (Bool, DateTime)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr (Ptr DateTime)
value <- IO (Ptr (Ptr DateTime))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.DateTime.DateTime))
CInt
result <- Ptr Structure -> CString -> Ptr (Ptr DateTime) -> IO CInt
gst_structure_get_date_time Ptr Structure
structure' CString
fieldname' Ptr (Ptr DateTime)
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr DateTime
value' <- Ptr (Ptr DateTime) -> IO (Ptr DateTime)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr DateTime)
value
DateTime
value'' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DateTime -> DateTime
Gst.DateTime.DateTime) Ptr DateTime
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr (Ptr DateTime) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr DateTime)
value
(Bool, DateTime) -> IO (Bool, DateTime)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', DateTime
value'')
#if defined(ENABLE_OVERLOADING)
data StructureGetDateTimeMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Gst.DateTime.DateTime))), MonadIO m) => O.OverloadedMethod StructureGetDateTimeMethodInfo Structure signature where
overloadedMethod = structureGetDateTime
instance O.OverloadedMethodInfo StructureGetDateTimeMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetDateTime",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetDateTime"
}
#endif
foreign import ccall "gst_structure_get_double" gst_structure_get_double ::
Ptr Structure ->
CString ->
Ptr CDouble ->
IO CInt
structureGetDouble ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Double))
structureGetDouble :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Double)
structureGetDouble Structure
structure Text
fieldname = IO (Bool, Double) -> m (Bool, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double) -> m (Bool, Double))
-> IO (Bool, Double) -> m (Bool, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr CDouble
value <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
CInt
result <- Ptr Structure -> CString -> Ptr CDouble -> IO CInt
gst_structure_get_double Ptr Structure
structure' CString
fieldname' Ptr CDouble
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CDouble
value' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
value
let value'' :: Double
value'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
value
(Bool, Double) -> IO (Bool, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Double
value'')
#if defined(ENABLE_OVERLOADING)
data StructureGetDoubleMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Double))), MonadIO m) => O.OverloadedMethod StructureGetDoubleMethodInfo Structure signature where
overloadedMethod = structureGetDouble
instance O.OverloadedMethodInfo StructureGetDoubleMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetDouble",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetDouble"
}
#endif
foreign import ccall "gst_structure_get_enum" gst_structure_get_enum ::
Ptr Structure ->
CString ->
CGType ->
Ptr Int32 ->
IO CInt
structureGetEnum ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> GType
-> m ((Bool, Int32))
structureGetEnum :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> GType -> m (Bool, Int32)
structureGetEnum Structure
structure Text
fieldname GType
enumtype = IO (Bool, Int32) -> m (Bool, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32) -> m (Bool, Int32))
-> IO (Bool, Int32) -> m (Bool, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
let enumtype' :: CGType
enumtype' = GType -> CGType
gtypeToCGType GType
enumtype
Ptr Int32
value <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- Ptr Structure -> CString -> CGType -> Ptr Int32 -> IO CInt
gst_structure_get_enum Ptr Structure
structure' CString
fieldname' CGType
enumtype' Ptr Int32
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int32
value' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
value
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
value
(Bool, Int32) -> IO (Bool, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
value')
#if defined(ENABLE_OVERLOADING)
data StructureGetEnumMethodInfo
instance (signature ~ (T.Text -> GType -> m ((Bool, Int32))), MonadIO m) => O.OverloadedMethod StructureGetEnumMethodInfo Structure signature where
overloadedMethod = structureGetEnum
instance O.OverloadedMethodInfo StructureGetEnumMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetEnum",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetEnum"
}
#endif
foreign import ccall "gst_structure_get_field_type" gst_structure_get_field_type ::
Ptr Structure ->
CString ->
IO CGType
structureGetFieldType ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m GType
structureGetFieldType :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m GType
structureGetFieldType Structure
structure Text
fieldname = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
CGType
result <- Ptr Structure -> CString -> IO CGType
gst_structure_get_field_type Ptr Structure
structure' CString
fieldname'
let result' :: GType
result' = CGType -> GType
GType CGType
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'
#if defined(ENABLE_OVERLOADING)
data StructureGetFieldTypeMethodInfo
instance (signature ~ (T.Text -> m GType), MonadIO m) => O.OverloadedMethod StructureGetFieldTypeMethodInfo Structure signature where
overloadedMethod = structureGetFieldType
instance O.OverloadedMethodInfo StructureGetFieldTypeMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetFieldType",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetFieldType"
}
#endif
foreign import ccall "gst_structure_get_flagset" gst_structure_get_flagset ::
Ptr Structure ->
CString ->
Ptr Word32 ->
Ptr Word32 ->
IO CInt
structureGetFlagset ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Word32, Word32))
structureGetFlagset :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Word32, Word32)
structureGetFlagset Structure
structure Text
fieldname = IO (Bool, Word32, Word32) -> m (Bool, Word32, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32, Word32) -> m (Bool, Word32, Word32))
-> IO (Bool, Word32, Word32) -> m (Bool, Word32, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr Word32
valueFlags <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Word32
valueMask <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Structure -> CString -> Ptr Word32 -> Ptr Word32 -> IO CInt
gst_structure_get_flagset Ptr Structure
structure' CString
fieldname' Ptr Word32
valueFlags Ptr Word32
valueMask
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
valueFlags' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
valueFlags
Word32
valueMask' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
valueMask
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
valueFlags
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
valueMask
(Bool, Word32, Word32) -> IO (Bool, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
valueFlags', Word32
valueMask')
#if defined(ENABLE_OVERLOADING)
data StructureGetFlagsetMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Word32, Word32))), MonadIO m) => O.OverloadedMethod StructureGetFlagsetMethodInfo Structure signature where
overloadedMethod = structureGetFlagset
instance O.OverloadedMethodInfo StructureGetFlagsetMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetFlagset",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetFlagset"
}
#endif
foreign import ccall "gst_structure_get_fraction" gst_structure_get_fraction ::
Ptr Structure ->
CString ->
Ptr Int32 ->
Ptr Int32 ->
IO CInt
structureGetFraction ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Int32, Int32))
structureGetFraction :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Int32, Int32)
structureGetFraction Structure
structure Text
fieldname = IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32))
-> IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr Int32
valueNumerator <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
valueDenominator <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- Ptr Structure -> CString -> Ptr Int32 -> Ptr Int32 -> IO CInt
gst_structure_get_fraction Ptr Structure
structure' CString
fieldname' Ptr Int32
valueNumerator Ptr Int32
valueDenominator
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int32
valueNumerator' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
valueNumerator
Int32
valueDenominator' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
valueDenominator
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
valueNumerator
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
valueDenominator
(Bool, Int32, Int32) -> IO (Bool, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
valueNumerator', Int32
valueDenominator')
#if defined(ENABLE_OVERLOADING)
data StructureGetFractionMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Int32, Int32))), MonadIO m) => O.OverloadedMethod StructureGetFractionMethodInfo Structure signature where
overloadedMethod = structureGetFraction
instance O.OverloadedMethodInfo StructureGetFractionMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetFraction",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetFraction"
}
#endif
foreign import ccall "gst_structure_get_int" gst_structure_get_int ::
Ptr Structure ->
CString ->
Ptr Int32 ->
IO CInt
structureGetInt ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Int32))
structureGetInt :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Int32)
structureGetInt Structure
structure Text
fieldname = IO (Bool, Int32) -> m (Bool, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32) -> m (Bool, Int32))
-> IO (Bool, Int32) -> m (Bool, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr Int32
value <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
CInt
result <- Ptr Structure -> CString -> Ptr Int32 -> IO CInt
gst_structure_get_int Ptr Structure
structure' CString
fieldname' Ptr Int32
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int32
value' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
value
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
value
(Bool, Int32) -> IO (Bool, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
value')
#if defined(ENABLE_OVERLOADING)
data StructureGetIntMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Int32))), MonadIO m) => O.OverloadedMethod StructureGetIntMethodInfo Structure signature where
overloadedMethod = structureGetInt
instance O.OverloadedMethodInfo StructureGetIntMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetInt",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetInt"
}
#endif
foreign import ccall "gst_structure_get_int64" gst_structure_get_int64 ::
Ptr Structure ->
CString ->
Ptr Int64 ->
IO CInt
structureGetInt64 ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Int64))
structureGetInt64 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Int64)
structureGetInt64 Structure
structure Text
fieldname = IO (Bool, Int64) -> m (Bool, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int64) -> m (Bool, Int64))
-> IO (Bool, Int64) -> m (Bool, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr Int64
value <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
CInt
result <- Ptr Structure -> CString -> Ptr Int64 -> IO CInt
gst_structure_get_int64 Ptr Structure
structure' CString
fieldname' Ptr Int64
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int64
value' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
value
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
value
(Bool, Int64) -> IO (Bool, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int64
value')
#if defined(ENABLE_OVERLOADING)
data StructureGetInt64MethodInfo
instance (signature ~ (T.Text -> m ((Bool, Int64))), MonadIO m) => O.OverloadedMethod StructureGetInt64MethodInfo Structure signature where
overloadedMethod = structureGetInt64
instance O.OverloadedMethodInfo StructureGetInt64MethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetInt64",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetInt64"
}
#endif
foreign import ccall "gst_structure_get_list" gst_structure_get_list ::
Ptr Structure ->
CString ->
Ptr (Ptr GObject.ValueArray.ValueArray) ->
IO CInt
structureGetList ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, GObject.ValueArray.ValueArray))
structureGetList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, ValueArray)
structureGetList Structure
structure Text
fieldname = IO (Bool, ValueArray) -> m (Bool, ValueArray)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, ValueArray) -> m (Bool, ValueArray))
-> IO (Bool, ValueArray) -> m (Bool, ValueArray)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr (Ptr ValueArray)
array <- IO (Ptr (Ptr ValueArray))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr GObject.ValueArray.ValueArray))
CInt
result <- Ptr Structure -> CString -> Ptr (Ptr ValueArray) -> IO CInt
gst_structure_get_list Ptr Structure
structure' CString
fieldname' Ptr (Ptr ValueArray)
array
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr ValueArray
array' <- Ptr (Ptr ValueArray) -> IO (Ptr ValueArray)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ValueArray)
array
ValueArray
array'' <- ((ManagedPtr ValueArray -> ValueArray)
-> Ptr ValueArray -> IO ValueArray
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr ValueArray -> ValueArray
GObject.ValueArray.ValueArray) Ptr ValueArray
array'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr (Ptr ValueArray) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ValueArray)
array
(Bool, ValueArray) -> IO (Bool, ValueArray)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', ValueArray
array'')
#if defined(ENABLE_OVERLOADING)
data StructureGetListMethodInfo
instance (signature ~ (T.Text -> m ((Bool, GObject.ValueArray.ValueArray))), MonadIO m) => O.OverloadedMethod StructureGetListMethodInfo Structure signature where
overloadedMethod = structureGetList
instance O.OverloadedMethodInfo StructureGetListMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetList",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetList"
}
#endif
foreign import ccall "gst_structure_get_name" gst_structure_get_name ::
Ptr Structure ->
IO CString
structureGetName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m T.Text
structureGetName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m Text
structureGetName Structure
structure = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
result <- Ptr Structure -> IO CString
gst_structure_get_name Ptr Structure
structure'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"structureGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data StructureGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod StructureGetNameMethodInfo Structure signature where
overloadedMethod = structureGetName
instance O.OverloadedMethodInfo StructureGetNameMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetName"
}
#endif
foreign import ccall "gst_structure_get_name_id" gst_structure_get_name_id ::
Ptr Structure ->
IO Word32
structureGetNameId ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m Word32
structureGetNameId :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m Word32
structureGetNameId Structure
structure = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Word32
result <- Ptr Structure -> IO Word32
gst_structure_get_name_id Ptr Structure
structure'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data StructureGetNameIdMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod StructureGetNameIdMethodInfo Structure signature where
overloadedMethod = structureGetNameId
instance O.OverloadedMethodInfo StructureGetNameIdMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetNameId",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetNameId"
}
#endif
foreign import ccall "gst_structure_get_string" gst_structure_get_string ::
Ptr Structure ->
CString ->
IO CString
structureGetString ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m (Maybe T.Text)
structureGetString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Maybe Text)
structureGetString Structure
structure Text
fieldname = IO (Maybe Text) -> m (Maybe Text)
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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
CString
result <- Ptr Structure -> CString -> IO CString
gst_structure_get_string Ptr Structure
structure' CString
fieldname'
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 (m :: * -> *) a. Monad m => a -> m a
return Text
result''
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data StructureGetStringMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m) => O.OverloadedMethod StructureGetStringMethodInfo Structure signature where
overloadedMethod = structureGetString
instance O.OverloadedMethodInfo StructureGetStringMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetString",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetString"
}
#endif
foreign import ccall "gst_structure_get_uint" gst_structure_get_uint ::
Ptr Structure ->
CString ->
Ptr Word32 ->
IO CInt
structureGetUint ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Word32))
structureGetUint :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, Word32)
structureGetUint Structure
structure Text
fieldname = IO (Bool, Word32) -> m (Bool, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32) -> m (Bool, Word32))
-> IO (Bool, Word32) -> m (Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr Word32
value <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Structure -> CString -> Ptr Word32 -> IO CInt
gst_structure_get_uint Ptr Structure
structure' CString
fieldname' Ptr Word32
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
value' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
value
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
value
(Bool, Word32) -> IO (Bool, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
value')
#if defined(ENABLE_OVERLOADING)
data StructureGetUintMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Word32))), MonadIO m) => O.OverloadedMethod StructureGetUintMethodInfo Structure signature where
overloadedMethod = structureGetUint
instance O.OverloadedMethodInfo StructureGetUintMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetUint",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetUint"
}
#endif
foreign import ccall "gst_structure_get_uint64" gst_structure_get_uint64 ::
Ptr Structure ->
CString ->
Ptr Word64 ->
IO CInt
structureGetUint64 ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ((Bool, Word64))
structureGetUint64 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Bool, CGType)
structureGetUint64 Structure
structure Text
fieldname = IO (Bool, CGType) -> m (Bool, CGType)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, CGType) -> m (Bool, CGType))
-> IO (Bool, CGType) -> m (Bool, CGType)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr CGType
value <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
CInt
result <- Ptr Structure -> CString -> Ptr CGType -> IO CInt
gst_structure_get_uint64 Ptr Structure
structure' CString
fieldname' Ptr CGType
value
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CGType
value' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
value
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
value
(Bool, CGType) -> IO (Bool, CGType)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', CGType
value')
#if defined(ENABLE_OVERLOADING)
data StructureGetUint64MethodInfo
instance (signature ~ (T.Text -> m ((Bool, Word64))), MonadIO m) => O.OverloadedMethod StructureGetUint64MethodInfo Structure signature where
overloadedMethod = structureGetUint64
instance O.OverloadedMethodInfo StructureGetUint64MethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetUint64",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetUint64"
}
#endif
foreign import ccall "gst_structure_get_value" gst_structure_get_value ::
Ptr Structure ->
CString ->
IO (Ptr GValue)
structureGetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m (Maybe GValue)
structureGetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m (Maybe GValue)
structureGetValue Structure
structure Text
fieldname = IO (Maybe GValue) -> m (Maybe GValue)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GValue) -> m (Maybe GValue))
-> IO (Maybe GValue) -> m (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr GValue
result <- Ptr Structure -> CString -> IO (Ptr GValue)
gst_structure_get_value Ptr Structure
structure' CString
fieldname'
Maybe GValue
maybeResult <- Ptr GValue -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GValue
result ((Ptr GValue -> IO GValue) -> IO (Maybe GValue))
-> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ \Ptr GValue
result' -> do
GValue
result'' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result'
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result''
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Maybe GValue -> IO (Maybe GValue)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GValue
maybeResult
#if defined(ENABLE_OVERLOADING)
data StructureGetValueMethodInfo
instance (signature ~ (T.Text -> m (Maybe GValue)), MonadIO m) => O.OverloadedMethod StructureGetValueMethodInfo Structure signature where
overloadedMethod = structureGetValue
instance O.OverloadedMethodInfo StructureGetValueMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureGetValue",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureGetValue"
}
#endif
foreign import ccall "gst_structure_has_field" gst_structure_has_field ::
Ptr Structure ->
CString ->
IO CInt
structureHasField ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m Bool
structureHasField :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m Bool
structureHasField Structure
structure Text
fieldname = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
CInt
result <- Ptr Structure -> CString -> IO CInt
gst_structure_has_field Ptr Structure
structure' CString
fieldname'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureHasFieldMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.OverloadedMethod StructureHasFieldMethodInfo Structure signature where
overloadedMethod = structureHasField
instance O.OverloadedMethodInfo StructureHasFieldMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureHasField",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureHasField"
}
#endif
foreign import ccall "gst_structure_has_field_typed" gst_structure_has_field_typed ::
Ptr Structure ->
CString ->
CGType ->
IO CInt
structureHasFieldTyped ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> GType
-> m Bool
structureHasFieldTyped :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> GType -> m Bool
structureHasFieldTyped Structure
structure Text
fieldname GType
type_ = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
CInt
result <- Ptr Structure -> CString -> CGType -> IO CInt
gst_structure_has_field_typed Ptr Structure
structure' CString
fieldname' CGType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureHasFieldTypedMethodInfo
instance (signature ~ (T.Text -> GType -> m Bool), MonadIO m) => O.OverloadedMethod StructureHasFieldTypedMethodInfo Structure signature where
overloadedMethod = structureHasFieldTyped
instance O.OverloadedMethodInfo StructureHasFieldTypedMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureHasFieldTyped",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureHasFieldTyped"
}
#endif
foreign import ccall "gst_structure_has_name" gst_structure_has_name ::
Ptr Structure ->
CString ->
IO CInt
structureHasName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m Bool
structureHasName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m Bool
structureHasName Structure
structure Text
name = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
name' <- Text -> IO CString
textToCString Text
name
CInt
result <- Ptr Structure -> CString -> IO CInt
gst_structure_has_name Ptr Structure
structure' CString
name'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureHasNameMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m) => O.OverloadedMethod StructureHasNameMethodInfo Structure signature where
overloadedMethod = structureHasName
instance O.OverloadedMethodInfo StructureHasNameMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureHasName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureHasName"
}
#endif
foreign import ccall "gst_structure_id_get_value" gst_structure_id_get_value ::
Ptr Structure ->
Word32 ->
IO (Ptr GValue)
structureIdGetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Word32
-> m (Maybe GValue)
structureIdGetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Word32 -> m (Maybe GValue)
structureIdGetValue Structure
structure Word32
field = IO (Maybe GValue) -> m (Maybe GValue)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GValue) -> m (Maybe GValue))
-> IO (Maybe GValue) -> m (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr GValue
result <- Ptr Structure -> Word32 -> IO (Ptr GValue)
gst_structure_id_get_value Ptr Structure
structure' Word32
field
Maybe GValue
maybeResult <- Ptr GValue -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GValue
result ((Ptr GValue -> IO GValue) -> IO (Maybe GValue))
-> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ \Ptr GValue
result' -> do
GValue
result'' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result'
GValue -> IO GValue
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result''
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Maybe GValue -> IO (Maybe GValue)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GValue
maybeResult
#if defined(ENABLE_OVERLOADING)
data StructureIdGetValueMethodInfo
instance (signature ~ (Word32 -> m (Maybe GValue)), MonadIO m) => O.OverloadedMethod StructureIdGetValueMethodInfo Structure signature where
overloadedMethod = structureIdGetValue
instance O.OverloadedMethodInfo StructureIdGetValueMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIdGetValue",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIdGetValue"
}
#endif
foreign import ccall "gst_structure_id_has_field" gst_structure_id_has_field ::
Ptr Structure ->
Word32 ->
IO CInt
structureIdHasField ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Word32
-> m Bool
structureIdHasField :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Word32 -> m Bool
structureIdHasField Structure
structure Word32
field = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CInt
result <- Ptr Structure -> Word32 -> IO CInt
gst_structure_id_has_field Ptr Structure
structure' Word32
field
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureIdHasFieldMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m) => O.OverloadedMethod StructureIdHasFieldMethodInfo Structure signature where
overloadedMethod = structureIdHasField
instance O.OverloadedMethodInfo StructureIdHasFieldMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIdHasField",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIdHasField"
}
#endif
foreign import ccall "gst_structure_id_has_field_typed" gst_structure_id_has_field_typed ::
Ptr Structure ->
Word32 ->
CGType ->
IO CInt
structureIdHasFieldTyped ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Word32
-> GType
-> m Bool
structureIdHasFieldTyped :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Word32 -> GType -> m Bool
structureIdHasFieldTyped Structure
structure Word32
field GType
type_ = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
CInt
result <- Ptr Structure -> Word32 -> CGType -> IO CInt
gst_structure_id_has_field_typed Ptr Structure
structure' Word32
field CGType
type_'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureIdHasFieldTypedMethodInfo
instance (signature ~ (Word32 -> GType -> m Bool), MonadIO m) => O.OverloadedMethod StructureIdHasFieldTypedMethodInfo Structure signature where
overloadedMethod = structureIdHasFieldTyped
instance O.OverloadedMethodInfo StructureIdHasFieldTypedMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIdHasFieldTyped",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIdHasFieldTyped"
}
#endif
foreign import ccall "gst_structure_id_set_value" gst_structure_id_set_value ::
Ptr Structure ->
Word32 ->
Ptr GValue ->
IO ()
structureIdSetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Word32
-> GValue
-> m ()
structureIdSetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Word32 -> GValue -> m ()
structureIdSetValue Structure
structure Word32
field GValue
value = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr Structure -> Word32 -> Ptr GValue -> IO ()
gst_structure_id_set_value Ptr Structure
structure' Word32
field Ptr GValue
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureIdSetValueMethodInfo
instance (signature ~ (Word32 -> GValue -> m ()), MonadIO m) => O.OverloadedMethod StructureIdSetValueMethodInfo Structure signature where
overloadedMethod = structureIdSetValue
instance O.OverloadedMethodInfo StructureIdSetValueMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIdSetValue",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIdSetValue"
}
#endif
foreign import ccall "gst_structure_id_take_value" gst_structure_id_take_value ::
Ptr Structure ->
Word32 ->
Ptr GValue ->
IO ()
structureIdTakeValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Word32
-> GValue
-> m ()
structureIdTakeValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Word32 -> GValue -> m ()
structureIdTakeValue Structure
structure Word32
field GValue
value = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
B.GValue.disownGValue GValue
value
Ptr Structure -> Word32 -> Ptr GValue -> IO ()
gst_structure_id_take_value Ptr Structure
structure' Word32
field Ptr GValue
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureIdTakeValueMethodInfo
instance (signature ~ (Word32 -> GValue -> m ()), MonadIO m) => O.OverloadedMethod StructureIdTakeValueMethodInfo Structure signature where
overloadedMethod = structureIdTakeValue
instance O.OverloadedMethodInfo StructureIdTakeValueMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIdTakeValue",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIdTakeValue"
}
#endif
foreign import ccall "gst_structure_intersect" gst_structure_intersect ::
Ptr Structure ->
Ptr Structure ->
IO (Ptr Structure)
structureIntersect ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Structure
-> m (Maybe Structure)
structureIntersect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Structure -> m (Maybe Structure)
structureIntersect Structure
struct1 Structure
struct2 = IO (Maybe Structure) -> m (Maybe Structure)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Structure) -> m (Maybe Structure))
-> IO (Maybe Structure) -> m (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
struct1' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
struct1
Ptr Structure
struct2' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
struct2
Ptr Structure
result <- Ptr Structure -> Ptr Structure -> IO (Ptr Structure)
gst_structure_intersect Ptr Structure
struct1' Ptr Structure
struct2'
Maybe Structure
maybeResult <- Ptr Structure
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Structure
result ((Ptr Structure -> IO Structure) -> IO (Maybe Structure))
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ \Ptr Structure
result' -> do
Structure
result'' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Structure -> Structure
Structure) Ptr Structure
result'
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result''
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
struct1
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
struct2
Maybe Structure -> IO (Maybe Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Structure
maybeResult
#if defined(ENABLE_OVERLOADING)
data StructureIntersectMethodInfo
instance (signature ~ (Structure -> m (Maybe Structure)), MonadIO m) => O.OverloadedMethod StructureIntersectMethodInfo Structure signature where
overloadedMethod = structureIntersect
instance O.OverloadedMethodInfo StructureIntersectMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIntersect",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIntersect"
}
#endif
foreign import ccall "gst_structure_is_equal" gst_structure_is_equal ::
Ptr Structure ->
Ptr Structure ->
IO CInt
structureIsEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Structure
-> m Bool
structureIsEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Structure -> m Bool
structureIsEqual Structure
structure1 Structure
structure2 = 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 Structure
structure1' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure1
Ptr Structure
structure2' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure2
CInt
result <- Ptr Structure -> Ptr Structure -> IO CInt
gst_structure_is_equal Ptr Structure
structure1' Ptr Structure
structure2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure1
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure2
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureIsEqualMethodInfo
instance (signature ~ (Structure -> m Bool), MonadIO m) => O.OverloadedMethod StructureIsEqualMethodInfo Structure signature where
overloadedMethod = structureIsEqual
instance O.OverloadedMethodInfo StructureIsEqualMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIsEqual",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIsEqual"
}
#endif
foreign import ccall "gst_structure_is_subset" gst_structure_is_subset ::
Ptr Structure ->
Ptr Structure ->
IO CInt
structureIsSubset ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Structure
-> m Bool
structureIsSubset :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Structure -> m Bool
structureIsSubset Structure
subset Structure
superset = 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 Structure
subset' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
subset
Ptr Structure
superset' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
superset
CInt
result <- Ptr Structure -> Ptr Structure -> IO CInt
gst_structure_is_subset Ptr Structure
subset' Ptr Structure
superset'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
subset
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
superset
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureIsSubsetMethodInfo
instance (signature ~ (Structure -> m Bool), MonadIO m) => O.OverloadedMethod StructureIsSubsetMethodInfo Structure signature where
overloadedMethod = structureIsSubset
instance O.OverloadedMethodInfo StructureIsSubsetMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureIsSubset",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureIsSubset"
}
#endif
foreign import ccall "gst_structure_map_in_place" gst_structure_map_in_place ::
Ptr Structure ->
FunPtr Gst.Callbacks.C_StructureMapFunc ->
Ptr () ->
IO CInt
structureMapInPlace ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Gst.Callbacks.StructureMapFunc
-> m Bool
structureMapInPlace :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> StructureFilterMapFunc -> m Bool
structureMapInPlace Structure
structure StructureFilterMapFunc
func = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
FunPtr C_StructureFilterMapFunc
func' <- C_StructureFilterMapFunc -> IO (FunPtr C_StructureFilterMapFunc)
Gst.Callbacks.mk_StructureMapFunc (Maybe (Ptr (FunPtr C_StructureFilterMapFunc))
-> StructureFilterMapFunc_WithClosures -> C_StructureFilterMapFunc
Gst.Callbacks.wrap_StructureMapFunc Maybe (Ptr (FunPtr C_StructureFilterMapFunc))
forall a. Maybe a
Nothing (StructureFilterMapFunc -> StructureFilterMapFunc_WithClosures
Gst.Callbacks.drop_closures_StructureMapFunc StructureFilterMapFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Structure
-> FunPtr C_StructureFilterMapFunc -> Ptr () -> IO CInt
gst_structure_map_in_place Ptr Structure
structure' FunPtr C_StructureFilterMapFunc
func' Ptr ()
forall a. Ptr a
userData
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_StructureFilterMapFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_StructureFilterMapFunc
func'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureMapInPlaceMethodInfo
instance (signature ~ (Gst.Callbacks.StructureMapFunc -> m Bool), MonadIO m) => O.OverloadedMethod StructureMapInPlaceMethodInfo Structure signature where
overloadedMethod = structureMapInPlace
instance O.OverloadedMethodInfo StructureMapInPlaceMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureMapInPlace",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureMapInPlace"
}
#endif
foreign import ccall "gst_structure_n_fields" gst_structure_n_fields ::
Ptr Structure ->
IO Int32
structureNFields ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m Int32
structureNFields :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m Int32
structureNFields Structure
structure = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Int32
result <- Ptr Structure -> IO Int32
gst_structure_n_fields Ptr Structure
structure'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data StructureNFieldsMethodInfo
instance (signature ~ (m Int32), MonadIO m) => O.OverloadedMethod StructureNFieldsMethodInfo Structure signature where
overloadedMethod = structureNFields
instance O.OverloadedMethodInfo StructureNFieldsMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureNFields",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureNFields"
}
#endif
foreign import ccall "gst_structure_nth_field_name" gst_structure_nth_field_name ::
Ptr Structure ->
Word32 ->
IO CString
structureNthFieldName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Word32
-> m T.Text
structureNthFieldName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Word32 -> m Text
structureNthFieldName Structure
structure Word32
index = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
result <- Ptr Structure -> Word32 -> IO CString
gst_structure_nth_field_name Ptr Structure
structure' Word32
index
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"structureNthFieldName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data StructureNthFieldNameMethodInfo
instance (signature ~ (Word32 -> m T.Text), MonadIO m) => O.OverloadedMethod StructureNthFieldNameMethodInfo Structure signature where
overloadedMethod = structureNthFieldName
instance O.OverloadedMethodInfo StructureNthFieldNameMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureNthFieldName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureNthFieldName"
}
#endif
foreign import ccall "gst_structure_remove_all_fields" gst_structure_remove_all_fields ::
Ptr Structure ->
IO ()
structureRemoveAllFields ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m ()
structureRemoveAllFields :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m ()
structureRemoveAllFields Structure
structure = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr Structure -> IO ()
gst_structure_remove_all_fields Ptr Structure
structure'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureRemoveAllFieldsMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod StructureRemoveAllFieldsMethodInfo Structure signature where
overloadedMethod = structureRemoveAllFields
instance O.OverloadedMethodInfo StructureRemoveAllFieldsMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureRemoveAllFields",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureRemoveAllFields"
}
#endif
foreign import ccall "gst_structure_remove_field" gst_structure_remove_field ::
Ptr Structure ->
CString ->
IO ()
structureRemoveField ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ()
structureRemoveField :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m ()
structureRemoveField Structure
structure Text
fieldname = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr Structure -> CString -> IO ()
gst_structure_remove_field Ptr Structure
structure' CString
fieldname'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureRemoveFieldMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod StructureRemoveFieldMethodInfo Structure signature where
overloadedMethod = structureRemoveField
instance O.OverloadedMethodInfo StructureRemoveFieldMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureRemoveField",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureRemoveField"
}
#endif
foreign import ccall "gst_structure_set_array" gst_structure_set_array ::
Ptr Structure ->
CString ->
Ptr GObject.ValueArray.ValueArray ->
IO ()
structureSetArray ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> GObject.ValueArray.ValueArray
-> m ()
structureSetArray :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> ValueArray -> m ()
structureSetArray Structure
structure Text
fieldname ValueArray
array = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr ValueArray
array' <- ValueArray -> IO (Ptr ValueArray)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ValueArray
array
Ptr Structure -> CString -> Ptr ValueArray -> IO ()
gst_structure_set_array Ptr Structure
structure' CString
fieldname' Ptr ValueArray
array'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
ValueArray -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ValueArray
array
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureSetArrayMethodInfo
instance (signature ~ (T.Text -> GObject.ValueArray.ValueArray -> m ()), MonadIO m) => O.OverloadedMethod StructureSetArrayMethodInfo Structure signature where
overloadedMethod = structureSetArray
instance O.OverloadedMethodInfo StructureSetArrayMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureSetArray",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureSetArray"
}
#endif
foreign import ccall "gst_structure_set_list" gst_structure_set_list ::
Ptr Structure ->
CString ->
Ptr GObject.ValueArray.ValueArray ->
IO ()
structureSetList ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> GObject.ValueArray.ValueArray
-> m ()
structureSetList :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> ValueArray -> m ()
structureSetList Structure
structure Text
fieldname ValueArray
array = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr ValueArray
array' <- ValueArray -> IO (Ptr ValueArray)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ValueArray
array
Ptr Structure -> CString -> Ptr ValueArray -> IO ()
gst_structure_set_list Ptr Structure
structure' CString
fieldname' Ptr ValueArray
array'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
ValueArray -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ValueArray
array
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureSetListMethodInfo
instance (signature ~ (T.Text -> GObject.ValueArray.ValueArray -> m ()), MonadIO m) => O.OverloadedMethod StructureSetListMethodInfo Structure signature where
overloadedMethod = structureSetList
instance O.OverloadedMethodInfo StructureSetListMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureSetList",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureSetList"
}
#endif
foreign import ccall "gst_structure_set_name" gst_structure_set_name ::
Ptr Structure ->
CString ->
IO ()
structureSetName ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> m ()
structureSetName :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> m ()
structureSetName Structure
structure Text
name = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr Structure -> CString -> IO ()
gst_structure_set_name Ptr Structure
structure' CString
name'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureSetNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.OverloadedMethod StructureSetNameMethodInfo Structure signature where
overloadedMethod = structureSetName
instance O.OverloadedMethodInfo StructureSetNameMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureSetName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureSetName"
}
#endif
foreign import ccall "gst_structure_set_parent_refcount" gst_structure_set_parent_refcount ::
Ptr Structure ->
Int32 ->
IO CInt
structureSetParentRefcount ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> Int32
-> m Bool
structureSetParentRefcount :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Int32 -> m Bool
structureSetParentRefcount Structure
structure Int32
refcount = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CInt
result <- Ptr Structure -> Int32 -> IO CInt
gst_structure_set_parent_refcount Ptr Structure
structure' Int32
refcount
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data StructureSetParentRefcountMethodInfo
instance (signature ~ (Int32 -> m Bool), MonadIO m) => O.OverloadedMethod StructureSetParentRefcountMethodInfo Structure signature where
overloadedMethod = structureSetParentRefcount
instance O.OverloadedMethodInfo StructureSetParentRefcountMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureSetParentRefcount",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureSetParentRefcount"
}
#endif
foreign import ccall "gst_structure_set_value" gst_structure_set_value ::
Ptr Structure ->
CString ->
Ptr GValue ->
IO ()
structureSetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> GValue
-> m ()
structureSetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> GValue -> m ()
structureSetValue Structure
structure Text
fieldname GValue
value = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr Structure -> CString -> Ptr GValue -> IO ()
gst_structure_set_value Ptr Structure
structure' CString
fieldname' Ptr GValue
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureSetValueMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m) => O.OverloadedMethod StructureSetValueMethodInfo Structure signature where
overloadedMethod = structureSetValue
instance O.OverloadedMethodInfo StructureSetValueMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureSetValue",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureSetValue"
}
#endif
foreign import ccall "gst_structure_take_value" gst_structure_take_value ::
Ptr Structure ->
CString ->
Ptr GValue ->
IO ()
structureTakeValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> T.Text
-> GValue
-> m ()
structureTakeValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> Text -> GValue -> m ()
structureTakeValue Structure
structure Text
fieldname GValue
value = 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 Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
fieldname' <- Text -> IO CString
textToCString Text
fieldname
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
B.GValue.disownGValue GValue
value
Ptr Structure -> CString -> Ptr GValue -> IO ()
gst_structure_take_value Ptr Structure
structure' CString
fieldname' Ptr GValue
value'
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
fieldname'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data StructureTakeValueMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m) => O.OverloadedMethod StructureTakeValueMethodInfo Structure signature where
overloadedMethod = structureTakeValue
instance O.OverloadedMethodInfo StructureTakeValueMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureTakeValue",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureTakeValue"
}
#endif
foreign import ccall "gst_structure_to_string" gst_structure_to_string ::
Ptr Structure ->
IO CString
structureToString ::
(B.CallStack.HasCallStack, MonadIO m) =>
Structure
-> m T.Text
structureToString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Structure -> m Text
structureToString Structure
structure = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CString
result <- Ptr Structure -> IO CString
gst_structure_to_string Ptr Structure
structure'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"structureToString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data StructureToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod StructureToStringMethodInfo Structure signature where
overloadedMethod = structureToString
instance O.OverloadedMethodInfo StructureToStringMethodInfo Structure where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gst.Structs.Structure.structureToString",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gst-1.0.24/docs/GI-Gst-Structs-Structure.html#v:structureToString"
}
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveStructureMethod (t :: Symbol) (o :: *) :: * where
ResolveStructureMethod "canIntersect" o = StructureCanIntersectMethodInfo
ResolveStructureMethod "copy" o = StructureCopyMethodInfo
ResolveStructureMethod "filterAndMapInPlace" o = StructureFilterAndMapInPlaceMethodInfo
ResolveStructureMethod "fixate" o = StructureFixateMethodInfo
ResolveStructureMethod "fixateField" o = StructureFixateFieldMethodInfo
ResolveStructureMethod "fixateFieldBoolean" o = StructureFixateFieldBooleanMethodInfo
ResolveStructureMethod "fixateFieldNearestDouble" o = StructureFixateFieldNearestDoubleMethodInfo
ResolveStructureMethod "fixateFieldNearestFraction" o = StructureFixateFieldNearestFractionMethodInfo
ResolveStructureMethod "fixateFieldNearestInt" o = StructureFixateFieldNearestIntMethodInfo
ResolveStructureMethod "fixateFieldString" o = StructureFixateFieldStringMethodInfo
ResolveStructureMethod "foreach" o = StructureForeachMethodInfo
ResolveStructureMethod "free" o = StructureFreeMethodInfo
ResolveStructureMethod "hasField" o = StructureHasFieldMethodInfo
ResolveStructureMethod "hasFieldTyped" o = StructureHasFieldTypedMethodInfo
ResolveStructureMethod "hasName" o = StructureHasNameMethodInfo
ResolveStructureMethod "idGetValue" o = StructureIdGetValueMethodInfo
ResolveStructureMethod "idHasField" o = StructureIdHasFieldMethodInfo
ResolveStructureMethod "idHasFieldTyped" o = StructureIdHasFieldTypedMethodInfo
ResolveStructureMethod "idSetValue" o = StructureIdSetValueMethodInfo
ResolveStructureMethod "idTakeValue" o = StructureIdTakeValueMethodInfo
ResolveStructureMethod "intersect" o = StructureIntersectMethodInfo
ResolveStructureMethod "isEqual" o = StructureIsEqualMethodInfo
ResolveStructureMethod "isSubset" o = StructureIsSubsetMethodInfo
ResolveStructureMethod "mapInPlace" o = StructureMapInPlaceMethodInfo
ResolveStructureMethod "nFields" o = StructureNFieldsMethodInfo
ResolveStructureMethod "nthFieldName" o = StructureNthFieldNameMethodInfo
ResolveStructureMethod "removeAllFields" o = StructureRemoveAllFieldsMethodInfo
ResolveStructureMethod "removeField" o = StructureRemoveFieldMethodInfo
ResolveStructureMethod "takeValue" o = StructureTakeValueMethodInfo
ResolveStructureMethod "toString" o = StructureToStringMethodInfo
ResolveStructureMethod "getArray" o = StructureGetArrayMethodInfo
ResolveStructureMethod "getBoolean" o = StructureGetBooleanMethodInfo
ResolveStructureMethod "getClockTime" o = StructureGetClockTimeMethodInfo
ResolveStructureMethod "getDate" o = StructureGetDateMethodInfo
ResolveStructureMethod "getDateTime" o = StructureGetDateTimeMethodInfo
ResolveStructureMethod "getDouble" o = StructureGetDoubleMethodInfo
ResolveStructureMethod "getEnum" o = StructureGetEnumMethodInfo
ResolveStructureMethod "getFieldType" o = StructureGetFieldTypeMethodInfo
ResolveStructureMethod "getFlagset" o = StructureGetFlagsetMethodInfo
ResolveStructureMethod "getFraction" o = StructureGetFractionMethodInfo
ResolveStructureMethod "getInt" o = StructureGetIntMethodInfo
ResolveStructureMethod "getInt64" o = StructureGetInt64MethodInfo
ResolveStructureMethod "getList" o = StructureGetListMethodInfo
ResolveStructureMethod "getName" o = StructureGetNameMethodInfo
ResolveStructureMethod "getNameId" o = StructureGetNameIdMethodInfo
ResolveStructureMethod "getString" o = StructureGetStringMethodInfo
ResolveStructureMethod "getUint" o = StructureGetUintMethodInfo
ResolveStructureMethod "getUint64" o = StructureGetUint64MethodInfo
ResolveStructureMethod "getValue" o = StructureGetValueMethodInfo
ResolveStructureMethod "setArray" o = StructureSetArrayMethodInfo
ResolveStructureMethod "setList" o = StructureSetListMethodInfo
ResolveStructureMethod "setName" o = StructureSetNameMethodInfo
ResolveStructureMethod "setParentRefcount" o = StructureSetParentRefcountMethodInfo
ResolveStructureMethod "setValue" o = StructureSetValueMethodInfo
ResolveStructureMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveStructureMethod t Structure, O.OverloadedMethod info Structure p) => OL.IsLabel t (Structure -> 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 ~ ResolveStructureMethod t Structure, O.OverloadedMethod info Structure p, R.HasField t Structure p) => R.HasField t Structure p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveStructureMethod t Structure, O.OverloadedMethodInfo info Structure) => OL.IsLabel t (O.MethodProxy info Structure) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif