{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Structs.MetaInfo
(
MetaInfo(..) ,
newZeroMetaInfo ,
noMetaInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveMetaInfoMethod ,
#endif
getMetaInfoApi ,
#if defined(ENABLE_OVERLOADING)
metaInfo_api ,
#endif
setMetaInfoApi ,
clearMetaInfoFreeFunc ,
getMetaInfoFreeFunc ,
#if defined(ENABLE_OVERLOADING)
metaInfo_freeFunc ,
#endif
setMetaInfoFreeFunc ,
clearMetaInfoInitFunc ,
getMetaInfoInitFunc ,
#if defined(ENABLE_OVERLOADING)
metaInfo_initFunc ,
#endif
setMetaInfoInitFunc ,
getMetaInfoSize ,
#if defined(ENABLE_OVERLOADING)
metaInfo_size ,
#endif
setMetaInfoSize ,
clearMetaInfoTransformFunc ,
getMetaInfoTransformFunc ,
#if defined(ENABLE_OVERLOADING)
metaInfo_transformFunc ,
#endif
setMetaInfoTransformFunc ,
getMetaInfoType ,
#if defined(ENABLE_OVERLOADING)
metaInfo_type ,
#endif
setMetaInfoType ,
) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified 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 GI.Gst.Callbacks as Gst.Callbacks
newtype MetaInfo = MetaInfo (ManagedPtr MetaInfo)
deriving (MetaInfo -> MetaInfo -> Bool
(MetaInfo -> MetaInfo -> Bool)
-> (MetaInfo -> MetaInfo -> Bool) -> Eq MetaInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetaInfo -> MetaInfo -> Bool
$c/= :: MetaInfo -> MetaInfo -> Bool
== :: MetaInfo -> MetaInfo -> Bool
$c== :: MetaInfo -> MetaInfo -> Bool
Eq)
instance WrappedPtr MetaInfo where
wrappedPtrCalloc :: IO (Ptr MetaInfo)
wrappedPtrCalloc = Int -> IO (Ptr MetaInfo)
forall a. Int -> IO (Ptr a)
callocBytes 48
wrappedPtrCopy :: MetaInfo -> IO MetaInfo
wrappedPtrCopy = \p :: MetaInfo
p -> MetaInfo -> (Ptr MetaInfo -> IO MetaInfo) -> IO MetaInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
p (Int -> Ptr MetaInfo -> IO (Ptr MetaInfo)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 48 (Ptr MetaInfo -> IO (Ptr MetaInfo))
-> (Ptr MetaInfo -> IO MetaInfo) -> Ptr MetaInfo -> IO MetaInfo
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr MetaInfo -> MetaInfo) -> Ptr MetaInfo -> IO MetaInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr MetaInfo -> MetaInfo
MetaInfo)
wrappedPtrFree :: Maybe (GDestroyNotify MetaInfo)
wrappedPtrFree = GDestroyNotify MetaInfo -> Maybe (GDestroyNotify MetaInfo)
forall a. a -> Maybe a
Just GDestroyNotify MetaInfo
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free
newZeroMetaInfo :: MonadIO m => m MetaInfo
newZeroMetaInfo :: m MetaInfo
newZeroMetaInfo = IO MetaInfo -> m MetaInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MetaInfo -> m MetaInfo) -> IO MetaInfo -> m MetaInfo
forall a b. (a -> b) -> a -> b
$ IO (Ptr MetaInfo)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr MetaInfo) -> (Ptr MetaInfo -> IO MetaInfo) -> IO MetaInfo
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr MetaInfo -> MetaInfo) -> Ptr MetaInfo -> IO MetaInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr MetaInfo -> MetaInfo
MetaInfo
instance tag ~ 'AttrSet => Constructible MetaInfo tag where
new :: (ManagedPtr MetaInfo -> MetaInfo)
-> [AttrOp MetaInfo tag] -> m MetaInfo
new _ attrs :: [AttrOp MetaInfo tag]
attrs = do
MetaInfo
o <- m MetaInfo
forall (m :: * -> *). MonadIO m => m MetaInfo
newZeroMetaInfo
MetaInfo -> [AttrOp MetaInfo 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set MetaInfo
o [AttrOp MetaInfo tag]
[AttrOp MetaInfo 'AttrSet]
attrs
MetaInfo -> m MetaInfo
forall (m :: * -> *) a. Monad m => a -> m a
return MetaInfo
o
noMetaInfo :: Maybe MetaInfo
noMetaInfo :: Maybe MetaInfo
noMetaInfo = Maybe MetaInfo
forall a. Maybe a
Nothing
getMetaInfoApi :: MonadIO m => MetaInfo -> m GType
getMetaInfoApi :: MetaInfo -> m GType
getMetaInfoApi s :: MetaInfo
s = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO GType) -> IO GType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO GType) -> IO GType)
-> (Ptr MetaInfo -> IO GType) -> IO GType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO CGType
let val' :: GType
val' = CGType -> GType
GType CGType
val
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'
setMetaInfoApi :: MonadIO m => MetaInfo -> GType -> m ()
setMetaInfoApi :: MetaInfo -> GType -> m ()
setMetaInfoApi s :: MetaInfo
s val :: GType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
let val' :: CGType
val' = GType -> CGType
gtypeToCGType GType
val
Ptr CGType -> CGType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (CGType
val' :: CGType)
#if defined(ENABLE_OVERLOADING)
data MetaInfoApiFieldInfo
instance AttrInfo MetaInfoApiFieldInfo where
type AttrBaseTypeConstraint MetaInfoApiFieldInfo = (~) MetaInfo
type AttrAllowedOps MetaInfoApiFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MetaInfoApiFieldInfo = (~) GType
type AttrTransferTypeConstraint MetaInfoApiFieldInfo = (~)GType
type AttrTransferType MetaInfoApiFieldInfo = GType
type AttrGetType MetaInfoApiFieldInfo = GType
type AttrLabel MetaInfoApiFieldInfo = "api"
type AttrOrigin MetaInfoApiFieldInfo = MetaInfo
attrGet = getMetaInfoApi
attrSet = setMetaInfoApi
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
metaInfo_api :: AttrLabelProxy "api"
metaInfo_api = AttrLabelProxy
#endif
getMetaInfoType :: MonadIO m => MetaInfo -> m GType
getMetaInfoType :: MetaInfo -> m GType
getMetaInfoType s :: MetaInfo
s = IO GType -> m GType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO GType) -> IO GType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO GType) -> IO GType)
-> (Ptr MetaInfo -> IO GType) -> IO GType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO CGType
let val' :: GType
val' = CGType -> GType
GType CGType
val
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'
setMetaInfoType :: MonadIO m => MetaInfo -> GType -> m ()
setMetaInfoType :: MetaInfo -> GType -> m ()
setMetaInfoType s :: MetaInfo
s val :: GType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
let val' :: CGType
val' = GType -> CGType
gtypeToCGType GType
val
Ptr CGType -> CGType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CGType
val' :: CGType)
#if defined(ENABLE_OVERLOADING)
data MetaInfoTypeFieldInfo
instance AttrInfo MetaInfoTypeFieldInfo where
type AttrBaseTypeConstraint MetaInfoTypeFieldInfo = (~) MetaInfo
type AttrAllowedOps MetaInfoTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MetaInfoTypeFieldInfo = (~) GType
type AttrTransferTypeConstraint MetaInfoTypeFieldInfo = (~)GType
type AttrTransferType MetaInfoTypeFieldInfo = GType
type AttrGetType MetaInfoTypeFieldInfo = GType
type AttrLabel MetaInfoTypeFieldInfo = "type"
type AttrOrigin MetaInfoTypeFieldInfo = MetaInfo
attrGet = getMetaInfoType
attrSet = setMetaInfoType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
metaInfo_type :: AttrLabelProxy "type"
metaInfo_type = AttrLabelProxy
#endif
getMetaInfoSize :: MonadIO m => MetaInfo -> m Word64
getMetaInfoSize :: MetaInfo -> m CGType
getMetaInfoSize s :: MetaInfo
s = IO CGType -> m CGType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CGType -> m CGType) -> IO CGType -> m CGType
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO CGType) -> IO CGType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO CGType) -> IO CGType)
-> (Ptr MetaInfo -> IO CGType) -> IO CGType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) :: IO Word64
CGType -> IO CGType
forall (m :: * -> *) a. Monad m => a -> m a
return CGType
val
setMetaInfoSize :: MonadIO m => MetaInfo -> Word64 -> m ()
setMetaInfoSize :: MetaInfo -> CGType -> m ()
setMetaInfoSize s :: MetaInfo
s val :: CGType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr CGType -> CGType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16) (CGType
val :: Word64)
#if defined(ENABLE_OVERLOADING)
data MetaInfoSizeFieldInfo
instance AttrInfo MetaInfoSizeFieldInfo where
type AttrBaseTypeConstraint MetaInfoSizeFieldInfo = (~) MetaInfo
type AttrAllowedOps MetaInfoSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MetaInfoSizeFieldInfo = (~) Word64
type AttrTransferTypeConstraint MetaInfoSizeFieldInfo = (~)Word64
type AttrTransferType MetaInfoSizeFieldInfo = Word64
type AttrGetType MetaInfoSizeFieldInfo = Word64
type AttrLabel MetaInfoSizeFieldInfo = "size"
type AttrOrigin MetaInfoSizeFieldInfo = MetaInfo
attrGet = getMetaInfoSize
attrSet = setMetaInfoSize
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
metaInfo_size :: AttrLabelProxy "size"
metaInfo_size = AttrLabelProxy
#endif
getMetaInfoInitFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaInitFunction)
getMetaInfoInitFunc :: MetaInfo -> m (Maybe MetaInitFunction)
getMetaInfoInitFunc s :: MetaInfo
s = IO (Maybe MetaInitFunction) -> m (Maybe MetaInitFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaInitFunction) -> m (Maybe MetaInitFunction))
-> IO (Maybe MetaInitFunction) -> m (Maybe MetaInitFunction)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaInitFunction))
-> IO (Maybe MetaInitFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaInitFunction))
-> IO (Maybe MetaInitFunction))
-> (Ptr MetaInfo -> IO (Maybe MetaInitFunction))
-> IO (Maybe MetaInitFunction)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
FunPtr C_MetaInitFunction
val <- Ptr (FunPtr C_MetaInitFunction) -> IO (FunPtr C_MetaInitFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaInitFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) :: IO (FunPtr Gst.Callbacks.C_MetaInitFunction)
Maybe MetaInitFunction
result <- FunPtr C_MetaInitFunction
-> (FunPtr C_MetaInitFunction -> IO MetaInitFunction)
-> IO (Maybe MetaInitFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaInitFunction
val ((FunPtr C_MetaInitFunction -> IO MetaInitFunction)
-> IO (Maybe MetaInitFunction))
-> (FunPtr C_MetaInitFunction -> IO MetaInitFunction)
-> IO (Maybe MetaInitFunction)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_MetaInitFunction
val' -> do
let val'' :: MetaInitFunction
val'' = FunPtr C_MetaInitFunction -> MetaInitFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaInitFunction -> Meta -> Ptr () -> Buffer -> m Bool
Gst.Callbacks.dynamic_MetaInitFunction FunPtr C_MetaInitFunction
val'
MetaInitFunction -> IO MetaInitFunction
forall (m :: * -> *) a. Monad m => a -> m a
return MetaInitFunction
val''
Maybe MetaInitFunction -> IO (Maybe MetaInitFunction)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaInitFunction
result
setMetaInfoInitFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaInitFunction -> m ()
setMetaInfoInitFunc :: MetaInfo -> FunPtr C_MetaInitFunction -> m ()
setMetaInfoInitFunc s :: MetaInfo
s val :: FunPtr C_MetaInitFunction
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr (FunPtr C_MetaInitFunction)
-> FunPtr C_MetaInitFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaInitFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (FunPtr C_MetaInitFunction
val :: FunPtr Gst.Callbacks.C_MetaInitFunction)
clearMetaInfoInitFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoInitFunc :: MetaInfo -> m ()
clearMetaInfoInitFunc s :: MetaInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr (FunPtr C_MetaInitFunction)
-> FunPtr C_MetaInitFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaInitFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24) (FunPtr C_MetaInitFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MetaInitFunction)
#if defined(ENABLE_OVERLOADING)
data MetaInfoInitFuncFieldInfo
instance AttrInfo MetaInfoInitFuncFieldInfo where
type AttrBaseTypeConstraint MetaInfoInitFuncFieldInfo = (~) MetaInfo
type AttrAllowedOps MetaInfoInitFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MetaInfoInitFuncFieldInfo = (~) (FunPtr Gst.Callbacks.C_MetaInitFunction)
type AttrTransferTypeConstraint MetaInfoInitFuncFieldInfo = (~)Gst.Callbacks.MetaInitFunction
type AttrTransferType MetaInfoInitFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaInitFunction)
type AttrGetType MetaInfoInitFuncFieldInfo = Maybe Gst.Callbacks.MetaInitFunction
type AttrLabel MetaInfoInitFuncFieldInfo = "init_func"
type AttrOrigin MetaInfoInitFuncFieldInfo = MetaInfo
attrGet = getMetaInfoInitFunc
attrSet = setMetaInfoInitFunc
attrConstruct = undefined
attrClear = clearMetaInfoInitFunc
attrTransfer _ v = do
Gst.Callbacks.mk_MetaInitFunction (Gst.Callbacks.wrap_MetaInitFunction Nothing v)
metaInfo_initFunc :: AttrLabelProxy "initFunc"
metaInfo_initFunc = AttrLabelProxy
#endif
getMetaInfoFreeFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaFreeFunction)
getMetaInfoFreeFunc :: MetaInfo -> m (Maybe MetaFreeFunction)
getMetaInfoFreeFunc s :: MetaInfo
s = IO (Maybe MetaFreeFunction) -> m (Maybe MetaFreeFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaFreeFunction) -> m (Maybe MetaFreeFunction))
-> IO (Maybe MetaFreeFunction) -> m (Maybe MetaFreeFunction)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaFreeFunction))
-> IO (Maybe MetaFreeFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaFreeFunction))
-> IO (Maybe MetaFreeFunction))
-> (Ptr MetaInfo -> IO (Maybe MetaFreeFunction))
-> IO (Maybe MetaFreeFunction)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
FunPtr C_MetaFreeFunction
val <- Ptr (FunPtr C_MetaFreeFunction) -> IO (FunPtr C_MetaFreeFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaFreeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) :: IO (FunPtr Gst.Callbacks.C_MetaFreeFunction)
Maybe MetaFreeFunction
result <- FunPtr C_MetaFreeFunction
-> (FunPtr C_MetaFreeFunction -> IO MetaFreeFunction)
-> IO (Maybe MetaFreeFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaFreeFunction
val ((FunPtr C_MetaFreeFunction -> IO MetaFreeFunction)
-> IO (Maybe MetaFreeFunction))
-> (FunPtr C_MetaFreeFunction -> IO MetaFreeFunction)
-> IO (Maybe MetaFreeFunction)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_MetaFreeFunction
val' -> do
let val'' :: MetaFreeFunction
val'' = FunPtr C_MetaFreeFunction -> MetaFreeFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaFreeFunction -> Meta -> Buffer -> m ()
Gst.Callbacks.dynamic_MetaFreeFunction FunPtr C_MetaFreeFunction
val'
MetaFreeFunction -> IO MetaFreeFunction
forall (m :: * -> *) a. Monad m => a -> m a
return MetaFreeFunction
val''
Maybe MetaFreeFunction -> IO (Maybe MetaFreeFunction)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaFreeFunction
result
setMetaInfoFreeFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaFreeFunction -> m ()
setMetaInfoFreeFunc :: MetaInfo -> FunPtr C_MetaFreeFunction -> m ()
setMetaInfoFreeFunc s :: MetaInfo
s val :: FunPtr C_MetaFreeFunction
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr (FunPtr C_MetaFreeFunction)
-> FunPtr C_MetaFreeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaFreeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (FunPtr C_MetaFreeFunction
val :: FunPtr Gst.Callbacks.C_MetaFreeFunction)
clearMetaInfoFreeFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoFreeFunc :: MetaInfo -> m ()
clearMetaInfoFreeFunc s :: MetaInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr (FunPtr C_MetaFreeFunction)
-> FunPtr C_MetaFreeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaFreeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 32) (FunPtr C_MetaFreeFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MetaFreeFunction)
#if defined(ENABLE_OVERLOADING)
data MetaInfoFreeFuncFieldInfo
instance AttrInfo MetaInfoFreeFuncFieldInfo where
type AttrBaseTypeConstraint MetaInfoFreeFuncFieldInfo = (~) MetaInfo
type AttrAllowedOps MetaInfoFreeFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MetaInfoFreeFuncFieldInfo = (~) (FunPtr Gst.Callbacks.C_MetaFreeFunction)
type AttrTransferTypeConstraint MetaInfoFreeFuncFieldInfo = (~)Gst.Callbacks.MetaFreeFunction
type AttrTransferType MetaInfoFreeFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaFreeFunction)
type AttrGetType MetaInfoFreeFuncFieldInfo = Maybe Gst.Callbacks.MetaFreeFunction
type AttrLabel MetaInfoFreeFuncFieldInfo = "free_func"
type AttrOrigin MetaInfoFreeFuncFieldInfo = MetaInfo
attrGet = getMetaInfoFreeFunc
attrSet = setMetaInfoFreeFunc
attrConstruct = undefined
attrClear = clearMetaInfoFreeFunc
attrTransfer _ v = do
Gst.Callbacks.mk_MetaFreeFunction (Gst.Callbacks.wrap_MetaFreeFunction Nothing v)
metaInfo_freeFunc :: AttrLabelProxy "freeFunc"
metaInfo_freeFunc = AttrLabelProxy
#endif
getMetaInfoTransformFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaTransformFunction)
getMetaInfoTransformFunc :: MetaInfo -> m (Maybe MetaTransformFunction)
getMetaInfoTransformFunc s :: MetaInfo
s = IO (Maybe MetaTransformFunction) -> m (Maybe MetaTransformFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaTransformFunction)
-> m (Maybe MetaTransformFunction))
-> IO (Maybe MetaTransformFunction)
-> m (Maybe MetaTransformFunction)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaTransformFunction))
-> IO (Maybe MetaTransformFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaTransformFunction))
-> IO (Maybe MetaTransformFunction))
-> (Ptr MetaInfo -> IO (Maybe MetaTransformFunction))
-> IO (Maybe MetaTransformFunction)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
FunPtr C_MetaTransformFunction
val <- Ptr (FunPtr C_MetaTransformFunction)
-> IO (FunPtr C_MetaTransformFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaTransformFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) :: IO (FunPtr Gst.Callbacks.C_MetaTransformFunction)
Maybe MetaTransformFunction
result <- FunPtr C_MetaTransformFunction
-> (FunPtr C_MetaTransformFunction -> IO MetaTransformFunction)
-> IO (Maybe MetaTransformFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaTransformFunction
val ((FunPtr C_MetaTransformFunction -> IO MetaTransformFunction)
-> IO (Maybe MetaTransformFunction))
-> (FunPtr C_MetaTransformFunction -> IO MetaTransformFunction)
-> IO (Maybe MetaTransformFunction)
forall a b. (a -> b) -> a -> b
$ \val' :: FunPtr C_MetaTransformFunction
val' -> do
let val'' :: MetaTransformFunction
val'' = FunPtr C_MetaTransformFunction -> MetaTransformFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaTransformFunction
-> Buffer -> Meta -> Buffer -> Word32 -> Ptr () -> m Bool
Gst.Callbacks.dynamic_MetaTransformFunction FunPtr C_MetaTransformFunction
val'
MetaTransformFunction -> IO MetaTransformFunction
forall (m :: * -> *) a. Monad m => a -> m a
return MetaTransformFunction
val''
Maybe MetaTransformFunction -> IO (Maybe MetaTransformFunction)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaTransformFunction
result
setMetaInfoTransformFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaTransformFunction -> m ()
setMetaInfoTransformFunc :: MetaInfo -> FunPtr C_MetaTransformFunction -> m ()
setMetaInfoTransformFunc s :: MetaInfo
s val :: FunPtr C_MetaTransformFunction
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr (FunPtr C_MetaTransformFunction)
-> FunPtr C_MetaTransformFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaTransformFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (FunPtr C_MetaTransformFunction
val :: FunPtr Gst.Callbacks.C_MetaTransformFunction)
clearMetaInfoTransformFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoTransformFunc :: MetaInfo -> m ()
clearMetaInfoTransformFunc s :: MetaInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO ()) -> IO ())
-> (Ptr MetaInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr MetaInfo
ptr -> do
Ptr (FunPtr C_MetaTransformFunction)
-> FunPtr C_MetaTransformFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaTransformFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 40) (FunPtr C_MetaTransformFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MetaTransformFunction)
#if defined(ENABLE_OVERLOADING)
data MetaInfoTransformFuncFieldInfo
instance AttrInfo MetaInfoTransformFuncFieldInfo where
type AttrBaseTypeConstraint MetaInfoTransformFuncFieldInfo = (~) MetaInfo
type AttrAllowedOps MetaInfoTransformFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MetaInfoTransformFuncFieldInfo = (~) (FunPtr Gst.Callbacks.C_MetaTransformFunction)
type AttrTransferTypeConstraint MetaInfoTransformFuncFieldInfo = (~)Gst.Callbacks.MetaTransformFunction
type AttrTransferType MetaInfoTransformFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaTransformFunction)
type AttrGetType MetaInfoTransformFuncFieldInfo = Maybe Gst.Callbacks.MetaTransformFunction
type AttrLabel MetaInfoTransformFuncFieldInfo = "transform_func"
type AttrOrigin MetaInfoTransformFuncFieldInfo = MetaInfo
attrGet = getMetaInfoTransformFunc
attrSet = setMetaInfoTransformFunc
attrConstruct = undefined
attrClear = clearMetaInfoTransformFunc
attrTransfer _ v = do
Gst.Callbacks.mk_MetaTransformFunction (Gst.Callbacks.wrap_MetaTransformFunction Nothing v)
metaInfo_transformFunc :: AttrLabelProxy "transformFunc"
metaInfo_transformFunc = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MetaInfo
type instance O.AttributeList MetaInfo = MetaInfoAttributeList
type MetaInfoAttributeList = ('[ '("api", MetaInfoApiFieldInfo), '("type", MetaInfoTypeFieldInfo), '("size", MetaInfoSizeFieldInfo), '("initFunc", MetaInfoInitFuncFieldInfo), '("freeFunc", MetaInfoFreeFuncFieldInfo), '("transformFunc", MetaInfoTransformFuncFieldInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveMetaInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveMetaInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMetaInfoMethod t MetaInfo, O.MethodInfo info MetaInfo p) => OL.IsLabel t (MetaInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif