{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Structs.Caps
(
Caps(..) ,
newZeroCaps ,
#if defined(ENABLE_OVERLOADING)
ResolveCapsMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
CapsAppendMethodInfo ,
#endif
capsAppend ,
#if defined(ENABLE_OVERLOADING)
CapsAppendStructureMethodInfo ,
#endif
capsAppendStructure ,
#if defined(ENABLE_OVERLOADING)
CapsAppendStructureFullMethodInfo ,
#endif
capsAppendStructureFull ,
#if defined(ENABLE_OVERLOADING)
CapsCanIntersectMethodInfo ,
#endif
capsCanIntersect ,
#if defined(ENABLE_OVERLOADING)
CapsCopyMethodInfo ,
#endif
capsCopy ,
#if defined(ENABLE_OVERLOADING)
CapsCopyNthMethodInfo ,
#endif
capsCopyNth ,
#if defined(ENABLE_OVERLOADING)
CapsFilterAndMapInPlaceMethodInfo ,
#endif
capsFilterAndMapInPlace ,
#if defined(ENABLE_OVERLOADING)
CapsFixateMethodInfo ,
#endif
capsFixate ,
#if defined(ENABLE_OVERLOADING)
CapsForeachMethodInfo ,
#endif
capsForeach ,
capsFromString ,
#if defined(ENABLE_OVERLOADING)
CapsGetFeaturesMethodInfo ,
#endif
capsGetFeatures ,
#if defined(ENABLE_OVERLOADING)
CapsGetSizeMethodInfo ,
#endif
capsGetSize ,
#if defined(ENABLE_OVERLOADING)
CapsGetStructureMethodInfo ,
#endif
capsGetStructure ,
#if defined(ENABLE_OVERLOADING)
CapsIntersectMethodInfo ,
#endif
capsIntersect ,
#if defined(ENABLE_OVERLOADING)
CapsIntersectFullMethodInfo ,
#endif
capsIntersectFull ,
#if defined(ENABLE_OVERLOADING)
CapsIsAlwaysCompatibleMethodInfo ,
#endif
capsIsAlwaysCompatible ,
#if defined(ENABLE_OVERLOADING)
CapsIsAnyMethodInfo ,
#endif
capsIsAny ,
#if defined(ENABLE_OVERLOADING)
CapsIsEmptyMethodInfo ,
#endif
capsIsEmpty ,
#if defined(ENABLE_OVERLOADING)
CapsIsEqualMethodInfo ,
#endif
capsIsEqual ,
#if defined(ENABLE_OVERLOADING)
CapsIsEqualFixedMethodInfo ,
#endif
capsIsEqualFixed ,
#if defined(ENABLE_OVERLOADING)
CapsIsFixedMethodInfo ,
#endif
capsIsFixed ,
#if defined(ENABLE_OVERLOADING)
CapsIsStrictlyEqualMethodInfo ,
#endif
capsIsStrictlyEqual ,
#if defined(ENABLE_OVERLOADING)
CapsIsSubsetMethodInfo ,
#endif
capsIsSubset ,
#if defined(ENABLE_OVERLOADING)
CapsIsSubsetStructureMethodInfo ,
#endif
capsIsSubsetStructure ,
#if defined(ENABLE_OVERLOADING)
CapsIsSubsetStructureFullMethodInfo ,
#endif
capsIsSubsetStructureFull ,
#if defined(ENABLE_OVERLOADING)
CapsMapInPlaceMethodInfo ,
#endif
capsMapInPlace ,
#if defined(ENABLE_OVERLOADING)
CapsMergeMethodInfo ,
#endif
capsMerge ,
#if defined(ENABLE_OVERLOADING)
CapsMergeStructureMethodInfo ,
#endif
capsMergeStructure ,
#if defined(ENABLE_OVERLOADING)
CapsMergeStructureFullMethodInfo ,
#endif
capsMergeStructureFull ,
capsNewAny ,
capsNewEmpty ,
capsNewEmptySimple ,
#if defined(ENABLE_OVERLOADING)
CapsNormalizeMethodInfo ,
#endif
capsNormalize ,
#if defined(ENABLE_OVERLOADING)
CapsRemoveStructureMethodInfo ,
#endif
capsRemoveStructure ,
#if defined(ENABLE_OVERLOADING)
CapsSerializeMethodInfo ,
#endif
capsSerialize ,
#if defined(ENABLE_OVERLOADING)
CapsSetFeaturesMethodInfo ,
#endif
capsSetFeatures ,
#if defined(ENABLE_OVERLOADING)
CapsSetFeaturesSimpleMethodInfo ,
#endif
capsSetFeaturesSimple ,
#if defined(ENABLE_OVERLOADING)
CapsSetValueMethodInfo ,
#endif
capsSetValue ,
#if defined(ENABLE_OVERLOADING)
CapsSimplifyMethodInfo ,
#endif
capsSimplify ,
#if defined(ENABLE_OVERLOADING)
CapsStealStructureMethodInfo ,
#endif
capsStealStructure ,
#if defined(ENABLE_OVERLOADING)
CapsSubtractMethodInfo ,
#endif
capsSubtract ,
#if defined(ENABLE_OVERLOADING)
CapsToStringMethodInfo ,
#endif
capsToString ,
#if defined(ENABLE_OVERLOADING)
CapsTruncateMethodInfo ,
#endif
capsTruncate ,
#if defined(ENABLE_OVERLOADING)
caps_miniObject ,
#endif
getCapsMiniObject ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.Gst.Callbacks as Gst.Callbacks
import {-# SOURCE #-} qualified GI.Gst.Enums as Gst.Enums
import {-# SOURCE #-} qualified GI.Gst.Flags as Gst.Flags
import {-# SOURCE #-} qualified GI.Gst.Structs.CapsFeatures as Gst.CapsFeatures
import {-# SOURCE #-} qualified GI.Gst.Structs.MiniObject as Gst.MiniObject
import {-# SOURCE #-} qualified GI.Gst.Structs.Structure as Gst.Structure
newtype Caps = Caps (SP.ManagedPtr Caps)
deriving (Caps -> Caps -> Bool
(Caps -> Caps -> Bool) -> (Caps -> Caps -> Bool) -> Eq Caps
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Caps -> Caps -> Bool
== :: Caps -> Caps -> Bool
$c/= :: Caps -> Caps -> Bool
/= :: Caps -> Caps -> Bool
Eq)
instance SP.ManagedPtrNewtype Caps where
toManagedPtr :: Caps -> ManagedPtr Caps
toManagedPtr (Caps ManagedPtr Caps
p) = ManagedPtr Caps
p
foreign import ccall "gst_caps_get_type" c_gst_caps_get_type ::
IO GType
type instance O.ParentTypes Caps = '[]
instance O.HasParentTypes Caps
instance B.Types.TypedObject Caps where
glibType :: IO GType
glibType = IO GType
c_gst_caps_get_type
instance B.Types.GBoxed Caps
instance B.GValue.IsGValue (Maybe Caps) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_caps_get_type
gvalueSet_ :: Ptr GValue -> Maybe Caps -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Caps
P.Nothing = Ptr GValue -> Ptr Caps -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr Caps
forall a. Ptr a
FP.nullPtr :: FP.Ptr Caps)
gvalueSet_ Ptr GValue
gv (P.Just Caps
obj) = Caps -> (Ptr Caps -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Caps
obj (Ptr GValue -> Ptr Caps -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Caps)
gvalueGet_ Ptr GValue
gv = do
Ptr Caps
ptr <- Ptr GValue -> IO (Ptr Caps)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr Caps)
if Ptr Caps
ptr Ptr Caps -> Ptr Caps -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Caps
forall a. Ptr a
FP.nullPtr
then Caps -> Maybe Caps
forall a. a -> Maybe a
P.Just (Caps -> Maybe Caps) -> IO Caps -> IO (Maybe Caps)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Caps -> Caps
Caps Ptr Caps
ptr
else Maybe Caps -> IO (Maybe Caps)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Caps
forall a. Maybe a
P.Nothing
newZeroCaps :: MonadIO m => m Caps
newZeroCaps :: forall (m :: * -> *). MonadIO m => m Caps
newZeroCaps = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Caps)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
64 IO (Ptr Caps) -> (Ptr Caps -> IO Caps) -> IO Caps
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps
instance tag ~ 'AttrSet => Constructible Caps tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr Caps -> Caps) -> [AttrOp Caps tag] -> m Caps
new ManagedPtr Caps -> Caps
_ [AttrOp Caps tag]
attrs = do
Caps
o <- m Caps
forall (m :: * -> *). MonadIO m => m Caps
newZeroCaps
Caps -> [AttrOp Caps 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Caps
o [AttrOp Caps tag]
[AttrOp Caps 'AttrSet]
attrs
Caps -> m Caps
forall a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
o
getCapsMiniObject :: MonadIO m => Caps -> m Gst.MiniObject.MiniObject
getCapsMiniObject :: forall (m :: * -> *). MonadIO m => Caps -> m MiniObject
getCapsMiniObject Caps
s = IO MiniObject -> m MiniObject
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MiniObject -> m MiniObject) -> IO MiniObject -> m MiniObject
forall a b. (a -> b) -> a -> b
$ Caps -> (Ptr Caps -> IO MiniObject) -> IO MiniObject
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Caps
s ((Ptr Caps -> IO MiniObject) -> IO MiniObject)
-> (Ptr Caps -> IO MiniObject) -> IO MiniObject
forall a b. (a -> b) -> a -> b
$ \Ptr Caps
ptr -> do
let val :: Ptr MiniObject
val = Ptr Caps
ptr Ptr Caps -> Int -> Ptr MiniObject
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gst.MiniObject.MiniObject)
MiniObject
val' <- ((ManagedPtr MiniObject -> MiniObject)
-> Ptr MiniObject -> IO MiniObject
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr MiniObject -> MiniObject
Gst.MiniObject.MiniObject) Ptr MiniObject
val
MiniObject -> IO MiniObject
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MiniObject
val'
#if defined(ENABLE_OVERLOADING)
data CapsMiniObjectFieldInfo
instance AttrInfo CapsMiniObjectFieldInfo where
type AttrBaseTypeConstraint CapsMiniObjectFieldInfo = (~) Caps
type AttrAllowedOps CapsMiniObjectFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint CapsMiniObjectFieldInfo = (~) (Ptr Gst.MiniObject.MiniObject)
type AttrTransferTypeConstraint CapsMiniObjectFieldInfo = (~)(Ptr Gst.MiniObject.MiniObject)
type AttrTransferType CapsMiniObjectFieldInfo = (Ptr Gst.MiniObject.MiniObject)
type AttrGetType CapsMiniObjectFieldInfo = Gst.MiniObject.MiniObject
type AttrLabel CapsMiniObjectFieldInfo = "mini_object"
type AttrOrigin CapsMiniObjectFieldInfo = Caps
attrGet = getCapsMiniObject
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.miniObject"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#g:attr:miniObject"
})
caps_miniObject :: AttrLabelProxy "miniObject"
caps_miniObject = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Caps
type instance O.AttributeList Caps = CapsAttributeList
type CapsAttributeList = ('[ '("miniObject", CapsMiniObjectFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_caps_new_any" gst_caps_new_any ::
IO (Ptr Caps)
capsNewAny ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Caps
capsNewAny :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Caps
capsNewAny = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
result <- IO (Ptr Caps)
gst_caps_new_any
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsNewAny" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_caps_new_empty" gst_caps_new_empty ::
IO (Ptr Caps)
capsNewEmpty ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Caps
capsNewEmpty :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Caps
capsNewEmpty = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
result <- IO (Ptr Caps)
gst_caps_new_empty
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsNewEmpty" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_caps_new_empty_simple" gst_caps_new_empty_simple ::
CString ->
IO (Ptr Caps)
capsNewEmptySimple ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Caps
capsNewEmptySimple :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Caps
capsNewEmptySimple Text
mediaType = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
CString
mediaType' <- Text -> IO CString
textToCString Text
mediaType
Ptr Caps
result <- CString -> IO (Ptr Caps)
gst_caps_new_empty_simple CString
mediaType'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsNewEmptySimple" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
mediaType'
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_caps_append" gst_caps_append ::
Ptr Caps ->
Ptr Caps ->
IO ()
capsAppend ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m ()
capsAppend :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m ()
capsAppend Caps
caps1 Caps
caps2 = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps2
Ptr Caps -> Ptr Caps -> IO ()
gst_caps_append Ptr Caps
caps1' Ptr Caps
caps2'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsAppendMethodInfo
instance (signature ~ (Caps -> m ()), MonadIO m) => O.OverloadedMethod CapsAppendMethodInfo Caps signature where
overloadedMethod = capsAppend
instance O.OverloadedMethodInfo CapsAppendMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsAppend",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsAppend"
})
#endif
foreign import ccall "gst_caps_append_structure" gst_caps_append_structure ::
Ptr Caps ->
Ptr Gst.Structure.Structure ->
IO ()
capsAppendStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Structure.Structure
-> m ()
capsAppendStructure :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Structure -> m ()
capsAppendStructure Caps
caps Structure
structure = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
structure
Ptr Caps -> Ptr Structure -> IO ()
gst_caps_append_structure Ptr Caps
caps' Ptr Structure
structure'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsAppendStructureMethodInfo
instance (signature ~ (Gst.Structure.Structure -> m ()), MonadIO m) => O.OverloadedMethod CapsAppendStructureMethodInfo Caps signature where
overloadedMethod = capsAppendStructure
instance O.OverloadedMethodInfo CapsAppendStructureMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsAppendStructure",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsAppendStructure"
})
#endif
foreign import ccall "gst_caps_append_structure_full" gst_caps_append_structure_full ::
Ptr Caps ->
Ptr Gst.Structure.Structure ->
Ptr Gst.CapsFeatures.CapsFeatures ->
IO ()
capsAppendStructureFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Structure.Structure
-> Maybe (Gst.CapsFeatures.CapsFeatures)
-> m ()
capsAppendStructureFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Structure -> Maybe CapsFeatures -> m ()
capsAppendStructureFull Caps
caps Structure
structure Maybe CapsFeatures
features = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
structure
Ptr CapsFeatures
maybeFeatures <- case Maybe CapsFeatures
features of
Maybe CapsFeatures
Nothing -> Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
forall a. Ptr a
nullPtr
Just CapsFeatures
jFeatures -> do
Ptr CapsFeatures
jFeatures' <- CapsFeatures -> IO (Ptr CapsFeatures)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed CapsFeatures
jFeatures
Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
jFeatures'
Ptr Caps -> Ptr Structure -> Ptr CapsFeatures -> IO ()
gst_caps_append_structure_full Ptr Caps
caps' Ptr Structure
structure' Ptr CapsFeatures
maybeFeatures
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Maybe CapsFeatures -> (CapsFeatures -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe CapsFeatures
features CapsFeatures -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsAppendStructureFullMethodInfo
instance (signature ~ (Gst.Structure.Structure -> Maybe (Gst.CapsFeatures.CapsFeatures) -> m ()), MonadIO m) => O.OverloadedMethod CapsAppendStructureFullMethodInfo Caps signature where
overloadedMethod = capsAppendStructureFull
instance O.OverloadedMethodInfo CapsAppendStructureFullMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsAppendStructureFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsAppendStructureFull"
})
#endif
foreign import ccall "gst_caps_can_intersect" gst_caps_can_intersect ::
Ptr Caps ->
Ptr Caps ->
IO CInt
capsCanIntersect ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Bool
capsCanIntersect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Bool
capsCanIntersect Caps
caps1 Caps
caps2 = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
CInt
result <- Ptr Caps -> Ptr Caps -> IO CInt
gst_caps_can_intersect Ptr Caps
caps1' Ptr Caps
caps2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsCanIntersectMethodInfo
instance (signature ~ (Caps -> m Bool), MonadIO m) => O.OverloadedMethod CapsCanIntersectMethodInfo Caps signature where
overloadedMethod = capsCanIntersect
instance O.OverloadedMethodInfo CapsCanIntersectMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsCanIntersect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsCanIntersect"
})
#endif
foreign import ccall "gst_caps_copy" gst_caps_copy ::
Ptr Caps ->
IO (Ptr Caps)
capsCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Caps
capsCopy :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Caps
capsCopy Caps
caps = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Caps
result <- Ptr Caps -> IO (Ptr Caps)
gst_caps_copy Ptr Caps
caps'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsCopy" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsCopyMethodInfo
instance (signature ~ (m Caps), MonadIO m) => O.OverloadedMethod CapsCopyMethodInfo Caps signature where
overloadedMethod = capsCopy
instance O.OverloadedMethodInfo CapsCopyMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsCopy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsCopy"
})
#endif
foreign import ccall "gst_caps_copy_nth" gst_caps_copy_nth ::
Ptr Caps ->
Word32 ->
IO (Ptr Caps)
capsCopyNth ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Word32
-> m Caps
capsCopyNth :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Word32 -> m Caps
capsCopyNth Caps
caps Word32
nth = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Caps
result <- Ptr Caps -> Word32 -> IO (Ptr Caps)
gst_caps_copy_nth Ptr Caps
caps' Word32
nth
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsCopyNth" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsCopyNthMethodInfo
instance (signature ~ (Word32 -> m Caps), MonadIO m) => O.OverloadedMethod CapsCopyNthMethodInfo Caps signature where
overloadedMethod = capsCopyNth
instance O.OverloadedMethodInfo CapsCopyNthMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsCopyNth",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsCopyNth"
})
#endif
foreign import ccall "gst_caps_filter_and_map_in_place" gst_caps_filter_and_map_in_place ::
Ptr Caps ->
FunPtr Gst.Callbacks.C_CapsFilterMapFunc ->
Ptr () ->
IO ()
capsFilterAndMapInPlace ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Callbacks.CapsFilterMapFunc
-> m ()
capsFilterAndMapInPlace :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> CapsFilterMapFunc -> m ()
capsFilterAndMapInPlace Caps
caps CapsFilterMapFunc
func = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
FunPtr C_CapsFilterMapFunc
func' <- C_CapsFilterMapFunc -> IO (FunPtr C_CapsFilterMapFunc)
Gst.Callbacks.mk_CapsFilterMapFunc (Maybe (Ptr (FunPtr C_CapsFilterMapFunc))
-> CapsFilterMapFunc_WithClosures -> C_CapsFilterMapFunc
Gst.Callbacks.wrap_CapsFilterMapFunc Maybe (Ptr (FunPtr C_CapsFilterMapFunc))
forall a. Maybe a
Nothing (CapsFilterMapFunc -> CapsFilterMapFunc_WithClosures
Gst.Callbacks.drop_closures_CapsFilterMapFunc CapsFilterMapFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Caps -> FunPtr C_CapsFilterMapFunc -> Ptr () -> IO ()
gst_caps_filter_and_map_in_place Ptr Caps
caps' FunPtr C_CapsFilterMapFunc
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_CapsFilterMapFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CapsFilterMapFunc
func'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsFilterAndMapInPlaceMethodInfo
instance (signature ~ (Gst.Callbacks.CapsFilterMapFunc -> m ()), MonadIO m) => O.OverloadedMethod CapsFilterAndMapInPlaceMethodInfo Caps signature where
overloadedMethod = capsFilterAndMapInPlace
instance O.OverloadedMethodInfo CapsFilterAndMapInPlaceMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsFilterAndMapInPlace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsFilterAndMapInPlace"
})
#endif
foreign import ccall "gst_caps_fixate" gst_caps_fixate ::
Ptr Caps ->
IO (Ptr Caps)
capsFixate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Caps
capsFixate :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Caps
capsFixate Caps
caps = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr Caps
result <- Ptr Caps -> IO (Ptr Caps)
gst_caps_fixate Ptr Caps
caps'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsFixate" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsFixateMethodInfo
instance (signature ~ (m Caps), MonadIO m) => O.OverloadedMethod CapsFixateMethodInfo Caps signature where
overloadedMethod = capsFixate
instance O.OverloadedMethodInfo CapsFixateMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsFixate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsFixate"
})
#endif
foreign import ccall "gst_caps_foreach" gst_caps_foreach ::
Ptr Caps ->
FunPtr Gst.Callbacks.C_CapsForeachFunc ->
Ptr () ->
IO CInt
capsForeach ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Callbacks.CapsForeachFunc
-> m Bool
capsForeach :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> CapsFilterMapFunc -> m Bool
capsForeach Caps
caps CapsFilterMapFunc
func = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
FunPtr C_CapsFilterMapFunc
func' <- C_CapsFilterMapFunc -> IO (FunPtr C_CapsFilterMapFunc)
Gst.Callbacks.mk_CapsForeachFunc (Maybe (Ptr (FunPtr C_CapsFilterMapFunc))
-> CapsFilterMapFunc_WithClosures -> C_CapsFilterMapFunc
Gst.Callbacks.wrap_CapsForeachFunc Maybe (Ptr (FunPtr C_CapsFilterMapFunc))
forall a. Maybe a
Nothing (CapsFilterMapFunc -> CapsFilterMapFunc_WithClosures
Gst.Callbacks.drop_closures_CapsForeachFunc CapsFilterMapFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Caps -> FunPtr C_CapsFilterMapFunc -> Ptr () -> IO CInt
gst_caps_foreach Ptr Caps
caps' FunPtr C_CapsFilterMapFunc
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_CapsFilterMapFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CapsFilterMapFunc
func'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsForeachMethodInfo
instance (signature ~ (Gst.Callbacks.CapsForeachFunc -> m Bool), MonadIO m) => O.OverloadedMethod CapsForeachMethodInfo Caps signature where
overloadedMethod = capsForeach
instance O.OverloadedMethodInfo CapsForeachMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsForeach",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsForeach"
})
#endif
foreign import ccall "gst_caps_get_features" gst_caps_get_features ::
Ptr Caps ->
Word32 ->
IO (Ptr Gst.CapsFeatures.CapsFeatures)
capsGetFeatures ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Word32
-> m (Maybe Gst.CapsFeatures.CapsFeatures)
capsGetFeatures :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Word32 -> m (Maybe CapsFeatures)
capsGetFeatures Caps
caps Word32
index = IO (Maybe CapsFeatures) -> m (Maybe CapsFeatures)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe CapsFeatures) -> m (Maybe CapsFeatures))
-> IO (Maybe CapsFeatures) -> m (Maybe CapsFeatures)
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr CapsFeatures
result <- Ptr Caps -> Word32 -> IO (Ptr CapsFeatures)
gst_caps_get_features Ptr Caps
caps' Word32
index
Maybe CapsFeatures
maybeResult <- Ptr CapsFeatures
-> (Ptr CapsFeatures -> IO CapsFeatures) -> IO (Maybe CapsFeatures)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CapsFeatures
result ((Ptr CapsFeatures -> IO CapsFeatures) -> IO (Maybe CapsFeatures))
-> (Ptr CapsFeatures -> IO CapsFeatures) -> IO (Maybe CapsFeatures)
forall a b. (a -> b) -> a -> b
$ \Ptr CapsFeatures
result' -> do
CapsFeatures
result'' <- ((ManagedPtr CapsFeatures -> CapsFeatures)
-> Ptr CapsFeatures -> IO CapsFeatures
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr CapsFeatures -> CapsFeatures
Gst.CapsFeatures.CapsFeatures) Ptr CapsFeatures
result'
CapsFeatures -> IO CapsFeatures
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CapsFeatures
result''
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Maybe CapsFeatures -> IO (Maybe CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe CapsFeatures
maybeResult
#if defined(ENABLE_OVERLOADING)
data CapsGetFeaturesMethodInfo
instance (signature ~ (Word32 -> m (Maybe Gst.CapsFeatures.CapsFeatures)), MonadIO m) => O.OverloadedMethod CapsGetFeaturesMethodInfo Caps signature where
overloadedMethod = capsGetFeatures
instance O.OverloadedMethodInfo CapsGetFeaturesMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsGetFeatures",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsGetFeatures"
})
#endif
foreign import ccall "gst_caps_get_size" gst_caps_get_size ::
Ptr Caps ->
IO Word32
capsGetSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Word32
capsGetSize :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Word32
capsGetSize Caps
caps = IO Word32 -> m Word32
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Word32
result <- Ptr Caps -> IO Word32
gst_caps_get_size Ptr Caps
caps'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data CapsGetSizeMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.OverloadedMethod CapsGetSizeMethodInfo Caps signature where
overloadedMethod = capsGetSize
instance O.OverloadedMethodInfo CapsGetSizeMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsGetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsGetSize"
})
#endif
foreign import ccall "gst_caps_get_structure" gst_caps_get_structure ::
Ptr Caps ->
Word32 ->
IO (Ptr Gst.Structure.Structure)
capsGetStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Word32
-> m Gst.Structure.Structure
capsGetStructure :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Word32 -> m Structure
capsGetStructure Caps
caps Word32
index = IO Structure -> m Structure
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Structure
result <- Ptr Caps -> Word32 -> IO (Ptr Structure)
gst_caps_get_structure Ptr Caps
caps' Word32
index
Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsGetStructure" Ptr Structure
result
Structure
result' <- ((ManagedPtr Structure -> Structure)
-> Ptr Structure -> IO Structure
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Structure -> Structure
Gst.Structure.Structure) Ptr Structure
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO Structure
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result'
#if defined(ENABLE_OVERLOADING)
data CapsGetStructureMethodInfo
instance (signature ~ (Word32 -> m Gst.Structure.Structure), MonadIO m) => O.OverloadedMethod CapsGetStructureMethodInfo Caps signature where
overloadedMethod = capsGetStructure
instance O.OverloadedMethodInfo CapsGetStructureMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsGetStructure",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsGetStructure"
})
#endif
foreign import ccall "gst_caps_intersect" gst_caps_intersect ::
Ptr Caps ->
Ptr Caps ->
IO (Ptr Caps)
capsIntersect ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Caps
capsIntersect :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Caps
capsIntersect Caps
caps1 Caps
caps2 = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
Ptr Caps
result <- Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_caps_intersect Ptr Caps
caps1' Ptr Caps
caps2'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsIntersect" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsIntersectMethodInfo
instance (signature ~ (Caps -> m Caps), MonadIO m) => O.OverloadedMethod CapsIntersectMethodInfo Caps signature where
overloadedMethod = capsIntersect
instance O.OverloadedMethodInfo CapsIntersectMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIntersect",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIntersect"
})
#endif
foreign import ccall "gst_caps_intersect_full" gst_caps_intersect_full ::
Ptr Caps ->
Ptr Caps ->
CUInt ->
IO (Ptr Caps)
capsIntersectFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> Gst.Enums.CapsIntersectMode
-> m Caps
capsIntersectFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> CapsIntersectMode -> m Caps
capsIntersectFull Caps
caps1 Caps
caps2 CapsIntersectMode
mode = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (CapsIntersectMode -> Int) -> CapsIntersectMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CapsIntersectMode -> Int
forall a. Enum a => a -> Int
fromEnum) CapsIntersectMode
mode
Ptr Caps
result <- Ptr Caps -> Ptr Caps -> CUInt -> IO (Ptr Caps)
gst_caps_intersect_full Ptr Caps
caps1' Ptr Caps
caps2' CUInt
mode'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsIntersectFull" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsIntersectFullMethodInfo
instance (signature ~ (Caps -> Gst.Enums.CapsIntersectMode -> m Caps), MonadIO m) => O.OverloadedMethod CapsIntersectFullMethodInfo Caps signature where
overloadedMethod = capsIntersectFull
instance O.OverloadedMethodInfo CapsIntersectFullMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIntersectFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIntersectFull"
})
#endif
foreign import ccall "gst_caps_is_always_compatible" gst_caps_is_always_compatible ::
Ptr Caps ->
Ptr Caps ->
IO CInt
capsIsAlwaysCompatible ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Bool
capsIsAlwaysCompatible :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Bool
capsIsAlwaysCompatible Caps
caps1 Caps
caps2 = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
CInt
result <- Ptr Caps -> Ptr Caps -> IO CInt
gst_caps_is_always_compatible Ptr Caps
caps1' Ptr Caps
caps2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsAlwaysCompatibleMethodInfo
instance (signature ~ (Caps -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsAlwaysCompatibleMethodInfo Caps signature where
overloadedMethod = capsIsAlwaysCompatible
instance O.OverloadedMethodInfo CapsIsAlwaysCompatibleMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsAlwaysCompatible",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsAlwaysCompatible"
})
#endif
foreign import ccall "gst_caps_is_any" gst_caps_is_any ::
Ptr Caps ->
IO CInt
capsIsAny ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Bool
capsIsAny :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Bool
capsIsAny Caps
caps = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CInt
result <- Ptr Caps -> IO CInt
gst_caps_is_any Ptr Caps
caps'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsAnyMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod CapsIsAnyMethodInfo Caps signature where
overloadedMethod = capsIsAny
instance O.OverloadedMethodInfo CapsIsAnyMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsAny",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsAny"
})
#endif
foreign import ccall "gst_caps_is_empty" gst_caps_is_empty ::
Ptr Caps ->
IO CInt
capsIsEmpty ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Bool
capsIsEmpty :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Bool
capsIsEmpty Caps
caps = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CInt
result <- Ptr Caps -> IO CInt
gst_caps_is_empty Ptr Caps
caps'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsEmptyMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod CapsIsEmptyMethodInfo Caps signature where
overloadedMethod = capsIsEmpty
instance O.OverloadedMethodInfo CapsIsEmptyMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsEmpty",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsEmpty"
})
#endif
foreign import ccall "gst_caps_is_equal" gst_caps_is_equal ::
Ptr Caps ->
Ptr Caps ->
IO CInt
capsIsEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Bool
capsIsEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Bool
capsIsEqual Caps
caps1 Caps
caps2 = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
CInt
result <- Ptr Caps -> Ptr Caps -> IO CInt
gst_caps_is_equal Ptr Caps
caps1' Ptr Caps
caps2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsEqualMethodInfo
instance (signature ~ (Caps -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsEqualMethodInfo Caps signature where
overloadedMethod = capsIsEqual
instance O.OverloadedMethodInfo CapsIsEqualMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsEqual"
})
#endif
foreign import ccall "gst_caps_is_equal_fixed" gst_caps_is_equal_fixed ::
Ptr Caps ->
Ptr Caps ->
IO CInt
capsIsEqualFixed ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Bool
capsIsEqualFixed :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Bool
capsIsEqualFixed Caps
caps1 Caps
caps2 = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
CInt
result <- Ptr Caps -> Ptr Caps -> IO CInt
gst_caps_is_equal_fixed Ptr Caps
caps1' Ptr Caps
caps2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsEqualFixedMethodInfo
instance (signature ~ (Caps -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsEqualFixedMethodInfo Caps signature where
overloadedMethod = capsIsEqualFixed
instance O.OverloadedMethodInfo CapsIsEqualFixedMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsEqualFixed",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsEqualFixed"
})
#endif
foreign import ccall "gst_caps_is_fixed" gst_caps_is_fixed ::
Ptr Caps ->
IO CInt
capsIsFixed ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Bool
capsIsFixed :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Bool
capsIsFixed Caps
caps = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CInt
result <- Ptr Caps -> IO CInt
gst_caps_is_fixed Ptr Caps
caps'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsFixedMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod CapsIsFixedMethodInfo Caps signature where
overloadedMethod = capsIsFixed
instance O.OverloadedMethodInfo CapsIsFixedMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsFixed",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsFixed"
})
#endif
foreign import ccall "gst_caps_is_strictly_equal" gst_caps_is_strictly_equal ::
Ptr Caps ->
Ptr Caps ->
IO CInt
capsIsStrictlyEqual ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Bool
capsIsStrictlyEqual :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Bool
capsIsStrictlyEqual Caps
caps1 Caps
caps2 = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps2
CInt
result <- Ptr Caps -> Ptr Caps -> IO CInt
gst_caps_is_strictly_equal Ptr Caps
caps1' Ptr Caps
caps2'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsStrictlyEqualMethodInfo
instance (signature ~ (Caps -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsStrictlyEqualMethodInfo Caps signature where
overloadedMethod = capsIsStrictlyEqual
instance O.OverloadedMethodInfo CapsIsStrictlyEqualMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsStrictlyEqual",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsStrictlyEqual"
})
#endif
foreign import ccall "gst_caps_is_subset" gst_caps_is_subset ::
Ptr Caps ->
Ptr Caps ->
IO CInt
capsIsSubset ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Bool
capsIsSubset :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Bool
capsIsSubset Caps
subset Caps
superset = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
subset' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
subset
Ptr Caps
superset' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
superset
CInt
result <- Ptr Caps -> Ptr Caps -> IO CInt
gst_caps_is_subset Ptr Caps
subset' Ptr Caps
superset'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
subset
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
superset
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsSubsetMethodInfo
instance (signature ~ (Caps -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsSubsetMethodInfo Caps signature where
overloadedMethod = capsIsSubset
instance O.OverloadedMethodInfo CapsIsSubsetMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsSubset",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsSubset"
})
#endif
foreign import ccall "gst_caps_is_subset_structure" gst_caps_is_subset_structure ::
Ptr Caps ->
Ptr Gst.Structure.Structure ->
IO CInt
capsIsSubsetStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Structure.Structure
-> m Bool
capsIsSubsetStructure :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Structure -> m Bool
capsIsSubsetStructure Caps
caps Structure
structure = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
CInt
result <- Ptr Caps -> Ptr Structure -> IO CInt
gst_caps_is_subset_structure Ptr Caps
caps' Ptr Structure
structure'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsSubsetStructureMethodInfo
instance (signature ~ (Gst.Structure.Structure -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsSubsetStructureMethodInfo Caps signature where
overloadedMethod = capsIsSubsetStructure
instance O.OverloadedMethodInfo CapsIsSubsetStructureMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsSubsetStructure",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsSubsetStructure"
})
#endif
foreign import ccall "gst_caps_is_subset_structure_full" gst_caps_is_subset_structure_full ::
Ptr Caps ->
Ptr Gst.Structure.Structure ->
Ptr Gst.CapsFeatures.CapsFeatures ->
IO CInt
capsIsSubsetStructureFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Structure.Structure
-> Maybe (Gst.CapsFeatures.CapsFeatures)
-> m Bool
capsIsSubsetStructureFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Structure -> Maybe CapsFeatures -> m Bool
capsIsSubsetStructureFull Caps
caps Structure
structure Maybe CapsFeatures
features = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
structure
Ptr CapsFeatures
maybeFeatures <- case Maybe CapsFeatures
features of
Maybe CapsFeatures
Nothing -> Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
forall a. Ptr a
nullPtr
Just CapsFeatures
jFeatures -> do
Ptr CapsFeatures
jFeatures' <- CapsFeatures -> IO (Ptr CapsFeatures)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr CapsFeatures
jFeatures
Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
jFeatures'
CInt
result <- Ptr Caps -> Ptr Structure -> Ptr CapsFeatures -> IO CInt
gst_caps_is_subset_structure_full Ptr Caps
caps' Ptr Structure
structure' Ptr CapsFeatures
maybeFeatures
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Maybe CapsFeatures -> (CapsFeatures -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe CapsFeatures
features CapsFeatures -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsIsSubsetStructureFullMethodInfo
instance (signature ~ (Gst.Structure.Structure -> Maybe (Gst.CapsFeatures.CapsFeatures) -> m Bool), MonadIO m) => O.OverloadedMethod CapsIsSubsetStructureFullMethodInfo Caps signature where
overloadedMethod = capsIsSubsetStructureFull
instance O.OverloadedMethodInfo CapsIsSubsetStructureFullMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsIsSubsetStructureFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsIsSubsetStructureFull"
})
#endif
foreign import ccall "gst_caps_map_in_place" gst_caps_map_in_place ::
Ptr Caps ->
FunPtr Gst.Callbacks.C_CapsMapFunc ->
Ptr () ->
IO CInt
capsMapInPlace ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Callbacks.CapsMapFunc
-> m Bool
capsMapInPlace :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> CapsFilterMapFunc -> m Bool
capsMapInPlace Caps
caps CapsFilterMapFunc
func = IO Bool -> m Bool
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
FunPtr C_CapsFilterMapFunc
func' <- C_CapsFilterMapFunc -> IO (FunPtr C_CapsFilterMapFunc)
Gst.Callbacks.mk_CapsMapFunc (Maybe (Ptr (FunPtr C_CapsFilterMapFunc))
-> CapsFilterMapFunc_WithClosures -> C_CapsFilterMapFunc
Gst.Callbacks.wrap_CapsMapFunc Maybe (Ptr (FunPtr C_CapsFilterMapFunc))
forall a. Maybe a
Nothing (CapsFilterMapFunc -> CapsFilterMapFunc_WithClosures
Gst.Callbacks.drop_closures_CapsMapFunc CapsFilterMapFunc
func))
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
CInt
result <- Ptr Caps -> FunPtr C_CapsFilterMapFunc -> Ptr () -> IO CInt
gst_caps_map_in_place Ptr Caps
caps' FunPtr C_CapsFilterMapFunc
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_CapsFilterMapFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_CapsFilterMapFunc
func'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data CapsMapInPlaceMethodInfo
instance (signature ~ (Gst.Callbacks.CapsMapFunc -> m Bool), MonadIO m) => O.OverloadedMethod CapsMapInPlaceMethodInfo Caps signature where
overloadedMethod = capsMapInPlace
instance O.OverloadedMethodInfo CapsMapInPlaceMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsMapInPlace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsMapInPlace"
})
#endif
foreign import ccall "gst_caps_merge" gst_caps_merge ::
Ptr Caps ->
Ptr Caps ->
IO (Ptr Caps)
capsMerge ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Caps
capsMerge :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Caps
capsMerge Caps
caps1 Caps
caps2 = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps1' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps1
Ptr Caps
caps2' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps2
Ptr Caps
result <- Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_caps_merge Ptr Caps
caps1' Ptr Caps
caps2'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsMerge" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps1
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps2
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsMergeMethodInfo
instance (signature ~ (Caps -> m Caps), MonadIO m) => O.OverloadedMethod CapsMergeMethodInfo Caps signature where
overloadedMethod = capsMerge
instance O.OverloadedMethodInfo CapsMergeMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsMerge",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsMerge"
})
#endif
foreign import ccall "gst_caps_merge_structure" gst_caps_merge_structure ::
Ptr Caps ->
Ptr Gst.Structure.Structure ->
IO (Ptr Caps)
capsMergeStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Structure.Structure
-> m Caps
capsMergeStructure :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Structure -> m Caps
capsMergeStructure Caps
caps Structure
structure = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
structure
Ptr Caps
result <- Ptr Caps -> Ptr Structure -> IO (Ptr Caps)
gst_caps_merge_structure Ptr Caps
caps' Ptr Structure
structure'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsMergeStructure" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsMergeStructureMethodInfo
instance (signature ~ (Gst.Structure.Structure -> m Caps), MonadIO m) => O.OverloadedMethod CapsMergeStructureMethodInfo Caps signature where
overloadedMethod = capsMergeStructure
instance O.OverloadedMethodInfo CapsMergeStructureMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsMergeStructure",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsMergeStructure"
})
#endif
foreign import ccall "gst_caps_merge_structure_full" gst_caps_merge_structure_full ::
Ptr Caps ->
Ptr Gst.Structure.Structure ->
Ptr Gst.CapsFeatures.CapsFeatures ->
IO (Ptr Caps)
capsMergeStructureFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Gst.Structure.Structure
-> Maybe (Gst.CapsFeatures.CapsFeatures)
-> m Caps
capsMergeStructureFull :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Structure -> Maybe CapsFeatures -> m Caps
capsMergeStructureFull Caps
caps Structure
structure Maybe CapsFeatures
features = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr Structure
structure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
structure
Ptr CapsFeatures
maybeFeatures <- case Maybe CapsFeatures
features of
Maybe CapsFeatures
Nothing -> Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
forall a. Ptr a
nullPtr
Just CapsFeatures
jFeatures -> do
Ptr CapsFeatures
jFeatures' <- CapsFeatures -> IO (Ptr CapsFeatures)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed CapsFeatures
jFeatures
Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
jFeatures'
Ptr Caps
result <- Ptr Caps -> Ptr Structure -> Ptr CapsFeatures -> IO (Ptr Caps)
gst_caps_merge_structure_full Ptr Caps
caps' Ptr Structure
structure' Ptr CapsFeatures
maybeFeatures
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsMergeStructureFull" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Structure
structure
Maybe CapsFeatures -> (CapsFeatures -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe CapsFeatures
features CapsFeatures -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsMergeStructureFullMethodInfo
instance (signature ~ (Gst.Structure.Structure -> Maybe (Gst.CapsFeatures.CapsFeatures) -> m Caps), MonadIO m) => O.OverloadedMethod CapsMergeStructureFullMethodInfo Caps signature where
overloadedMethod = capsMergeStructureFull
instance O.OverloadedMethodInfo CapsMergeStructureFullMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsMergeStructureFull",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsMergeStructureFull"
})
#endif
foreign import ccall "gst_caps_normalize" gst_caps_normalize ::
Ptr Caps ->
IO (Ptr Caps)
capsNormalize ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Caps
capsNormalize :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Caps
capsNormalize Caps
caps = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr Caps
result <- Ptr Caps -> IO (Ptr Caps)
gst_caps_normalize Ptr Caps
caps'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsNormalize" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsNormalizeMethodInfo
instance (signature ~ (m Caps), MonadIO m) => O.OverloadedMethod CapsNormalizeMethodInfo Caps signature where
overloadedMethod = capsNormalize
instance O.OverloadedMethodInfo CapsNormalizeMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsNormalize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsNormalize"
})
#endif
foreign import ccall "gst_caps_remove_structure" gst_caps_remove_structure ::
Ptr Caps ->
Word32 ->
IO ()
capsRemoveStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Word32
-> m ()
capsRemoveStructure :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Word32 -> m ()
capsRemoveStructure Caps
caps Word32
idx = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Caps -> Word32 -> IO ()
gst_caps_remove_structure Ptr Caps
caps' Word32
idx
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsRemoveStructureMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.OverloadedMethod CapsRemoveStructureMethodInfo Caps signature where
overloadedMethod = capsRemoveStructure
instance O.OverloadedMethodInfo CapsRemoveStructureMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsRemoveStructure",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsRemoveStructure"
})
#endif
foreign import ccall "gst_caps_serialize" gst_caps_serialize ::
Ptr Caps ->
CUInt ->
IO CString
capsSerialize ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> [Gst.Flags.SerializeFlags]
-> m T.Text
capsSerialize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> [SerializeFlags] -> m Text
capsSerialize Caps
caps [SerializeFlags]
flags = IO Text -> m Text
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
let flags' :: CUInt
flags' = [SerializeFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SerializeFlags]
flags
CString
result <- Ptr Caps -> CUInt -> IO CString
gst_caps_serialize Ptr Caps
caps' CUInt
flags'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsSerialize" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data CapsSerializeMethodInfo
instance (signature ~ ([Gst.Flags.SerializeFlags] -> m T.Text), MonadIO m) => O.OverloadedMethod CapsSerializeMethodInfo Caps signature where
overloadedMethod = capsSerialize
instance O.OverloadedMethodInfo CapsSerializeMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsSerialize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsSerialize"
})
#endif
foreign import ccall "gst_caps_set_features" gst_caps_set_features ::
Ptr Caps ->
Word32 ->
Ptr Gst.CapsFeatures.CapsFeatures ->
IO ()
capsSetFeatures ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Word32
-> Maybe (Gst.CapsFeatures.CapsFeatures)
-> m ()
capsSetFeatures :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Word32 -> Maybe CapsFeatures -> m ()
capsSetFeatures Caps
caps Word32
index Maybe CapsFeatures
features = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr CapsFeatures
maybeFeatures <- case Maybe CapsFeatures
features of
Maybe CapsFeatures
Nothing -> Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
forall a. Ptr a
nullPtr
Just CapsFeatures
jFeatures -> do
Ptr CapsFeatures
jFeatures' <- CapsFeatures -> IO (Ptr CapsFeatures)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed CapsFeatures
jFeatures
Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
jFeatures'
Ptr Caps -> Word32 -> Ptr CapsFeatures -> IO ()
gst_caps_set_features Ptr Caps
caps' Word32
index Ptr CapsFeatures
maybeFeatures
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Maybe CapsFeatures -> (CapsFeatures -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe CapsFeatures
features CapsFeatures -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsSetFeaturesMethodInfo
instance (signature ~ (Word32 -> Maybe (Gst.CapsFeatures.CapsFeatures) -> m ()), MonadIO m) => O.OverloadedMethod CapsSetFeaturesMethodInfo Caps signature where
overloadedMethod = capsSetFeatures
instance O.OverloadedMethodInfo CapsSetFeaturesMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsSetFeatures",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsSetFeatures"
})
#endif
foreign import ccall "gst_caps_set_features_simple" gst_caps_set_features_simple ::
Ptr Caps ->
Ptr Gst.CapsFeatures.CapsFeatures ->
IO ()
capsSetFeaturesSimple ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Maybe (Gst.CapsFeatures.CapsFeatures)
-> m ()
capsSetFeaturesSimple :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Maybe CapsFeatures -> m ()
capsSetFeaturesSimple Caps
caps Maybe CapsFeatures
features = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr CapsFeatures
maybeFeatures <- case Maybe CapsFeatures
features of
Maybe CapsFeatures
Nothing -> Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
forall a. Ptr a
nullPtr
Just CapsFeatures
jFeatures -> do
Ptr CapsFeatures
jFeatures' <- CapsFeatures -> IO (Ptr CapsFeatures)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed CapsFeatures
jFeatures
Ptr CapsFeatures -> IO (Ptr CapsFeatures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CapsFeatures
jFeatures'
Ptr Caps -> Ptr CapsFeatures -> IO ()
gst_caps_set_features_simple Ptr Caps
caps' Ptr CapsFeatures
maybeFeatures
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Maybe CapsFeatures -> (CapsFeatures -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe CapsFeatures
features CapsFeatures -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsSetFeaturesSimpleMethodInfo
instance (signature ~ (Maybe (Gst.CapsFeatures.CapsFeatures) -> m ()), MonadIO m) => O.OverloadedMethod CapsSetFeaturesSimpleMethodInfo Caps signature where
overloadedMethod = capsSetFeaturesSimple
instance O.OverloadedMethodInfo CapsSetFeaturesSimpleMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsSetFeaturesSimple",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsSetFeaturesSimple"
})
#endif
foreign import ccall "gst_caps_set_value" gst_caps_set_value ::
Ptr Caps ->
CString ->
Ptr GValue ->
IO ()
capsSetValue ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> T.Text
-> GValue
-> m ()
capsSetValue :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Text -> GValue -> m ()
capsSetValue Caps
caps Text
field GValue
value = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CString
field' <- Text -> IO CString
textToCString Text
field
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
Ptr Caps -> CString -> Ptr GValue -> IO ()
gst_caps_set_value Ptr Caps
caps' CString
field' Ptr GValue
value'
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
field'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data CapsSetValueMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m) => O.OverloadedMethod CapsSetValueMethodInfo Caps signature where
overloadedMethod = capsSetValue
instance O.OverloadedMethodInfo CapsSetValueMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsSetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsSetValue"
})
#endif
foreign import ccall "gst_caps_simplify" gst_caps_simplify ::
Ptr Caps ->
IO (Ptr Caps)
capsSimplify ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Caps
capsSimplify :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Caps
capsSimplify Caps
caps = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr Caps
result <- Ptr Caps -> IO (Ptr Caps)
gst_caps_simplify Ptr Caps
caps'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsSimplify" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsSimplifyMethodInfo
instance (signature ~ (m Caps), MonadIO m) => O.OverloadedMethod CapsSimplifyMethodInfo Caps signature where
overloadedMethod = capsSimplify
instance O.OverloadedMethodInfo CapsSimplifyMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsSimplify",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsSimplify"
})
#endif
foreign import ccall "gst_caps_steal_structure" gst_caps_steal_structure ::
Ptr Caps ->
Word32 ->
IO (Ptr Gst.Structure.Structure)
capsStealStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Word32
-> m (Maybe Gst.Structure.Structure)
capsStealStructure :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Word32 -> m (Maybe Structure)
capsStealStructure Caps
caps Word32
index = IO (Maybe Structure) -> m (Maybe Structure)
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Structure
result <- Ptr Caps -> Word32 -> IO (Ptr Structure)
gst_caps_steal_structure Ptr Caps
caps' Word32
index
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
Gst.Structure.Structure) Ptr Structure
result'
Structure -> IO Structure
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result''
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Maybe Structure -> IO (Maybe Structure)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Structure
maybeResult
#if defined(ENABLE_OVERLOADING)
data CapsStealStructureMethodInfo
instance (signature ~ (Word32 -> m (Maybe Gst.Structure.Structure)), MonadIO m) => O.OverloadedMethod CapsStealStructureMethodInfo Caps signature where
overloadedMethod = capsStealStructure
instance O.OverloadedMethodInfo CapsStealStructureMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsStealStructure",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsStealStructure"
})
#endif
foreign import ccall "gst_caps_subtract" gst_caps_subtract ::
Ptr Caps ->
Ptr Caps ->
IO (Ptr Caps)
capsSubtract ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> Caps
-> m Caps
capsSubtract :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Caps -> Caps -> m Caps
capsSubtract Caps
minuend Caps
subtrahend = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
minuend' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
minuend
Ptr Caps
subtrahend' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
subtrahend
Ptr Caps
result <- Ptr Caps -> Ptr Caps -> IO (Ptr Caps)
gst_caps_subtract Ptr Caps
minuend' Ptr Caps
subtrahend'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsSubtract" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
minuend
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
subtrahend
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsSubtractMethodInfo
instance (signature ~ (Caps -> m Caps), MonadIO m) => O.OverloadedMethod CapsSubtractMethodInfo Caps signature where
overloadedMethod = capsSubtract
instance O.OverloadedMethodInfo CapsSubtractMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsSubtract",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsSubtract"
})
#endif
foreign import ccall "gst_caps_to_string" gst_caps_to_string ::
Ptr Caps ->
IO CString
capsToString ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m T.Text
capsToString :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Text
capsToString Caps
caps = IO Text -> m Text
forall a. IO a -> m a
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 Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
CString
result <- Ptr Caps -> IO CString
gst_caps_to_string Ptr Caps
caps'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsToString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data CapsToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.OverloadedMethod CapsToStringMethodInfo Caps signature where
overloadedMethod = capsToString
instance O.OverloadedMethodInfo CapsToStringMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsToString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsToString"
})
#endif
foreign import ccall "gst_caps_truncate" gst_caps_truncate ::
Ptr Caps ->
IO (Ptr Caps)
capsTruncate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Caps
-> m Caps
capsTruncate :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Caps -> m Caps
capsTruncate Caps
caps = IO Caps -> m Caps
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
caps
Ptr Caps
result <- Ptr Caps -> IO (Ptr Caps)
gst_caps_truncate Ptr Caps
caps'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"capsTruncate" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data CapsTruncateMethodInfo
instance (signature ~ (m Caps), MonadIO m) => O.OverloadedMethod CapsTruncateMethodInfo Caps signature where
overloadedMethod = capsTruncate
instance O.OverloadedMethodInfo CapsTruncateMethodInfo Caps where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.Caps.capsTruncate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.26/docs/GI-Gst-Structs-Caps.html#v:capsTruncate"
})
#endif
foreign import ccall "gst_caps_from_string" gst_caps_from_string ::
CString ->
IO (Ptr Caps)
capsFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m (Maybe Caps)
capsFromString :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m (Maybe Caps)
capsFromString Text
string = IO (Maybe Caps) -> m (Maybe Caps)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Caps) -> m (Maybe Caps))
-> IO (Maybe Caps) -> m (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ do
CString
string' <- Text -> IO CString
textToCString Text
string
Ptr Caps
result <- CString -> IO (Ptr Caps)
gst_caps_from_string CString
string'
Maybe Caps
maybeResult <- Ptr Caps -> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Caps
result ((Ptr Caps -> IO Caps) -> IO (Maybe Caps))
-> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ \Ptr Caps
result' -> do
Caps
result'' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Caps) Ptr Caps
result'
Caps -> IO Caps
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result''
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
string'
Maybe Caps -> IO (Maybe Caps)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Caps
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveCapsMethod (t :: Symbol) (o :: *) :: * where
ResolveCapsMethod "append" o = CapsAppendMethodInfo
ResolveCapsMethod "appendStructure" o = CapsAppendStructureMethodInfo
ResolveCapsMethod "appendStructureFull" o = CapsAppendStructureFullMethodInfo
ResolveCapsMethod "canIntersect" o = CapsCanIntersectMethodInfo
ResolveCapsMethod "copy" o = CapsCopyMethodInfo
ResolveCapsMethod "copyNth" o = CapsCopyNthMethodInfo
ResolveCapsMethod "filterAndMapInPlace" o = CapsFilterAndMapInPlaceMethodInfo
ResolveCapsMethod "fixate" o = CapsFixateMethodInfo
ResolveCapsMethod "foreach" o = CapsForeachMethodInfo
ResolveCapsMethod "intersect" o = CapsIntersectMethodInfo
ResolveCapsMethod "intersectFull" o = CapsIntersectFullMethodInfo
ResolveCapsMethod "isAlwaysCompatible" o = CapsIsAlwaysCompatibleMethodInfo
ResolveCapsMethod "isAny" o = CapsIsAnyMethodInfo
ResolveCapsMethod "isEmpty" o = CapsIsEmptyMethodInfo
ResolveCapsMethod "isEqual" o = CapsIsEqualMethodInfo
ResolveCapsMethod "isEqualFixed" o = CapsIsEqualFixedMethodInfo
ResolveCapsMethod "isFixed" o = CapsIsFixedMethodInfo
ResolveCapsMethod "isStrictlyEqual" o = CapsIsStrictlyEqualMethodInfo
ResolveCapsMethod "isSubset" o = CapsIsSubsetMethodInfo
ResolveCapsMethod "isSubsetStructure" o = CapsIsSubsetStructureMethodInfo
ResolveCapsMethod "isSubsetStructureFull" o = CapsIsSubsetStructureFullMethodInfo
ResolveCapsMethod "mapInPlace" o = CapsMapInPlaceMethodInfo
ResolveCapsMethod "merge" o = CapsMergeMethodInfo
ResolveCapsMethod "mergeStructure" o = CapsMergeStructureMethodInfo
ResolveCapsMethod "mergeStructureFull" o = CapsMergeStructureFullMethodInfo
ResolveCapsMethod "normalize" o = CapsNormalizeMethodInfo
ResolveCapsMethod "removeStructure" o = CapsRemoveStructureMethodInfo
ResolveCapsMethod "serialize" o = CapsSerializeMethodInfo
ResolveCapsMethod "simplify" o = CapsSimplifyMethodInfo
ResolveCapsMethod "stealStructure" o = CapsStealStructureMethodInfo
ResolveCapsMethod "subtract" o = CapsSubtractMethodInfo
ResolveCapsMethod "toString" o = CapsToStringMethodInfo
ResolveCapsMethod "truncate" o = CapsTruncateMethodInfo
ResolveCapsMethod "getFeatures" o = CapsGetFeaturesMethodInfo
ResolveCapsMethod "getSize" o = CapsGetSizeMethodInfo
ResolveCapsMethod "getStructure" o = CapsGetStructureMethodInfo
ResolveCapsMethod "setFeatures" o = CapsSetFeaturesMethodInfo
ResolveCapsMethod "setFeaturesSimple" o = CapsSetFeaturesSimpleMethodInfo
ResolveCapsMethod "setValue" o = CapsSetValueMethodInfo
ResolveCapsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveCapsMethod t Caps, O.OverloadedMethod info Caps p) => OL.IsLabel t (Caps -> 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 ~ ResolveCapsMethod t Caps, O.OverloadedMethod info Caps p, R.HasField t Caps p) => R.HasField t Caps p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveCapsMethod t Caps, O.OverloadedMethodInfo info Caps) => OL.IsLabel t (O.MethodProxy info Caps) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif