{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The t'GI.Gst.Structs.MetaInfo.MetaInfo' provides information about a specific metadata
-- structure.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gst.Structs.MetaInfo
    ( 

-- * Exported types
    MetaInfo(..)                            ,
    newZeroMetaInfo                         ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [isCustom]("GI.Gst.Structs.MetaInfo#g:method:isCustom"), [register]("GI.Gst.Structs.MetaInfo#g:method:register").
-- 
-- ==== Getters
-- /None/.
-- 
-- ==== Setters
-- /None/.

#if defined(ENABLE_OVERLOADING)
    ResolveMetaInfoMethod                   ,
#endif

-- ** isCustom #method:isCustom#

#if defined(ENABLE_OVERLOADING)
    MetaInfoIsCustomMethodInfo              ,
#endif
    metaInfoIsCustom                        ,


-- ** register #method:register#

#if defined(ENABLE_OVERLOADING)
    MetaInfoRegisterMethodInfo              ,
#endif
    metaInfoRegister                        ,




 -- * Properties


-- ** api #attr:api#
-- | tag identifying the metadata structure and api

    getMetaInfoApi                          ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_api                            ,
#endif
    setMetaInfoApi                          ,


-- ** clearFunc #attr:clearFunc#
-- | Function for clearing the metadata, or 'P.Nothing' if not supported by this
-- meta. This is called by the buffer pool when a buffer is returned for
-- pooled metas.
-- 
-- /Since: 1.24/

    clearMetaInfoClearFunc                  ,
    getMetaInfoClearFunc                    ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_clearFunc                      ,
#endif
    setMetaInfoClearFunc                    ,


-- ** deserializeFunc #attr:deserializeFunc#
-- | Function for deserializing the metadata, or 'P.Nothing' if not supported by this
-- meta.
-- 
-- /Since: 1.24/

    clearMetaInfoDeserializeFunc            ,
    getMetaInfoDeserializeFunc              ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_deserializeFunc                ,
#endif
    setMetaInfoDeserializeFunc              ,


-- ** freeFunc #attr:freeFunc#
-- | function for freeing the metadata

    clearMetaInfoFreeFunc                   ,
    getMetaInfoFreeFunc                     ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_freeFunc                       ,
#endif
    setMetaInfoFreeFunc                     ,


-- ** initFunc #attr:initFunc#
-- | function for initializing the metadata

    clearMetaInfoInitFunc                   ,
    getMetaInfoInitFunc                     ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_initFunc                       ,
#endif
    setMetaInfoInitFunc                     ,


-- ** serializeFunc #attr:serializeFunc#
-- | Function for serializing the metadata, or 'P.Nothing' if not supported by this
-- meta.
-- 
-- /Since: 1.24/

    clearMetaInfoSerializeFunc              ,
    getMetaInfoSerializeFunc                ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_serializeFunc                  ,
#endif
    setMetaInfoSerializeFunc                ,


-- ** size #attr:size#
-- | size of the metadata

    getMetaInfoSize                         ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_size                           ,
#endif
    setMetaInfoSize                         ,


-- ** transformFunc #attr:transformFunc#
-- | function for transforming the metadata

    clearMetaInfoTransformFunc              ,
    getMetaInfoTransformFunc                ,
#if defined(ENABLE_OVERLOADING)
    metaInfo_transformFunc                  ,
#endif
    setMetaInfoTransformFunc                ,


-- ** type #attr:type#
-- | type identifying the implementor of the api

    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.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.Kind as DK
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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.Gst.Callbacks as Gst.Callbacks

#else
import qualified GI.Gst.Callbacks as Gst.Callbacks

#endif

-- | Memory-managed wrapper type.
newtype MetaInfo = MetaInfo (SP.ManagedPtr MetaInfo)
    deriving (MetaInfo -> MetaInfo -> Bool
(MetaInfo -> MetaInfo -> Bool)
-> (MetaInfo -> MetaInfo -> Bool) -> Eq MetaInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MetaInfo -> MetaInfo -> Bool
== :: MetaInfo -> MetaInfo -> Bool
$c/= :: MetaInfo -> MetaInfo -> Bool
/= :: MetaInfo -> MetaInfo -> Bool
Eq)

instance SP.ManagedPtrNewtype MetaInfo where
    toManagedPtr :: MetaInfo -> ManagedPtr MetaInfo
toManagedPtr (MetaInfo ManagedPtr MetaInfo
p) = ManagedPtr MetaInfo
p

instance BoxedPtr MetaInfo where
    boxedPtrCopy :: MetaInfo -> IO MetaInfo
boxedPtrCopy = \MetaInfo
p -> MetaInfo -> (Ptr MetaInfo -> IO MetaInfo) -> IO MetaInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MetaInfo
p (Int -> Ptr MetaInfo -> IO (Ptr MetaInfo)
forall a. (HasCallStack, CallocPtr a) => Int -> Ptr a -> IO (Ptr a)
copyBytes Int
72 (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, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.wrapPtr ManagedPtr MetaInfo -> MetaInfo
MetaInfo)
    boxedPtrFree :: MetaInfo -> IO ()
boxedPtrFree = \MetaInfo
x -> MetaInfo -> (Ptr MetaInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
SP.withManagedPtr MetaInfo
x Ptr MetaInfo -> IO ()
forall a. Ptr a -> IO ()
SP.freeMem
instance CallocPtr MetaInfo where
    boxedPtrCalloc :: IO (Ptr MetaInfo)
boxedPtrCalloc = Int -> IO (Ptr MetaInfo)
forall a. Int -> IO (Ptr a)
callocBytes Int
72


-- | Construct a `MetaInfo` struct initialized to zero.
newZeroMetaInfo :: MonadIO m => m MetaInfo
newZeroMetaInfo :: forall (m :: * -> *). MonadIO m => m MetaInfo
newZeroMetaInfo = IO MetaInfo -> m MetaInfo
forall a. IO a -> m a
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. CallocPtr a => IO (Ptr a)
boxedPtrCalloc IO (Ptr MetaInfo) -> (Ptr MetaInfo -> IO MetaInfo) -> IO MetaInfo
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr MetaInfo -> MetaInfo) -> Ptr MetaInfo -> IO MetaInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr MetaInfo -> MetaInfo
MetaInfo

instance tag ~ 'AttrSet => Constructible MetaInfo tag where
    new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr MetaInfo -> MetaInfo)
-> [AttrOp MetaInfo tag] -> m MetaInfo
new ManagedPtr MetaInfo -> MetaInfo
_ [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 a. a -> m a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaInfo
o


-- | Get the value of the “@api@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #api
-- @
getMetaInfoApi :: MonadIO m => MetaInfo -> m GType
getMetaInfoApi :: forall (m :: * -> *). MonadIO m => MetaInfo -> m GType
getMetaInfoApi MetaInfo
s = IO GType -> m GType
forall a. IO a -> m a
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 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` Int
0) :: IO CGType
    let val' :: GType
val' = CGType -> GType
GType CGType
val
    GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'

-- | Set the value of the “@api@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #api 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoApi :: MonadIO m => MetaInfo -> GType -> m ()
setMetaInfoApi :: forall (m :: * -> *). MonadIO m => MetaInfo -> GType -> m ()
setMetaInfoApi MetaInfo
s GType
val = 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
$ 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 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` Int
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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.api"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:api"
        })

metaInfo_api :: AttrLabelProxy "api"
metaInfo_api = AttrLabelProxy

#endif


-- | Get the value of the “@type@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #type
-- @
getMetaInfoType :: MonadIO m => MetaInfo -> m GType
getMetaInfoType :: forall (m :: * -> *). MonadIO m => MetaInfo -> m GType
getMetaInfoType MetaInfo
s = IO GType -> m GType
forall a. IO a -> m a
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 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` Int
8) :: IO CGType
    let val' :: GType
val' = CGType -> GType
GType CGType
val
    GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'

-- | Set the value of the “@type@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #type 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoType :: MonadIO m => MetaInfo -> GType -> m ()
setMetaInfoType :: forall (m :: * -> *). MonadIO m => MetaInfo -> GType -> m ()
setMetaInfoType MetaInfo
s GType
val = 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
$ 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 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` Int
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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.type"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:type"
        })

metaInfo_type :: AttrLabelProxy "type"
metaInfo_type = AttrLabelProxy

#endif


-- | Get the value of the “@size@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #size
-- @
getMetaInfoSize :: MonadIO m => MetaInfo -> m FCT.CSize
getMetaInfoSize :: forall (m :: * -> *). MonadIO m => MetaInfo -> m CSize
getMetaInfoSize MetaInfo
s = IO CSize -> m CSize
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CSize -> m CSize) -> IO CSize -> m CSize
forall a b. (a -> b) -> a -> b
$ MetaInfo -> (Ptr MetaInfo -> IO CSize) -> IO CSize
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO CSize) -> IO CSize)
-> (Ptr MetaInfo -> IO CSize) -> IO CSize
forall a b. (a -> b) -> a -> b
$ \Ptr MetaInfo
ptr -> do
    CSize
val <- Ptr CSize -> IO CSize
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO FCT.CSize
    CSize -> IO CSize
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CSize
val

-- | Set the value of the “@size@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #size 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoSize :: MonadIO m => MetaInfo -> FCT.CSize -> m ()
setMetaInfoSize :: forall (m :: * -> *). MonadIO m => MetaInfo -> CSize -> m ()
setMetaInfoSize MetaInfo
s CSize
val = 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
$ 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 MetaInfo
ptr -> do
    Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (CSize
val :: FCT.CSize)

#if defined(ENABLE_OVERLOADING)
data MetaInfoSizeFieldInfo
instance AttrInfo MetaInfoSizeFieldInfo where
    type AttrBaseTypeConstraint MetaInfoSizeFieldInfo = (~) MetaInfo
    type AttrAllowedOps MetaInfoSizeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint MetaInfoSizeFieldInfo = (~) FCT.CSize
    type AttrTransferTypeConstraint MetaInfoSizeFieldInfo = (~)FCT.CSize
    type AttrTransferType MetaInfoSizeFieldInfo = FCT.CSize
    type AttrGetType MetaInfoSizeFieldInfo = FCT.CSize
    type AttrLabel MetaInfoSizeFieldInfo = "size"
    type AttrOrigin MetaInfoSizeFieldInfo = MetaInfo
    attrGet = getMetaInfoSize
    attrSet = setMetaInfoSize
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer _ v = do
        return v
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.size"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:size"
        })

metaInfo_size :: AttrLabelProxy "size"
metaInfo_size = AttrLabelProxy

#endif


-- | Get the value of the “@init_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #initFunc
-- @
getMetaInfoInitFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaInitFunction)
getMetaInfoInitFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> m (Maybe MetaInitFunction)
getMetaInfoInitFunc MetaInfo
s = IO (Maybe MetaInitFunction) -> m (Maybe MetaInitFunction)
forall a. IO a -> m a
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 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` Int
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
$ \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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaInitFunction
val''
    Maybe MetaInitFunction -> IO (Maybe MetaInitFunction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaInitFunction
result

-- | Set the value of the “@init_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #initFunc 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoInitFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaInitFunction -> m ()
setMetaInfoInitFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> FunPtr C_MetaInitFunction -> m ()
setMetaInfoInitFunc MetaInfo
s FunPtr C_MetaInitFunction
val = 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
$ 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 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` Int
24) (FunPtr C_MetaInitFunction
val :: FunPtr Gst.Callbacks.C_MetaInitFunction)

-- | Set the value of the “@init_func@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #initFunc
-- @
clearMetaInfoInitFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoInitFunc :: forall (m :: * -> *). MonadIO m => MetaInfo -> m ()
clearMetaInfoInitFunc MetaInfo
s = 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
$ 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 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` Int
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)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.initFunc"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:initFunc"
        })

metaInfo_initFunc :: AttrLabelProxy "initFunc"
metaInfo_initFunc = AttrLabelProxy

#endif


-- | Get the value of the “@free_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #freeFunc
-- @
getMetaInfoFreeFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaFreeFunction)
getMetaInfoFreeFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> m (Maybe MetaFreeFunction)
getMetaInfoFreeFunc MetaInfo
s = IO (Maybe MetaFreeFunction) -> m (Maybe MetaFreeFunction)
forall a. IO a -> m a
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 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` Int
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
$ \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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaFreeFunction
val''
    Maybe MetaFreeFunction -> IO (Maybe MetaFreeFunction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaFreeFunction
result

-- | Set the value of the “@free_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #freeFunc 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoFreeFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaFreeFunction -> m ()
setMetaInfoFreeFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> FunPtr C_MetaFreeFunction -> m ()
setMetaInfoFreeFunc MetaInfo
s FunPtr C_MetaFreeFunction
val = 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
$ 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 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` Int
32) (FunPtr C_MetaFreeFunction
val :: FunPtr Gst.Callbacks.C_MetaFreeFunction)

-- | Set the value of the “@free_func@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #freeFunc
-- @
clearMetaInfoFreeFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoFreeFunc :: forall (m :: * -> *). MonadIO m => MetaInfo -> m ()
clearMetaInfoFreeFunc MetaInfo
s = 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
$ 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 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` Int
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)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.freeFunc"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:freeFunc"
        })

metaInfo_freeFunc :: AttrLabelProxy "freeFunc"
metaInfo_freeFunc = AttrLabelProxy

#endif


-- | Get the value of the “@transform_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #transformFunc
-- @
getMetaInfoTransformFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaTransformFunction_WithClosures)
getMetaInfoTransformFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> m (Maybe MetaTransformFunction_WithClosures)
getMetaInfoTransformFunc MetaInfo
s = IO (Maybe MetaTransformFunction_WithClosures)
-> m (Maybe MetaTransformFunction_WithClosures)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaTransformFunction_WithClosures)
 -> m (Maybe MetaTransformFunction_WithClosures))
-> IO (Maybe MetaTransformFunction_WithClosures)
-> m (Maybe MetaTransformFunction_WithClosures)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaTransformFunction_WithClosures))
-> IO (Maybe MetaTransformFunction_WithClosures)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaTransformFunction_WithClosures))
 -> IO (Maybe MetaTransformFunction_WithClosures))
-> (Ptr MetaInfo -> IO (Maybe MetaTransformFunction_WithClosures))
-> IO (Maybe MetaTransformFunction_WithClosures)
forall a b. (a -> b) -> a -> b
$ \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` Int
40) :: IO (FunPtr Gst.Callbacks.C_MetaTransformFunction)
    Maybe MetaTransformFunction_WithClosures
result <- FunPtr C_MetaTransformFunction
-> (FunPtr C_MetaTransformFunction
    -> IO MetaTransformFunction_WithClosures)
-> IO (Maybe MetaTransformFunction_WithClosures)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaTransformFunction
val ((FunPtr C_MetaTransformFunction
  -> IO MetaTransformFunction_WithClosures)
 -> IO (Maybe MetaTransformFunction_WithClosures))
-> (FunPtr C_MetaTransformFunction
    -> IO MetaTransformFunction_WithClosures)
-> IO (Maybe MetaTransformFunction_WithClosures)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_MetaTransformFunction
val' -> do
        let val'' :: MetaTransformFunction_WithClosures
val'' = FunPtr C_MetaTransformFunction
-> MetaTransformFunction_WithClosures
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaTransformFunction
-> Buffer -> Meta -> Buffer -> Word32 -> Ptr () -> m Bool
Gst.Callbacks.dynamic_MetaTransformFunction FunPtr C_MetaTransformFunction
val'
        MetaTransformFunction_WithClosures
-> IO MetaTransformFunction_WithClosures
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaTransformFunction_WithClosures
val''
    Maybe MetaTransformFunction_WithClosures
-> IO (Maybe MetaTransformFunction_WithClosures)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaTransformFunction_WithClosures
result

-- | Set the value of the “@transform_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #transformFunc 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoTransformFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaTransformFunction -> m ()
setMetaInfoTransformFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> FunPtr C_MetaTransformFunction -> m ()
setMetaInfoTransformFunc MetaInfo
s FunPtr C_MetaTransformFunction
val = 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
$ 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 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` Int
40) (FunPtr C_MetaTransformFunction
val :: FunPtr Gst.Callbacks.C_MetaTransformFunction)

-- | Set the value of the “@transform_func@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #transformFunc
-- @
clearMetaInfoTransformFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoTransformFunc :: forall (m :: * -> *). MonadIO m => MetaInfo -> m ()
clearMetaInfoTransformFunc MetaInfo
s = 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
$ 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 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` Int
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_WithClosures
    type AttrTransferType MetaInfoTransformFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaTransformFunction)
    type AttrGetType MetaInfoTransformFuncFieldInfo = Maybe Gst.Callbacks.MetaTransformFunction_WithClosures
    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)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.transformFunc"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:transformFunc"
        })

metaInfo_transformFunc :: AttrLabelProxy "transformFunc"
metaInfo_transformFunc = AttrLabelProxy

#endif


-- | Get the value of the “@serialize_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #serializeFunc
-- @
getMetaInfoSerializeFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaSerializeFunction)
getMetaInfoSerializeFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> m (Maybe MetaSerializeFunction)
getMetaInfoSerializeFunc MetaInfo
s = IO (Maybe MetaSerializeFunction) -> m (Maybe MetaSerializeFunction)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaSerializeFunction)
 -> m (Maybe MetaSerializeFunction))
-> IO (Maybe MetaSerializeFunction)
-> m (Maybe MetaSerializeFunction)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaSerializeFunction))
-> IO (Maybe MetaSerializeFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaSerializeFunction))
 -> IO (Maybe MetaSerializeFunction))
-> (Ptr MetaInfo -> IO (Maybe MetaSerializeFunction))
-> IO (Maybe MetaSerializeFunction)
forall a b. (a -> b) -> a -> b
$ \Ptr MetaInfo
ptr -> do
    FunPtr C_MetaSerializeFunction
val <- Ptr (FunPtr C_MetaSerializeFunction)
-> IO (FunPtr C_MetaSerializeFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaSerializeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) :: IO (FunPtr Gst.Callbacks.C_MetaSerializeFunction)
    Maybe MetaSerializeFunction
result <- FunPtr C_MetaSerializeFunction
-> (FunPtr C_MetaSerializeFunction -> IO MetaSerializeFunction)
-> IO (Maybe MetaSerializeFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaSerializeFunction
val ((FunPtr C_MetaSerializeFunction -> IO MetaSerializeFunction)
 -> IO (Maybe MetaSerializeFunction))
-> (FunPtr C_MetaSerializeFunction -> IO MetaSerializeFunction)
-> IO (Maybe MetaSerializeFunction)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_MetaSerializeFunction
val' -> do
        let val'' :: MetaSerializeFunction
val'' = FunPtr C_MetaSerializeFunction -> MetaSerializeFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaSerializeFunction
-> Meta -> ByteArrayInterface -> m (Bool, Word8)
Gst.Callbacks.dynamic_MetaSerializeFunction FunPtr C_MetaSerializeFunction
val'
        MetaSerializeFunction -> IO MetaSerializeFunction
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaSerializeFunction
val''
    Maybe MetaSerializeFunction -> IO (Maybe MetaSerializeFunction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaSerializeFunction
result

-- | Set the value of the “@serialize_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #serializeFunc 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoSerializeFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaSerializeFunction -> m ()
setMetaInfoSerializeFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> FunPtr C_MetaSerializeFunction -> m ()
setMetaInfoSerializeFunc MetaInfo
s FunPtr C_MetaSerializeFunction
val = 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
$ 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 MetaInfo
ptr -> do
    Ptr (FunPtr C_MetaSerializeFunction)
-> FunPtr C_MetaSerializeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaSerializeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) (FunPtr C_MetaSerializeFunction
val :: FunPtr Gst.Callbacks.C_MetaSerializeFunction)

-- | Set the value of the “@serialize_func@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #serializeFunc
-- @
clearMetaInfoSerializeFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoSerializeFunc :: forall (m :: * -> *). MonadIO m => MetaInfo -> m ()
clearMetaInfoSerializeFunc MetaInfo
s = 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
$ 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 MetaInfo
ptr -> do
    Ptr (FunPtr C_MetaSerializeFunction)
-> FunPtr C_MetaSerializeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaSerializeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48) (FunPtr C_MetaSerializeFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MetaSerializeFunction)

#if defined(ENABLE_OVERLOADING)
data MetaInfoSerializeFuncFieldInfo
instance AttrInfo MetaInfoSerializeFuncFieldInfo where
    type AttrBaseTypeConstraint MetaInfoSerializeFuncFieldInfo = (~) MetaInfo
    type AttrAllowedOps MetaInfoSerializeFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint MetaInfoSerializeFuncFieldInfo = (~) (FunPtr Gst.Callbacks.C_MetaSerializeFunction)
    type AttrTransferTypeConstraint MetaInfoSerializeFuncFieldInfo = (~)Gst.Callbacks.MetaSerializeFunction
    type AttrTransferType MetaInfoSerializeFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaSerializeFunction)
    type AttrGetType MetaInfoSerializeFuncFieldInfo = Maybe Gst.Callbacks.MetaSerializeFunction
    type AttrLabel MetaInfoSerializeFuncFieldInfo = "serialize_func"
    type AttrOrigin MetaInfoSerializeFuncFieldInfo = MetaInfo
    attrGet = getMetaInfoSerializeFunc
    attrSet = setMetaInfoSerializeFunc
    attrConstruct = undefined
    attrClear = clearMetaInfoSerializeFunc
    attrTransfer _ v = do
        Gst.Callbacks.mk_MetaSerializeFunction (Gst.Callbacks.wrap_MetaSerializeFunction Nothing v)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.serializeFunc"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:serializeFunc"
        })

metaInfo_serializeFunc :: AttrLabelProxy "serializeFunc"
metaInfo_serializeFunc = AttrLabelProxy

#endif


-- | Get the value of the “@deserialize_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #deserializeFunc
-- @
getMetaInfoDeserializeFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaDeserializeFunction)
getMetaInfoDeserializeFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> m (Maybe MetaDeserializeFunction)
getMetaInfoDeserializeFunc MetaInfo
s = IO (Maybe MetaDeserializeFunction)
-> m (Maybe MetaDeserializeFunction)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaDeserializeFunction)
 -> m (Maybe MetaDeserializeFunction))
-> IO (Maybe MetaDeserializeFunction)
-> m (Maybe MetaDeserializeFunction)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaDeserializeFunction))
-> IO (Maybe MetaDeserializeFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaDeserializeFunction))
 -> IO (Maybe MetaDeserializeFunction))
-> (Ptr MetaInfo -> IO (Maybe MetaDeserializeFunction))
-> IO (Maybe MetaDeserializeFunction)
forall a b. (a -> b) -> a -> b
$ \Ptr MetaInfo
ptr -> do
    FunPtr C_MetaDeserializeFunction
val <- Ptr (FunPtr C_MetaDeserializeFunction)
-> IO (FunPtr C_MetaDeserializeFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaDeserializeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) :: IO (FunPtr Gst.Callbacks.C_MetaDeserializeFunction)
    Maybe MetaDeserializeFunction
result <- FunPtr C_MetaDeserializeFunction
-> (FunPtr C_MetaDeserializeFunction -> IO MetaDeserializeFunction)
-> IO (Maybe MetaDeserializeFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaDeserializeFunction
val ((FunPtr C_MetaDeserializeFunction -> IO MetaDeserializeFunction)
 -> IO (Maybe MetaDeserializeFunction))
-> (FunPtr C_MetaDeserializeFunction -> IO MetaDeserializeFunction)
-> IO (Maybe MetaDeserializeFunction)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_MetaDeserializeFunction
val' -> do
        let val'' :: MetaDeserializeFunction
val'' = FunPtr C_MetaDeserializeFunction -> MetaDeserializeFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaDeserializeFunction
-> MetaInfo -> Buffer -> Word8 -> CSize -> Word8 -> m (Maybe Meta)
Gst.Callbacks.dynamic_MetaDeserializeFunction FunPtr C_MetaDeserializeFunction
val'
        MetaDeserializeFunction -> IO MetaDeserializeFunction
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaDeserializeFunction
val''
    Maybe MetaDeserializeFunction -> IO (Maybe MetaDeserializeFunction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaDeserializeFunction
result

-- | Set the value of the “@deserialize_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #deserializeFunc 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoDeserializeFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaDeserializeFunction -> m ()
setMetaInfoDeserializeFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> FunPtr C_MetaDeserializeFunction -> m ()
setMetaInfoDeserializeFunc MetaInfo
s FunPtr C_MetaDeserializeFunction
val = 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
$ 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 MetaInfo
ptr -> do
    Ptr (FunPtr C_MetaDeserializeFunction)
-> FunPtr C_MetaDeserializeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaDeserializeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) (FunPtr C_MetaDeserializeFunction
val :: FunPtr Gst.Callbacks.C_MetaDeserializeFunction)

-- | Set the value of the “@deserialize_func@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #deserializeFunc
-- @
clearMetaInfoDeserializeFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoDeserializeFunc :: forall (m :: * -> *). MonadIO m => MetaInfo -> m ()
clearMetaInfoDeserializeFunc MetaInfo
s = 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
$ 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 MetaInfo
ptr -> do
    Ptr (FunPtr C_MetaDeserializeFunction)
-> FunPtr C_MetaDeserializeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaDeserializeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56) (FunPtr C_MetaDeserializeFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MetaDeserializeFunction)

#if defined(ENABLE_OVERLOADING)
data MetaInfoDeserializeFuncFieldInfo
instance AttrInfo MetaInfoDeserializeFuncFieldInfo where
    type AttrBaseTypeConstraint MetaInfoDeserializeFuncFieldInfo = (~) MetaInfo
    type AttrAllowedOps MetaInfoDeserializeFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint MetaInfoDeserializeFuncFieldInfo = (~) (FunPtr Gst.Callbacks.C_MetaDeserializeFunction)
    type AttrTransferTypeConstraint MetaInfoDeserializeFuncFieldInfo = (~)Gst.Callbacks.MetaDeserializeFunction
    type AttrTransferType MetaInfoDeserializeFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaDeserializeFunction)
    type AttrGetType MetaInfoDeserializeFuncFieldInfo = Maybe Gst.Callbacks.MetaDeserializeFunction
    type AttrLabel MetaInfoDeserializeFuncFieldInfo = "deserialize_func"
    type AttrOrigin MetaInfoDeserializeFuncFieldInfo = MetaInfo
    attrGet = getMetaInfoDeserializeFunc
    attrSet = setMetaInfoDeserializeFunc
    attrConstruct = undefined
    attrClear = clearMetaInfoDeserializeFunc
    attrTransfer _ v = do
        Gst.Callbacks.mk_MetaDeserializeFunction (Gst.Callbacks.wrap_MetaDeserializeFunction Nothing v)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.deserializeFunc"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:deserializeFunc"
        })

metaInfo_deserializeFunc :: AttrLabelProxy "deserializeFunc"
metaInfo_deserializeFunc = AttrLabelProxy

#endif


-- | Get the value of the “@clear_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' metaInfo #clearFunc
-- @
getMetaInfoClearFunc :: MonadIO m => MetaInfo -> m (Maybe Gst.Callbacks.MetaClearFunction)
getMetaInfoClearFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> m (Maybe MetaClearFunction)
getMetaInfoClearFunc MetaInfo
s = IO (Maybe MetaClearFunction) -> m (Maybe MetaClearFunction)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MetaClearFunction) -> m (Maybe MetaClearFunction))
-> IO (Maybe MetaClearFunction) -> m (Maybe MetaClearFunction)
forall a b. (a -> b) -> a -> b
$ MetaInfo
-> (Ptr MetaInfo -> IO (Maybe MetaClearFunction))
-> IO (Maybe MetaClearFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MetaInfo
s ((Ptr MetaInfo -> IO (Maybe MetaClearFunction))
 -> IO (Maybe MetaClearFunction))
-> (Ptr MetaInfo -> IO (Maybe MetaClearFunction))
-> IO (Maybe MetaClearFunction)
forall a b. (a -> b) -> a -> b
$ \Ptr MetaInfo
ptr -> do
    FunPtr C_MetaClearFunction
val <- Ptr (FunPtr C_MetaClearFunction) -> IO (FunPtr C_MetaClearFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaClearFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) :: IO (FunPtr Gst.Callbacks.C_MetaClearFunction)
    Maybe MetaClearFunction
result <- FunPtr C_MetaClearFunction
-> (FunPtr C_MetaClearFunction -> IO MetaClearFunction)
-> IO (Maybe MetaClearFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MetaClearFunction
val ((FunPtr C_MetaClearFunction -> IO MetaClearFunction)
 -> IO (Maybe MetaClearFunction))
-> (FunPtr C_MetaClearFunction -> IO MetaClearFunction)
-> IO (Maybe MetaClearFunction)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_MetaClearFunction
val' -> do
        let val'' :: MetaClearFunction
val'' = FunPtr C_MetaClearFunction -> MetaClearFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MetaClearFunction -> Buffer -> Meta -> m ()
Gst.Callbacks.dynamic_MetaClearFunction FunPtr C_MetaClearFunction
val'
        MetaClearFunction -> IO MetaClearFunction
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaClearFunction
val''
    Maybe MetaClearFunction -> IO (Maybe MetaClearFunction)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MetaClearFunction
result

-- | Set the value of the “@clear_func@” field.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' metaInfo [ #clearFunc 'Data.GI.Base.Attributes.:=' value ]
-- @
setMetaInfoClearFunc :: MonadIO m => MetaInfo -> FunPtr Gst.Callbacks.C_MetaClearFunction -> m ()
setMetaInfoClearFunc :: forall (m :: * -> *).
MonadIO m =>
MetaInfo -> FunPtr C_MetaClearFunction -> m ()
setMetaInfoClearFunc MetaInfo
s FunPtr C_MetaClearFunction
val = 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
$ 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 MetaInfo
ptr -> do
    Ptr (FunPtr C_MetaClearFunction)
-> FunPtr C_MetaClearFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaClearFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) (FunPtr C_MetaClearFunction
val :: FunPtr Gst.Callbacks.C_MetaClearFunction)

-- | Set the value of the “@clear_func@” field to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #clearFunc
-- @
clearMetaInfoClearFunc :: MonadIO m => MetaInfo -> m ()
clearMetaInfoClearFunc :: forall (m :: * -> *). MonadIO m => MetaInfo -> m ()
clearMetaInfoClearFunc MetaInfo
s = 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
$ 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 MetaInfo
ptr -> do
    Ptr (FunPtr C_MetaClearFunction)
-> FunPtr C_MetaClearFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MetaInfo
ptr Ptr MetaInfo -> Int -> Ptr (FunPtr C_MetaClearFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) (FunPtr C_MetaClearFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MetaClearFunction)

#if defined(ENABLE_OVERLOADING)
data MetaInfoClearFuncFieldInfo
instance AttrInfo MetaInfoClearFuncFieldInfo where
    type AttrBaseTypeConstraint MetaInfoClearFuncFieldInfo = (~) MetaInfo
    type AttrAllowedOps MetaInfoClearFuncFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint MetaInfoClearFuncFieldInfo = (~) (FunPtr Gst.Callbacks.C_MetaClearFunction)
    type AttrTransferTypeConstraint MetaInfoClearFuncFieldInfo = (~)Gst.Callbacks.MetaClearFunction
    type AttrTransferType MetaInfoClearFuncFieldInfo = (FunPtr Gst.Callbacks.C_MetaClearFunction)
    type AttrGetType MetaInfoClearFuncFieldInfo = Maybe Gst.Callbacks.MetaClearFunction
    type AttrLabel MetaInfoClearFuncFieldInfo = "clear_func"
    type AttrOrigin MetaInfoClearFuncFieldInfo = MetaInfo
    attrGet = getMetaInfoClearFunc
    attrSet = setMetaInfoClearFunc
    attrConstruct = undefined
    attrClear = clearMetaInfoClearFunc
    attrTransfer _ v = do
        Gst.Callbacks.mk_MetaClearFunction (Gst.Callbacks.wrap_MetaClearFunction Nothing v)
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.clearFunc"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#g:attr:clearFunc"
        })

metaInfo_clearFunc :: AttrLabelProxy "clearFunc"
metaInfo_clearFunc = 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), '("serializeFunc", MetaInfoSerializeFuncFieldInfo), '("deserializeFunc", MetaInfoDeserializeFuncFieldInfo), '("clearFunc", MetaInfoClearFuncFieldInfo)] :: [(Symbol, DK.Type)])
#endif

-- method MetaInfo::is_custom
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "info"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "MetaInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_meta_info_is_custom" gst_meta_info_is_custom :: 
    Ptr MetaInfo ->                         -- info : TInterface (Name {namespace = "Gst", name = "MetaInfo"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 1.20/
metaInfoIsCustom ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MetaInfo
    -> m Bool
    -- ^ __Returns:__ whether /@info@/ was registered as a t'GI.Gst.Structs.CustomMeta.CustomMeta' with
    --   'GI.Gst.Functions.metaRegisterCustom'
metaInfoIsCustom :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MetaInfo -> m Bool
metaInfoIsCustom MetaInfo
info = 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 MetaInfo
info' <- MetaInfo -> IO (Ptr MetaInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MetaInfo
info
    CInt
result <- Ptr MetaInfo -> IO CInt
gst_meta_info_is_custom Ptr MetaInfo
info'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    MetaInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MetaInfo
info
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data MetaInfoIsCustomMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod MetaInfoIsCustomMethodInfo MetaInfo signature where
    overloadedMethod = metaInfoIsCustom

instance O.OverloadedMethodInfo MetaInfoIsCustomMethodInfo MetaInfo where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.metaInfoIsCustom",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#v:metaInfoIsCustom"
        })


#endif

-- method MetaInfo::register
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "info"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "MetaInfo" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a new #GstMetaInfo created by gst_meta_info_new()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "MetaInfo" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_meta_info_register" gst_meta_info_register :: 
    Ptr MetaInfo ->                         -- info : TInterface (Name {namespace = "Gst", name = "MetaInfo"})
    IO (Ptr MetaInfo)

-- | Registers a new meta.
-- 
-- Use the structure returned by @/gst_meta_info_new()/@, it consumes it and the
-- structure shouldnt be used after. The one returned by the function can be
-- kept.
-- 
-- /Since: 1.24/
metaInfoRegister ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MetaInfo
    -- ^ /@info@/: a new t'GI.Gst.Structs.MetaInfo.MetaInfo' created by @/gst_meta_info_new()/@
    -> m MetaInfo
    -- ^ __Returns:__ the registered meta
metaInfoRegister :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MetaInfo -> m MetaInfo
metaInfoRegister MetaInfo
info = IO MetaInfo -> m MetaInfo
forall a. IO a -> m a
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
$ do
    Ptr MetaInfo
info' <- MetaInfo -> IO (Ptr MetaInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MetaInfo
info
    Ptr MetaInfo
result <- Ptr MetaInfo -> IO (Ptr MetaInfo)
gst_meta_info_register Ptr MetaInfo
info'
    Text -> Ptr MetaInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"metaInfoRegister" Ptr MetaInfo
result
    MetaInfo
result' <- ((ManagedPtr MetaInfo -> MetaInfo) -> Ptr MetaInfo -> IO MetaInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr MetaInfo -> MetaInfo
MetaInfo) Ptr MetaInfo
result
    MetaInfo -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MetaInfo
info
    MetaInfo -> IO MetaInfo
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MetaInfo
result'

#if defined(ENABLE_OVERLOADING)
data MetaInfoRegisterMethodInfo
instance (signature ~ (m MetaInfo), MonadIO m) => O.OverloadedMethod MetaInfoRegisterMethodInfo MetaInfo signature where
    overloadedMethod = metaInfoRegister

instance O.OverloadedMethodInfo MetaInfoRegisterMethodInfo MetaInfo where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gst.Structs.MetaInfo.metaInfoRegister",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.30/docs/GI-Gst-Structs-MetaInfo.html#v:metaInfoRegister"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveMetaInfoMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveMetaInfoMethod "isCustom" o = MetaInfoIsCustomMethodInfo
    ResolveMetaInfoMethod "register" o = MetaInfoRegisterMethodInfo
    ResolveMetaInfoMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveMetaInfoMethod t MetaInfo, O.OverloadedMethod 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

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveMetaInfoMethod t MetaInfo, O.OverloadedMethod info MetaInfo p, R.HasField t MetaInfo p) => R.HasField t MetaInfo p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveMetaInfoMethod t MetaInfo, O.OverloadedMethodInfo info MetaInfo) => OL.IsLabel t (O.MethodProxy info MetaInfo) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif