{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Structs.MiniObject
(
MiniObject(..) ,
newZeroMiniObject ,
#if defined(ENABLE_OVERLOADING)
ResolveMiniObjectMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
MiniObjectAddParentMethodInfo ,
#endif
miniObjectAddParent ,
#if defined(ENABLE_OVERLOADING)
MiniObjectGetQdataMethodInfo ,
#endif
miniObjectGetQdata ,
#if defined(ENABLE_OVERLOADING)
MiniObjectIsWritableMethodInfo ,
#endif
miniObjectIsWritable ,
#if defined(ENABLE_OVERLOADING)
MiniObjectLockMethodInfo ,
#endif
miniObjectLock ,
#if defined(ENABLE_OVERLOADING)
MiniObjectRemoveParentMethodInfo ,
#endif
miniObjectRemoveParent ,
#if defined(ENABLE_OVERLOADING)
MiniObjectSetQdataMethodInfo ,
#endif
miniObjectSetQdata ,
#if defined(ENABLE_OVERLOADING)
MiniObjectStealQdataMethodInfo ,
#endif
miniObjectStealQdata ,
#if defined(ENABLE_OVERLOADING)
MiniObjectUnlockMethodInfo ,
#endif
miniObjectUnlock ,
clearMiniObjectCopy ,
getMiniObjectCopy ,
#if defined(ENABLE_OVERLOADING)
miniObject_copy ,
#endif
setMiniObjectCopy ,
clearMiniObjectDispose ,
getMiniObjectDispose ,
#if defined(ENABLE_OVERLOADING)
miniObject_dispose ,
#endif
setMiniObjectDispose ,
getMiniObjectFlags ,
#if defined(ENABLE_OVERLOADING)
miniObject_flags ,
#endif
setMiniObjectFlags ,
clearMiniObjectFree ,
getMiniObjectFree ,
#if defined(ENABLE_OVERLOADING)
miniObject_free ,
#endif
setMiniObjectFree ,
getMiniObjectLockstate ,
#if defined(ENABLE_OVERLOADING)
miniObject_lockstate ,
#endif
setMiniObjectLockstate ,
getMiniObjectRefcount ,
#if defined(ENABLE_OVERLOADING)
miniObject_refcount ,
#endif
setMiniObjectRefcount ,
getMiniObjectType ,
#if defined(ENABLE_OVERLOADING)
miniObject_type ,
#endif
setMiniObjectType ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.Gst.Callbacks as Gst.Callbacks
import {-# SOURCE #-} qualified GI.Gst.Flags as Gst.Flags
newtype MiniObject = MiniObject (SP.ManagedPtr MiniObject)
deriving (MiniObject -> MiniObject -> Bool
(MiniObject -> MiniObject -> Bool)
-> (MiniObject -> MiniObject -> Bool) -> Eq MiniObject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MiniObject -> MiniObject -> Bool
$c/= :: MiniObject -> MiniObject -> Bool
== :: MiniObject -> MiniObject -> Bool
$c== :: MiniObject -> MiniObject -> Bool
Eq)
instance SP.ManagedPtrNewtype MiniObject where
toManagedPtr :: MiniObject -> ManagedPtr MiniObject
toManagedPtr (MiniObject ManagedPtr MiniObject
p) = ManagedPtr MiniObject
p
foreign import ccall "gst_mini_object_get_type" c_gst_mini_object_get_type ::
IO GType
type instance O.ParentTypes MiniObject = '[]
instance O.HasParentTypes MiniObject
instance B.Types.TypedObject MiniObject where
glibType :: IO GType
glibType = IO GType
c_gst_mini_object_get_type
instance B.Types.GBoxed MiniObject
instance B.GValue.IsGValue (Maybe MiniObject) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_mini_object_get_type
gvalueSet_ :: Ptr GValue -> Maybe MiniObject -> IO ()
gvalueSet_ Ptr GValue
gv Maybe MiniObject
P.Nothing = Ptr GValue -> Ptr MiniObject -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr MiniObject
forall a. Ptr a
FP.nullPtr :: FP.Ptr MiniObject)
gvalueSet_ Ptr GValue
gv (P.Just MiniObject
obj) = MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MiniObject
obj (Ptr GValue -> Ptr MiniObject -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe MiniObject)
gvalueGet_ Ptr GValue
gv = do
Ptr MiniObject
ptr <- Ptr GValue -> IO (Ptr MiniObject)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr MiniObject)
if Ptr MiniObject
ptr Ptr MiniObject -> Ptr MiniObject -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr MiniObject
forall a. Ptr a
FP.nullPtr
then MiniObject -> Maybe MiniObject
forall a. a -> Maybe a
P.Just (MiniObject -> Maybe MiniObject)
-> IO MiniObject -> IO (Maybe MiniObject)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr MiniObject -> MiniObject)
-> Ptr MiniObject -> IO MiniObject
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr MiniObject -> MiniObject
MiniObject Ptr MiniObject
ptr
else Maybe MiniObject -> IO (Maybe MiniObject)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MiniObject
forall a. Maybe a
P.Nothing
newZeroMiniObject :: MonadIO m => m MiniObject
newZeroMiniObject :: forall (m :: * -> *). MonadIO m => m MiniObject
newZeroMiniObject = IO MiniObject -> m MiniObject
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MiniObject -> m MiniObject) -> IO MiniObject -> m MiniObject
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr MiniObject)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
64 IO (Ptr MiniObject)
-> (Ptr MiniObject -> IO MiniObject) -> IO MiniObject
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr MiniObject -> MiniObject)
-> Ptr MiniObject -> IO MiniObject
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr MiniObject -> MiniObject
MiniObject
instance tag ~ 'AttrSet => Constructible MiniObject tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr MiniObject -> MiniObject)
-> [AttrOp MiniObject tag] -> m MiniObject
new ManagedPtr MiniObject -> MiniObject
_ [AttrOp MiniObject tag]
attrs = do
MiniObject
o <- m MiniObject
forall (m :: * -> *). MonadIO m => m MiniObject
newZeroMiniObject
MiniObject -> [AttrOp MiniObject 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set MiniObject
o [AttrOp MiniObject tag]
[AttrOp MiniObject 'AttrSet]
attrs
MiniObject -> m MiniObject
forall (m :: * -> *) a. Monad m => a -> m a
return MiniObject
o
getMiniObjectType :: MonadIO m => MiniObject -> m GType
getMiniObjectType :: forall (m :: * -> *). MonadIO m => MiniObject -> m GType
getMiniObjectType MiniObject
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
$ MiniObject -> (Ptr MiniObject -> IO GType) -> IO GType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO GType) -> IO GType)
-> (Ptr MiniObject -> IO GType) -> IO GType
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
CGType
val <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) :: IO CGType
let val' :: GType
val' = CGType -> GType
GType CGType
val
GType -> IO GType
forall (m :: * -> *) a. Monad m => a -> m a
return GType
val'
setMiniObjectType :: MonadIO m => MiniObject -> GType -> m ()
setMiniObjectType :: forall (m :: * -> *). MonadIO m => MiniObject -> GType -> m ()
setMiniObjectType MiniObject
s GType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
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 MiniObject
ptr Ptr MiniObject -> Int -> Ptr CGType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0) (CGType
val' :: CGType)
#if defined(ENABLE_OVERLOADING)
data MiniObjectTypeFieldInfo
instance AttrInfo MiniObjectTypeFieldInfo where
type AttrBaseTypeConstraint MiniObjectTypeFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MiniObjectTypeFieldInfo = (~) GType
type AttrTransferTypeConstraint MiniObjectTypeFieldInfo = (~)GType
type AttrTransferType MiniObjectTypeFieldInfo = GType
type AttrGetType MiniObjectTypeFieldInfo = GType
type AttrLabel MiniObjectTypeFieldInfo = "type"
type AttrOrigin MiniObjectTypeFieldInfo = MiniObject
attrGet = getMiniObjectType
attrSet = setMiniObjectType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.type"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:type"
})
miniObject_type :: AttrLabelProxy "type"
miniObject_type = AttrLabelProxy
#endif
getMiniObjectRefcount :: MonadIO m => MiniObject -> m Int32
getMiniObjectRefcount :: forall (m :: * -> *). MonadIO m => MiniObject -> m Int32
getMiniObjectRefcount MiniObject
s = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO Int32) -> IO Int32)
-> (Ptr MiniObject -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setMiniObjectRefcount :: MonadIO m => MiniObject -> Int32 -> m ()
setMiniObjectRefcount :: forall (m :: * -> *). MonadIO m => MiniObject -> Int32 -> m ()
setMiniObjectRefcount MiniObject
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data MiniObjectRefcountFieldInfo
instance AttrInfo MiniObjectRefcountFieldInfo where
type AttrBaseTypeConstraint MiniObjectRefcountFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectRefcountFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MiniObjectRefcountFieldInfo = (~) Int32
type AttrTransferTypeConstraint MiniObjectRefcountFieldInfo = (~)Int32
type AttrTransferType MiniObjectRefcountFieldInfo = Int32
type AttrGetType MiniObjectRefcountFieldInfo = Int32
type AttrLabel MiniObjectRefcountFieldInfo = "refcount"
type AttrOrigin MiniObjectRefcountFieldInfo = MiniObject
attrGet = getMiniObjectRefcount
attrSet = setMiniObjectRefcount
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.refcount"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:refcount"
})
miniObject_refcount :: AttrLabelProxy "refcount"
miniObject_refcount = AttrLabelProxy
#endif
getMiniObjectLockstate :: MonadIO m => MiniObject -> m Int32
getMiniObjectLockstate :: forall (m :: * -> *). MonadIO m => MiniObject -> m Int32
getMiniObjectLockstate MiniObject
s = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO Int32) -> IO Int32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO Int32) -> IO Int32)
-> (Ptr MiniObject -> IO Int32) -> IO Int32
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Int32
val <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) :: IO Int32
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
val
setMiniObjectLockstate :: MonadIO m => MiniObject -> Int32 -> m ()
setMiniObjectLockstate :: forall (m :: * -> *). MonadIO m => MiniObject -> Int32 -> m ()
setMiniObjectLockstate MiniObject
s Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr Int32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
12) (Int32
val :: Int32)
#if defined(ENABLE_OVERLOADING)
data MiniObjectLockstateFieldInfo
instance AttrInfo MiniObjectLockstateFieldInfo where
type AttrBaseTypeConstraint MiniObjectLockstateFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectLockstateFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MiniObjectLockstateFieldInfo = (~) Int32
type AttrTransferTypeConstraint MiniObjectLockstateFieldInfo = (~)Int32
type AttrTransferType MiniObjectLockstateFieldInfo = Int32
type AttrGetType MiniObjectLockstateFieldInfo = Int32
type AttrLabel MiniObjectLockstateFieldInfo = "lockstate"
type AttrOrigin MiniObjectLockstateFieldInfo = MiniObject
attrGet = getMiniObjectLockstate
attrSet = setMiniObjectLockstate
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.lockstate"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:lockstate"
})
miniObject_lockstate :: AttrLabelProxy "lockstate"
miniObject_lockstate = AttrLabelProxy
#endif
getMiniObjectFlags :: MonadIO m => MiniObject -> m Word32
getMiniObjectFlags :: forall (m :: * -> *). MonadIO m => MiniObject -> m Word32
getMiniObjectFlags MiniObject
s = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO Word32) -> IO Word32
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO Word32) -> IO Word32)
-> (Ptr MiniObject -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Word32
val <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) :: IO Word32
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
val
setMiniObjectFlags :: MonadIO m => MiniObject -> Word32 -> m ()
setMiniObjectFlags :: forall (m :: * -> *). MonadIO m => MiniObject -> Word32 -> m ()
setMiniObjectFlags MiniObject
s Word32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16) (Word32
val :: Word32)
#if defined(ENABLE_OVERLOADING)
data MiniObjectFlagsFieldInfo
instance AttrInfo MiniObjectFlagsFieldInfo where
type AttrBaseTypeConstraint MiniObjectFlagsFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint MiniObjectFlagsFieldInfo = (~) Word32
type AttrTransferTypeConstraint MiniObjectFlagsFieldInfo = (~)Word32
type AttrTransferType MiniObjectFlagsFieldInfo = Word32
type AttrGetType MiniObjectFlagsFieldInfo = Word32
type AttrLabel MiniObjectFlagsFieldInfo = "flags"
type AttrOrigin MiniObjectFlagsFieldInfo = MiniObject
attrGet = getMiniObjectFlags
attrSet = setMiniObjectFlags
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.flags"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:flags"
})
miniObject_flags :: AttrLabelProxy "flags"
miniObject_flags = AttrLabelProxy
#endif
getMiniObjectCopy :: MonadIO m => MiniObject -> m (Maybe Gst.Callbacks.MiniObjectCopyFunction)
getMiniObjectCopy :: forall (m :: * -> *).
MonadIO m =>
MiniObject -> m (Maybe MiniObjectCopyFunction)
getMiniObjectCopy MiniObject
s = IO (Maybe MiniObjectCopyFunction)
-> m (Maybe MiniObjectCopyFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MiniObjectCopyFunction)
-> m (Maybe MiniObjectCopyFunction))
-> IO (Maybe MiniObjectCopyFunction)
-> m (Maybe MiniObjectCopyFunction)
forall a b. (a -> b) -> a -> b
$ MiniObject
-> (Ptr MiniObject -> IO (Maybe MiniObjectCopyFunction))
-> IO (Maybe MiniObjectCopyFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO (Maybe MiniObjectCopyFunction))
-> IO (Maybe MiniObjectCopyFunction))
-> (Ptr MiniObject -> IO (Maybe MiniObjectCopyFunction))
-> IO (Maybe MiniObjectCopyFunction)
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
FunPtr C_MiniObjectCopyFunction
val <- Ptr (FunPtr C_MiniObjectCopyFunction)
-> IO (FunPtr C_MiniObjectCopyFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr C_MiniObjectCopyFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) :: IO (FunPtr Gst.Callbacks.C_MiniObjectCopyFunction)
Maybe MiniObjectCopyFunction
result <- FunPtr C_MiniObjectCopyFunction
-> (FunPtr C_MiniObjectCopyFunction -> IO MiniObjectCopyFunction)
-> IO (Maybe MiniObjectCopyFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MiniObjectCopyFunction
val ((FunPtr C_MiniObjectCopyFunction -> IO MiniObjectCopyFunction)
-> IO (Maybe MiniObjectCopyFunction))
-> (FunPtr C_MiniObjectCopyFunction -> IO MiniObjectCopyFunction)
-> IO (Maybe MiniObjectCopyFunction)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_MiniObjectCopyFunction
val' -> do
let val'' :: MiniObjectCopyFunction
val'' = FunPtr C_MiniObjectCopyFunction -> MiniObjectCopyFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MiniObjectCopyFunction -> MiniObject -> m MiniObject
Gst.Callbacks.dynamic_MiniObjectCopyFunction FunPtr C_MiniObjectCopyFunction
val'
MiniObjectCopyFunction -> IO MiniObjectCopyFunction
forall (m :: * -> *) a. Monad m => a -> m a
return MiniObjectCopyFunction
val''
Maybe MiniObjectCopyFunction -> IO (Maybe MiniObjectCopyFunction)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MiniObjectCopyFunction
result
setMiniObjectCopy :: MonadIO m => MiniObject -> FunPtr Gst.Callbacks.C_MiniObjectCopyFunction -> m ()
setMiniObjectCopy :: forall (m :: * -> *).
MonadIO m =>
MiniObject -> FunPtr C_MiniObjectCopyFunction -> m ()
setMiniObjectCopy MiniObject
s FunPtr C_MiniObjectCopyFunction
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr (FunPtr C_MiniObjectCopyFunction)
-> FunPtr C_MiniObjectCopyFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr C_MiniObjectCopyFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (FunPtr C_MiniObjectCopyFunction
val :: FunPtr Gst.Callbacks.C_MiniObjectCopyFunction)
clearMiniObjectCopy :: MonadIO m => MiniObject -> m ()
clearMiniObjectCopy :: forall (m :: * -> *). MonadIO m => MiniObject -> m ()
clearMiniObjectCopy MiniObject
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr (FunPtr C_MiniObjectCopyFunction)
-> FunPtr C_MiniObjectCopyFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr C_MiniObjectCopyFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24) (FunPtr C_MiniObjectCopyFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MiniObjectCopyFunction)
#if defined(ENABLE_OVERLOADING)
data MiniObjectCopyFieldInfo
instance AttrInfo MiniObjectCopyFieldInfo where
type AttrBaseTypeConstraint MiniObjectCopyFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectCopyFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MiniObjectCopyFieldInfo = (~) (FunPtr Gst.Callbacks.C_MiniObjectCopyFunction)
type AttrTransferTypeConstraint MiniObjectCopyFieldInfo = (~)Gst.Callbacks.MiniObjectCopyFunction
type AttrTransferType MiniObjectCopyFieldInfo = (FunPtr Gst.Callbacks.C_MiniObjectCopyFunction)
type AttrGetType MiniObjectCopyFieldInfo = Maybe Gst.Callbacks.MiniObjectCopyFunction
type AttrLabel MiniObjectCopyFieldInfo = "copy"
type AttrOrigin MiniObjectCopyFieldInfo = MiniObject
attrGet = getMiniObjectCopy
attrSet = setMiniObjectCopy
attrConstruct = undefined
attrClear = clearMiniObjectCopy
attrTransfer _ v = do
Gst.Callbacks.mk_MiniObjectCopyFunction (Gst.Callbacks.wrap_MiniObjectCopyFunction Nothing v)
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.copy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:copy"
})
miniObject_copy :: AttrLabelProxy "copy"
miniObject_copy = AttrLabelProxy
#endif
getMiniObjectDispose :: MonadIO m => MiniObject -> m (Maybe Gst.Callbacks.MiniObjectDisposeFunction)
getMiniObjectDispose :: forall (m :: * -> *).
MonadIO m =>
MiniObject -> m (Maybe MiniObjectDisposeFunction)
getMiniObjectDispose MiniObject
s = IO (Maybe MiniObjectDisposeFunction)
-> m (Maybe MiniObjectDisposeFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MiniObjectDisposeFunction)
-> m (Maybe MiniObjectDisposeFunction))
-> IO (Maybe MiniObjectDisposeFunction)
-> m (Maybe MiniObjectDisposeFunction)
forall a b. (a -> b) -> a -> b
$ MiniObject
-> (Ptr MiniObject -> IO (Maybe MiniObjectDisposeFunction))
-> IO (Maybe MiniObjectDisposeFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO (Maybe MiniObjectDisposeFunction))
-> IO (Maybe MiniObjectDisposeFunction))
-> (Ptr MiniObject -> IO (Maybe MiniObjectDisposeFunction))
-> IO (Maybe MiniObjectDisposeFunction)
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
FunPtr C_MiniObjectDisposeFunction
val <- Ptr (FunPtr C_MiniObjectDisposeFunction)
-> IO (FunPtr C_MiniObjectDisposeFunction)
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr C_MiniObjectDisposeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) :: IO (FunPtr Gst.Callbacks.C_MiniObjectDisposeFunction)
Maybe MiniObjectDisposeFunction
result <- FunPtr C_MiniObjectDisposeFunction
-> (FunPtr C_MiniObjectDisposeFunction
-> IO MiniObjectDisposeFunction)
-> IO (Maybe MiniObjectDisposeFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr C_MiniObjectDisposeFunction
val ((FunPtr C_MiniObjectDisposeFunction
-> IO MiniObjectDisposeFunction)
-> IO (Maybe MiniObjectDisposeFunction))
-> (FunPtr C_MiniObjectDisposeFunction
-> IO MiniObjectDisposeFunction)
-> IO (Maybe MiniObjectDisposeFunction)
forall a b. (a -> b) -> a -> b
$ \FunPtr C_MiniObjectDisposeFunction
val' -> do
let val'' :: MiniObjectDisposeFunction
val'' = FunPtr C_MiniObjectDisposeFunction -> MiniObjectDisposeFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr C_MiniObjectDisposeFunction -> MiniObject -> m Bool
Gst.Callbacks.dynamic_MiniObjectDisposeFunction FunPtr C_MiniObjectDisposeFunction
val'
MiniObjectDisposeFunction -> IO MiniObjectDisposeFunction
forall (m :: * -> *) a. Monad m => a -> m a
return MiniObjectDisposeFunction
val''
Maybe MiniObjectDisposeFunction
-> IO (Maybe MiniObjectDisposeFunction)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MiniObjectDisposeFunction
result
setMiniObjectDispose :: MonadIO m => MiniObject -> FunPtr Gst.Callbacks.C_MiniObjectDisposeFunction -> m ()
setMiniObjectDispose :: forall (m :: * -> *).
MonadIO m =>
MiniObject -> FunPtr C_MiniObjectDisposeFunction -> m ()
setMiniObjectDispose MiniObject
s FunPtr C_MiniObjectDisposeFunction
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr (FunPtr C_MiniObjectDisposeFunction)
-> FunPtr C_MiniObjectDisposeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr C_MiniObjectDisposeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (FunPtr C_MiniObjectDisposeFunction
val :: FunPtr Gst.Callbacks.C_MiniObjectDisposeFunction)
clearMiniObjectDispose :: MonadIO m => MiniObject -> m ()
clearMiniObjectDispose :: forall (m :: * -> *). MonadIO m => MiniObject -> m ()
clearMiniObjectDispose MiniObject
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr (FunPtr C_MiniObjectDisposeFunction)
-> FunPtr C_MiniObjectDisposeFunction -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr C_MiniObjectDisposeFunction)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32) (FunPtr C_MiniObjectDisposeFunction
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MiniObjectDisposeFunction)
#if defined(ENABLE_OVERLOADING)
data MiniObjectDisposeFieldInfo
instance AttrInfo MiniObjectDisposeFieldInfo where
type AttrBaseTypeConstraint MiniObjectDisposeFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectDisposeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MiniObjectDisposeFieldInfo = (~) (FunPtr Gst.Callbacks.C_MiniObjectDisposeFunction)
type AttrTransferTypeConstraint MiniObjectDisposeFieldInfo = (~)Gst.Callbacks.MiniObjectDisposeFunction
type AttrTransferType MiniObjectDisposeFieldInfo = (FunPtr Gst.Callbacks.C_MiniObjectDisposeFunction)
type AttrGetType MiniObjectDisposeFieldInfo = Maybe Gst.Callbacks.MiniObjectDisposeFunction
type AttrLabel MiniObjectDisposeFieldInfo = "dispose"
type AttrOrigin MiniObjectDisposeFieldInfo = MiniObject
attrGet = getMiniObjectDispose
attrSet = setMiniObjectDispose
attrConstruct = undefined
attrClear = clearMiniObjectDispose
attrTransfer _ v = do
Gst.Callbacks.mk_MiniObjectDisposeFunction (Gst.Callbacks.wrap_MiniObjectDisposeFunction Nothing v)
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.dispose"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:dispose"
})
miniObject_dispose :: AttrLabelProxy "dispose"
miniObject_dispose = AttrLabelProxy
#endif
getMiniObjectFree :: MonadIO m => MiniObject -> m (Maybe Gst.Callbacks.MiniObjectFreeFunction)
getMiniObjectFree :: forall (m :: * -> *).
MonadIO m =>
MiniObject -> m (Maybe MiniObjectFreeFunction)
getMiniObjectFree MiniObject
s = IO (Maybe MiniObjectFreeFunction)
-> m (Maybe MiniObjectFreeFunction)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MiniObjectFreeFunction)
-> m (Maybe MiniObjectFreeFunction))
-> IO (Maybe MiniObjectFreeFunction)
-> m (Maybe MiniObjectFreeFunction)
forall a b. (a -> b) -> a -> b
$ MiniObject
-> (Ptr MiniObject -> IO (Maybe MiniObjectFreeFunction))
-> IO (Maybe MiniObjectFreeFunction)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO (Maybe MiniObjectFreeFunction))
-> IO (Maybe MiniObjectFreeFunction))
-> (Ptr MiniObject -> IO (Maybe MiniObjectFreeFunction))
-> IO (Maybe MiniObjectFreeFunction)
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
FunPtr (Ptr MiniObject -> IO ())
val <- Ptr (FunPtr (Ptr MiniObject -> IO ()))
-> IO (FunPtr (Ptr MiniObject -> IO ()))
forall a. Storable a => Ptr a -> IO a
peek (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr (Ptr MiniObject -> IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) :: IO (FunPtr Gst.Callbacks.C_MiniObjectFreeFunction)
Maybe MiniObjectFreeFunction
result <- FunPtr (Ptr MiniObject -> IO ())
-> (FunPtr (Ptr MiniObject -> IO ()) -> IO MiniObjectFreeFunction)
-> IO (Maybe MiniObjectFreeFunction)
forall a b. FunPtr a -> (FunPtr a -> IO b) -> IO (Maybe b)
SP.convertFunPtrIfNonNull FunPtr (Ptr MiniObject -> IO ())
val ((FunPtr (Ptr MiniObject -> IO ()) -> IO MiniObjectFreeFunction)
-> IO (Maybe MiniObjectFreeFunction))
-> (FunPtr (Ptr MiniObject -> IO ()) -> IO MiniObjectFreeFunction)
-> IO (Maybe MiniObjectFreeFunction)
forall a b. (a -> b) -> a -> b
$ \FunPtr (Ptr MiniObject -> IO ())
val' -> do
let val'' :: MiniObjectFreeFunction
val'' = FunPtr (Ptr MiniObject -> IO ()) -> MiniObjectFreeFunction
forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
FunPtr (Ptr MiniObject -> IO ()) -> MiniObject -> m ()
Gst.Callbacks.dynamic_MiniObjectFreeFunction FunPtr (Ptr MiniObject -> IO ())
val'
MiniObjectFreeFunction -> IO MiniObjectFreeFunction
forall (m :: * -> *) a. Monad m => a -> m a
return MiniObjectFreeFunction
val''
Maybe MiniObjectFreeFunction -> IO (Maybe MiniObjectFreeFunction)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MiniObjectFreeFunction
result
setMiniObjectFree :: MonadIO m => MiniObject -> FunPtr Gst.Callbacks.C_MiniObjectFreeFunction -> m ()
setMiniObjectFree :: forall (m :: * -> *).
MonadIO m =>
MiniObject -> FunPtr (Ptr MiniObject -> IO ()) -> m ()
setMiniObjectFree MiniObject
s FunPtr (Ptr MiniObject -> IO ())
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr (FunPtr (Ptr MiniObject -> IO ()))
-> FunPtr (Ptr MiniObject -> IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr (Ptr MiniObject -> IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (FunPtr (Ptr MiniObject -> IO ())
val :: FunPtr Gst.Callbacks.C_MiniObjectFreeFunction)
clearMiniObjectFree :: MonadIO m => MiniObject -> m ()
clearMiniObjectFree :: forall (m :: * -> *). MonadIO m => MiniObject -> m ()
clearMiniObjectFree MiniObject
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ MiniObject -> (Ptr MiniObject -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr MiniObject
s ((Ptr MiniObject -> IO ()) -> IO ())
-> (Ptr MiniObject -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MiniObject
ptr -> do
Ptr (FunPtr (Ptr MiniObject -> IO ()))
-> FunPtr (Ptr MiniObject -> IO ()) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr MiniObject
ptr Ptr MiniObject -> Int -> Ptr (FunPtr (Ptr MiniObject -> IO ()))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40) (FunPtr (Ptr MiniObject -> IO ())
forall a. FunPtr a
FP.nullFunPtr :: FunPtr Gst.Callbacks.C_MiniObjectFreeFunction)
#if defined(ENABLE_OVERLOADING)
data MiniObjectFreeFieldInfo
instance AttrInfo MiniObjectFreeFieldInfo where
type AttrBaseTypeConstraint MiniObjectFreeFieldInfo = (~) MiniObject
type AttrAllowedOps MiniObjectFreeFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MiniObjectFreeFieldInfo = (~) (FunPtr Gst.Callbacks.C_MiniObjectFreeFunction)
type AttrTransferTypeConstraint MiniObjectFreeFieldInfo = (~)Gst.Callbacks.MiniObjectFreeFunction
type AttrTransferType MiniObjectFreeFieldInfo = (FunPtr Gst.Callbacks.C_MiniObjectFreeFunction)
type AttrGetType MiniObjectFreeFieldInfo = Maybe Gst.Callbacks.MiniObjectFreeFunction
type AttrLabel MiniObjectFreeFieldInfo = "free"
type AttrOrigin MiniObjectFreeFieldInfo = MiniObject
attrGet = getMiniObjectFree
attrSet = setMiniObjectFree
attrConstruct = undefined
attrClear = clearMiniObjectFree
attrTransfer _ v = do
Gst.Callbacks.mk_MiniObjectFreeFunction (Gst.Callbacks.wrap_MiniObjectFreeFunction Nothing v)
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.free"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#g:attr:free"
})
miniObject_free :: AttrLabelProxy "free"
miniObject_free = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MiniObject
type instance O.AttributeList MiniObject = MiniObjectAttributeList
type MiniObjectAttributeList = ('[ '("type", MiniObjectTypeFieldInfo), '("refcount", MiniObjectRefcountFieldInfo), '("lockstate", MiniObjectLockstateFieldInfo), '("flags", MiniObjectFlagsFieldInfo), '("copy", MiniObjectCopyFieldInfo), '("dispose", MiniObjectDisposeFieldInfo), '("free", MiniObjectFreeFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_mini_object_add_parent" gst_mini_object_add_parent ::
Ptr MiniObject ->
Ptr MiniObject ->
IO ()
miniObjectAddParent ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> MiniObject
-> m ()
miniObjectAddParent :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> MiniObject -> m ()
miniObjectAddParent MiniObject
object MiniObject
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
Ptr MiniObject
parent' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
parent
Ptr MiniObject -> Ptr MiniObject -> IO ()
gst_mini_object_add_parent Ptr MiniObject
object' Ptr MiniObject
parent'
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
parent
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MiniObjectAddParentMethodInfo
instance (signature ~ (MiniObject -> m ()), MonadIO m) => O.OverloadedMethod MiniObjectAddParentMethodInfo MiniObject signature where
overloadedMethod = miniObjectAddParent
instance O.OverloadedMethodInfo MiniObjectAddParentMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectAddParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectAddParent"
})
#endif
foreign import ccall "gst_mini_object_get_qdata" gst_mini_object_get_qdata ::
Ptr MiniObject ->
Word32 ->
IO (Ptr ())
miniObjectGetQdata ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> Word32
-> m (Ptr ())
miniObjectGetQdata :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> Word32 -> m (Ptr ())
miniObjectGetQdata MiniObject
object Word32
quark = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
Ptr ()
result <- Ptr MiniObject -> Word32 -> IO (Ptr ())
gst_mini_object_get_qdata Ptr MiniObject
object' Word32
quark
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
#if defined(ENABLE_OVERLOADING)
data MiniObjectGetQdataMethodInfo
instance (signature ~ (Word32 -> m (Ptr ())), MonadIO m) => O.OverloadedMethod MiniObjectGetQdataMethodInfo MiniObject signature where
overloadedMethod = miniObjectGetQdata
instance O.OverloadedMethodInfo MiniObjectGetQdataMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectGetQdata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectGetQdata"
})
#endif
foreign import ccall "gst_mini_object_is_writable" gst_mini_object_is_writable ::
Ptr MiniObject ->
IO CInt
miniObjectIsWritable ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> m Bool
miniObjectIsWritable :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> m Bool
miniObjectIsWritable MiniObject
miniObject = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
miniObject' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
miniObject
CInt
result <- C_MiniObjectDisposeFunction
gst_mini_object_is_writable Ptr MiniObject
miniObject'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
miniObject
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MiniObjectIsWritableMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.OverloadedMethod MiniObjectIsWritableMethodInfo MiniObject signature where
overloadedMethod = miniObjectIsWritable
instance O.OverloadedMethodInfo MiniObjectIsWritableMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectIsWritable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectIsWritable"
})
#endif
foreign import ccall "gst_mini_object_lock" gst_mini_object_lock ::
Ptr MiniObject ->
CUInt ->
IO CInt
miniObjectLock ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> [Gst.Flags.LockFlags]
-> m Bool
miniObjectLock :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> [LockFlags] -> m Bool
miniObjectLock MiniObject
object [LockFlags]
flags = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
let flags' :: CUInt
flags' = [LockFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [LockFlags]
flags
CInt
result <- Ptr MiniObject -> CUInt -> IO CInt
gst_mini_object_lock Ptr MiniObject
object' CUInt
flags'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MiniObjectLockMethodInfo
instance (signature ~ ([Gst.Flags.LockFlags] -> m Bool), MonadIO m) => O.OverloadedMethod MiniObjectLockMethodInfo MiniObject signature where
overloadedMethod = miniObjectLock
instance O.OverloadedMethodInfo MiniObjectLockMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectLock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectLock"
})
#endif
foreign import ccall "gst_mini_object_remove_parent" gst_mini_object_remove_parent ::
Ptr MiniObject ->
Ptr MiniObject ->
IO ()
miniObjectRemoveParent ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> MiniObject
-> m ()
miniObjectRemoveParent :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> MiniObject -> m ()
miniObjectRemoveParent MiniObject
object MiniObject
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
Ptr MiniObject
parent' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
parent
Ptr MiniObject -> Ptr MiniObject -> IO ()
gst_mini_object_remove_parent Ptr MiniObject
object' Ptr MiniObject
parent'
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
parent
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MiniObjectRemoveParentMethodInfo
instance (signature ~ (MiniObject -> m ()), MonadIO m) => O.OverloadedMethod MiniObjectRemoveParentMethodInfo MiniObject signature where
overloadedMethod = miniObjectRemoveParent
instance O.OverloadedMethodInfo MiniObjectRemoveParentMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectRemoveParent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectRemoveParent"
})
#endif
foreign import ccall "gst_mini_object_set_qdata" gst_mini_object_set_qdata ::
Ptr MiniObject ->
Word32 ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
miniObjectSetQdata ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> Word32
-> Ptr ()
-> GLib.Callbacks.DestroyNotify
-> m ()
miniObjectSetQdata :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> Word32 -> Ptr () -> DestroyNotify -> m ()
miniObjectSetQdata MiniObject
object Word32
quark Ptr ()
data_ DestroyNotify
destroy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
Ptr (FunPtr DestroyNotify)
ptrdestroy <- IO (Ptr (FunPtr DestroyNotify))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr GLib.Callbacks.C_DestroyNotify))
FunPtr DestroyNotify
destroy' <- DestroyNotify -> IO (FunPtr DestroyNotify)
GLib.Callbacks.mk_DestroyNotify (Maybe (Ptr (FunPtr DestroyNotify))
-> DestroyNotify -> DestroyNotify
GLib.Callbacks.wrap_DestroyNotify (Ptr (FunPtr DestroyNotify) -> Maybe (Ptr (FunPtr DestroyNotify))
forall a. a -> Maybe a
Just Ptr (FunPtr DestroyNotify)
ptrdestroy) DestroyNotify
destroy)
Ptr (FunPtr DestroyNotify) -> FunPtr DestroyNotify -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr DestroyNotify)
ptrdestroy FunPtr DestroyNotify
destroy'
Ptr MiniObject -> Word32 -> Ptr () -> FunPtr DestroyNotify -> IO ()
gst_mini_object_set_qdata Ptr MiniObject
object' Word32
quark Ptr ()
data_ FunPtr DestroyNotify
destroy'
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MiniObjectSetQdataMethodInfo
instance (signature ~ (Word32 -> Ptr () -> GLib.Callbacks.DestroyNotify -> m ()), MonadIO m) => O.OverloadedMethod MiniObjectSetQdataMethodInfo MiniObject signature where
overloadedMethod = miniObjectSetQdata
instance O.OverloadedMethodInfo MiniObjectSetQdataMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectSetQdata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectSetQdata"
})
#endif
foreign import ccall "gst_mini_object_steal_qdata" gst_mini_object_steal_qdata ::
Ptr MiniObject ->
Word32 ->
IO (Ptr ())
miniObjectStealQdata ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> Word32
-> m (Ptr ())
miniObjectStealQdata :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> Word32 -> m (Ptr ())
miniObjectStealQdata MiniObject
object Word32
quark = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
Ptr ()
result <- Ptr MiniObject -> Word32 -> IO (Ptr ())
gst_mini_object_steal_qdata Ptr MiniObject
object' Word32
quark
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
result
#if defined(ENABLE_OVERLOADING)
data MiniObjectStealQdataMethodInfo
instance (signature ~ (Word32 -> m (Ptr ())), MonadIO m) => O.OverloadedMethod MiniObjectStealQdataMethodInfo MiniObject signature where
overloadedMethod = miniObjectStealQdata
instance O.OverloadedMethodInfo MiniObjectStealQdataMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectStealQdata",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectStealQdata"
})
#endif
foreign import ccall "gst_mini_object_unlock" gst_mini_object_unlock ::
Ptr MiniObject ->
CUInt ->
IO ()
miniObjectUnlock ::
(B.CallStack.HasCallStack, MonadIO m) =>
MiniObject
-> [Gst.Flags.LockFlags]
-> m ()
miniObjectUnlock :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MiniObject -> [LockFlags] -> m ()
miniObjectUnlock MiniObject
object [LockFlags]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MiniObject
object' <- MiniObject -> IO (Ptr MiniObject)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MiniObject
object
let flags' :: CUInt
flags' = [LockFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [LockFlags]
flags
Ptr MiniObject -> CUInt -> IO ()
gst_mini_object_unlock Ptr MiniObject
object' CUInt
flags'
MiniObjectFreeFunction
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MiniObject
object
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MiniObjectUnlockMethodInfo
instance (signature ~ ([Gst.Flags.LockFlags] -> m ()), MonadIO m) => O.OverloadedMethod MiniObjectUnlockMethodInfo MiniObject signature where
overloadedMethod = miniObjectUnlock
instance O.OverloadedMethodInfo MiniObjectUnlockMethodInfo MiniObject where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gst.Structs.MiniObject.miniObjectUnlock",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gst-1.0.25/docs/GI-Gst-Structs-MiniObject.html#v:miniObjectUnlock"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveMiniObjectMethod (t :: Symbol) (o :: *) :: * where
ResolveMiniObjectMethod "addParent" o = MiniObjectAddParentMethodInfo
ResolveMiniObjectMethod "isWritable" o = MiniObjectIsWritableMethodInfo
ResolveMiniObjectMethod "lock" o = MiniObjectLockMethodInfo
ResolveMiniObjectMethod "removeParent" o = MiniObjectRemoveParentMethodInfo
ResolveMiniObjectMethod "stealQdata" o = MiniObjectStealQdataMethodInfo
ResolveMiniObjectMethod "unlock" o = MiniObjectUnlockMethodInfo
ResolveMiniObjectMethod "getQdata" o = MiniObjectGetQdataMethodInfo
ResolveMiniObjectMethod "setQdata" o = MiniObjectSetQdataMethodInfo
ResolveMiniObjectMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMiniObjectMethod t MiniObject, O.OverloadedMethod info MiniObject p) => OL.IsLabel t (MiniObject -> 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 ~ ResolveMiniObjectMethod t MiniObject, O.OverloadedMethod info MiniObject p, R.HasField t MiniObject p) => R.HasField t MiniObject p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveMiniObjectMethod t MiniObject, O.OverloadedMethodInfo info MiniObject) => OL.IsLabel t (O.MethodProxy info MiniObject) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif