#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GES.Callbacks
(
BaseEffectTimeTranslationFunc ,
BaseEffectTimeTranslationFunc_WithClosures,
C_BaseEffectTimeTranslationFunc ,
drop_closures_BaseEffectTimeTranslationFunc,
dynamic_BaseEffectTimeTranslationFunc ,
genClosure_BaseEffectTimeTranslationFunc,
mk_BaseEffectTimeTranslationFunc ,
noBaseEffectTimeTranslationFunc ,
noBaseEffectTimeTranslationFunc_WithClosures,
wrap_BaseEffectTimeTranslationFunc ,
C_CreateTrackElementFunc ,
CreateTrackElementFunc ,
dynamic_CreateTrackElementFunc ,
genClosure_CreateTrackElementFunc ,
mk_CreateTrackElementFunc ,
noCreateTrackElementFunc ,
wrap_CreateTrackElementFunc ,
C_CreateTrackElementsFunc ,
CreateTrackElementsFunc ,
dynamic_CreateTrackElementsFunc ,
genClosure_CreateTrackElementsFunc ,
mk_CreateTrackElementsFunc ,
noCreateTrackElementsFunc ,
wrap_CreateTrackElementsFunc ,
C_ExtractableCheckId ,
ExtractableCheckId ,
dynamic_ExtractableCheckId ,
mk_ExtractableCheckId ,
noExtractableCheckId ,
C_FillTrackElementFunc ,
FillTrackElementFunc ,
dynamic_FillTrackElementFunc ,
genClosure_FillTrackElementFunc ,
mk_FillTrackElementFunc ,
noFillTrackElementFunc ,
wrap_FillTrackElementFunc ,
C_FormatterCanLoadURIMethod ,
FormatterCanLoadURIMethod ,
dynamic_FormatterCanLoadURIMethod ,
mk_FormatterCanLoadURIMethod ,
noFormatterCanLoadURIMethod ,
C_FormatterLoadFromURIMethod ,
FormatterLoadFromURIMethod ,
dynamic_FormatterLoadFromURIMethod ,
mk_FormatterLoadFromURIMethod ,
noFormatterLoadFromURIMethod ,
C_FormatterSaveToURIMethod ,
FormatterSaveToURIMethod ,
dynamic_FormatterSaveToURIMethod ,
mk_FormatterSaveToURIMethod ,
noFormatterSaveToURIMethod ,
C_MetaForeachFunc ,
MetaForeachFunc ,
MetaForeachFunc_WithClosures ,
drop_closures_MetaForeachFunc ,
dynamic_MetaForeachFunc ,
genClosure_MetaForeachFunc ,
mk_MetaForeachFunc ,
noMetaForeachFunc ,
noMetaForeachFunc_WithClosures ,
wrap_MetaForeachFunc ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import {-# SOURCE #-} qualified GI.GES.Flags as GES.Flags
import {-# SOURCE #-} qualified GI.GES.Interfaces.MetaContainer as GES.MetaContainer
import {-# SOURCE #-} qualified GI.GES.Objects.BaseEffect as GES.BaseEffect
import {-# SOURCE #-} qualified GI.GES.Objects.Clip as GES.Clip
import {-# SOURCE #-} qualified GI.GES.Objects.Formatter as GES.Formatter
import {-# SOURCE #-} qualified GI.GES.Objects.Timeline as GES.Timeline
import {-# SOURCE #-} qualified GI.GES.Objects.TrackElement as GES.TrackElement
import qualified GI.Gst.Objects.Element as Gst.Element
type C_MetaForeachFunc =
Ptr GES.MetaContainer.MetaContainer ->
CString ->
Ptr GValue ->
Ptr () ->
IO ()
foreign import ccall "dynamic" __dynamic_C_MetaForeachFunc :: FunPtr C_MetaForeachFunc -> C_MetaForeachFunc
dynamic_MetaForeachFunc ::
(B.CallStack.HasCallStack, MonadIO m, GES.MetaContainer.IsMetaContainer a) =>
FunPtr C_MetaForeachFunc
-> a
-> T.Text
-> GValue
-> Ptr ()
-> m ()
dynamic_MetaForeachFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsMetaContainer a) =>
FunPtr C_MetaForeachFunc -> a -> Text -> GValue -> Ptr () -> m ()
dynamic_MetaForeachFunc FunPtr C_MetaForeachFunc
__funPtr a
container Text
key GValue
value Ptr ()
userData = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr MetaContainer
container' <- a -> IO (Ptr MetaContainer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
container
CString
key' <- Text -> IO CString
textToCString Text
key
Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
(FunPtr C_MetaForeachFunc -> C_MetaForeachFunc
__dynamic_C_MetaForeachFunc FunPtr C_MetaForeachFunc
__funPtr) Ptr MetaContainer
container' CString
key' Ptr GValue
value' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
container
GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
key'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
foreign import ccall "wrapper"
mk_MetaForeachFunc :: C_MetaForeachFunc -> IO (FunPtr C_MetaForeachFunc)
type MetaForeachFunc =
GES.MetaContainer.MetaContainer
-> T.Text
-> GValue
-> IO ()
noMetaForeachFunc :: Maybe MetaForeachFunc
noMetaForeachFunc :: Maybe MetaForeachFunc
noMetaForeachFunc = Maybe MetaForeachFunc
forall a. Maybe a
Nothing
type MetaForeachFunc_WithClosures =
GES.MetaContainer.MetaContainer
-> T.Text
-> GValue
-> Ptr ()
-> IO ()
noMetaForeachFunc_WithClosures :: Maybe MetaForeachFunc_WithClosures
noMetaForeachFunc_WithClosures :: Maybe MetaForeachFunc_WithClosures
noMetaForeachFunc_WithClosures = Maybe MetaForeachFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_MetaForeachFunc :: MetaForeachFunc -> MetaForeachFunc_WithClosures
drop_closures_MetaForeachFunc :: MetaForeachFunc -> MetaForeachFunc_WithClosures
drop_closures_MetaForeachFunc MetaForeachFunc
_f MetaContainer
container Text
key GValue
value Ptr ()
_ = MetaForeachFunc
_f MetaContainer
container Text
key GValue
value
genClosure_MetaForeachFunc :: MonadIO m => MetaForeachFunc -> m (GClosure C_MetaForeachFunc)
genClosure_MetaForeachFunc :: forall (m :: * -> *).
MonadIO m =>
MetaForeachFunc -> m (GClosure C_MetaForeachFunc)
genClosure_MetaForeachFunc MetaForeachFunc
cb = IO (GClosure C_MetaForeachFunc) -> m (GClosure C_MetaForeachFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_MetaForeachFunc) -> m (GClosure C_MetaForeachFunc))
-> IO (GClosure C_MetaForeachFunc)
-> m (GClosure C_MetaForeachFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: MetaForeachFunc_WithClosures
cb' = MetaForeachFunc -> MetaForeachFunc_WithClosures
drop_closures_MetaForeachFunc MetaForeachFunc
cb
let cb'' :: C_MetaForeachFunc
cb'' = Maybe (Ptr (FunPtr C_MetaForeachFunc))
-> MetaForeachFunc_WithClosures -> C_MetaForeachFunc
wrap_MetaForeachFunc Maybe (Ptr (FunPtr C_MetaForeachFunc))
forall a. Maybe a
Nothing MetaForeachFunc_WithClosures
cb'
C_MetaForeachFunc -> IO (FunPtr C_MetaForeachFunc)
mk_MetaForeachFunc C_MetaForeachFunc
cb'' IO (FunPtr C_MetaForeachFunc)
-> (FunPtr C_MetaForeachFunc -> IO (GClosure C_MetaForeachFunc))
-> IO (GClosure C_MetaForeachFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_MetaForeachFunc -> IO (GClosure C_MetaForeachFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_MetaForeachFunc ::
Maybe (Ptr (FunPtr C_MetaForeachFunc)) ->
MetaForeachFunc_WithClosures ->
C_MetaForeachFunc
wrap_MetaForeachFunc :: Maybe (Ptr (FunPtr C_MetaForeachFunc))
-> MetaForeachFunc_WithClosures -> C_MetaForeachFunc
wrap_MetaForeachFunc Maybe (Ptr (FunPtr C_MetaForeachFunc))
gi'funptrptr MetaForeachFunc_WithClosures
gi'cb Ptr MetaContainer
container CString
key Ptr GValue
value Ptr ()
userData = do
MetaContainer
container' <- ((ManagedPtr MetaContainer -> MetaContainer)
-> Ptr MetaContainer -> IO MetaContainer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr MetaContainer -> MetaContainer
GES.MetaContainer.MetaContainer) Ptr MetaContainer
container
Text
key' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
key
GValue
value' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
value
MetaForeachFunc_WithClosures
gi'cb MetaContainer
container' Text
key' GValue
value' Ptr ()
userData
Maybe (Ptr (FunPtr C_MetaForeachFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_MetaForeachFunc))
gi'funptrptr
type C_FormatterSaveToURIMethod =
Ptr GES.Formatter.Formatter ->
Ptr GES.Timeline.Timeline ->
CString ->
CInt ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_FormatterSaveToURIMethod :: FunPtr C_FormatterSaveToURIMethod -> C_FormatterSaveToURIMethod
dynamic_FormatterSaveToURIMethod ::
(B.CallStack.HasCallStack, MonadIO m, GES.Formatter.IsFormatter a, GES.Timeline.IsTimeline b) =>
FunPtr C_FormatterSaveToURIMethod
-> a
-> b
-> T.Text
-> Bool
-> m ()
dynamic_FormatterSaveToURIMethod :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFormatter a, IsTimeline b) =>
FunPtr C_FormatterSaveToURIMethod -> a -> b -> Text -> Bool -> m ()
dynamic_FormatterSaveToURIMethod FunPtr C_FormatterSaveToURIMethod
__funPtr a
formatter b
timeline Text
uri Bool
overwrite = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Formatter
formatter' <- a -> IO (Ptr Formatter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
formatter
Ptr Timeline
timeline' <- b -> IO (Ptr Timeline)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
timeline
CString
uri' <- Text -> IO CString
textToCString Text
uri
let overwrite' :: CInt
overwrite' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
overwrite
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_FormatterSaveToURIMethod -> C_FormatterSaveToURIMethod
__dynamic_C_FormatterSaveToURIMethod FunPtr C_FormatterSaveToURIMethod
__funPtr) Ptr Formatter
formatter' Ptr Timeline
timeline' CString
uri' CInt
overwrite'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
formatter
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
timeline
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
foreign import ccall "wrapper"
mk_FormatterSaveToURIMethod :: C_FormatterSaveToURIMethod -> IO (FunPtr C_FormatterSaveToURIMethod)
type FormatterSaveToURIMethod =
GES.Formatter.Formatter
-> GES.Timeline.Timeline
-> T.Text
-> Bool
-> IO ()
noFormatterSaveToURIMethod :: Maybe FormatterSaveToURIMethod
noFormatterSaveToURIMethod :: Maybe FormatterSaveToURIMethod
noFormatterSaveToURIMethod = Maybe FormatterSaveToURIMethod
forall a. Maybe a
Nothing
type C_FormatterLoadFromURIMethod =
Ptr GES.Formatter.Formatter ->
Ptr GES.Timeline.Timeline ->
CString ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_FormatterLoadFromURIMethod :: FunPtr C_FormatterLoadFromURIMethod -> C_FormatterLoadFromURIMethod
dynamic_FormatterLoadFromURIMethod ::
(B.CallStack.HasCallStack, MonadIO m, GES.Formatter.IsFormatter a, GES.Timeline.IsTimeline b) =>
FunPtr C_FormatterLoadFromURIMethod
-> a
-> b
-> T.Text
-> m ()
dynamic_FormatterLoadFromURIMethod :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFormatter a, IsTimeline b) =>
FunPtr C_FormatterLoadFromURIMethod -> a -> b -> Text -> m ()
dynamic_FormatterLoadFromURIMethod FunPtr C_FormatterLoadFromURIMethod
__funPtr a
formatter b
timeline Text
uri = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Formatter
formatter' <- a -> IO (Ptr Formatter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
formatter
Ptr Timeline
timeline' <- b -> IO (Ptr Timeline)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
timeline
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_FormatterLoadFromURIMethod -> C_FormatterLoadFromURIMethod
__dynamic_C_FormatterLoadFromURIMethod FunPtr C_FormatterLoadFromURIMethod
__funPtr) Ptr Formatter
formatter' Ptr Timeline
timeline' CString
uri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
formatter
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
timeline
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
foreign import ccall "wrapper"
mk_FormatterLoadFromURIMethod :: C_FormatterLoadFromURIMethod -> IO (FunPtr C_FormatterLoadFromURIMethod)
type FormatterLoadFromURIMethod =
GES.Formatter.Formatter
-> GES.Timeline.Timeline
-> T.Text
-> IO ()
noFormatterLoadFromURIMethod :: Maybe FormatterLoadFromURIMethod
noFormatterLoadFromURIMethod :: Maybe FormatterLoadFromURIMethod
noFormatterLoadFromURIMethod = Maybe FormatterLoadFromURIMethod
forall a. Maybe a
Nothing
type C_FormatterCanLoadURIMethod =
Ptr GES.Formatter.Formatter ->
CString ->
Ptr (Ptr GError) ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_FormatterCanLoadURIMethod :: FunPtr C_FormatterCanLoadURIMethod -> C_FormatterCanLoadURIMethod
dynamic_FormatterCanLoadURIMethod ::
(B.CallStack.HasCallStack, MonadIO m, GES.Formatter.IsFormatter a) =>
FunPtr C_FormatterCanLoadURIMethod
-> a
-> T.Text
-> m ()
dynamic_FormatterCanLoadURIMethod :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFormatter a) =>
FunPtr C_FormatterCanLoadURIMethod -> a -> Text -> m ()
dynamic_FormatterCanLoadURIMethod FunPtr C_FormatterCanLoadURIMethod
__funPtr a
dummyInstance Text
uri = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Formatter
dummyInstance' <- a -> IO (Ptr Formatter)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
dummyInstance
CString
uri' <- Text -> IO CString
textToCString Text
uri
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (FunPtr C_FormatterCanLoadURIMethod -> C_FormatterCanLoadURIMethod
__dynamic_C_FormatterCanLoadURIMethod FunPtr C_FormatterCanLoadURIMethod
__funPtr) Ptr Formatter
dummyInstance' CString
uri'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
dummyInstance
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
)
foreign import ccall "wrapper"
mk_FormatterCanLoadURIMethod :: C_FormatterCanLoadURIMethod -> IO (FunPtr C_FormatterCanLoadURIMethod)
type FormatterCanLoadURIMethod =
GES.Formatter.Formatter
-> T.Text
-> IO ()
noFormatterCanLoadURIMethod :: Maybe FormatterCanLoadURIMethod
noFormatterCanLoadURIMethod :: Maybe FormatterCanLoadURIMethod
noFormatterCanLoadURIMethod = Maybe FormatterCanLoadURIMethod
forall a. Maybe a
Nothing
type C_FillTrackElementFunc =
Ptr GES.Clip.Clip ->
Ptr GES.TrackElement.TrackElement ->
Ptr Gst.Element.Element ->
IO CInt
foreign import ccall "dynamic" __dynamic_C_FillTrackElementFunc :: FunPtr C_FillTrackElementFunc -> C_FillTrackElementFunc
dynamic_FillTrackElementFunc ::
(B.CallStack.HasCallStack, MonadIO m, GES.Clip.IsClip a, GES.TrackElement.IsTrackElement b, Gst.Element.IsElement c) =>
FunPtr C_FillTrackElementFunc
-> a
-> b
-> c
-> m Bool
dynamic_FillTrackElementFunc :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsClip a, IsTrackElement b,
IsElement c) =>
FunPtr C_FillTrackElementFunc -> a -> b -> c -> m Bool
dynamic_FillTrackElementFunc FunPtr C_FillTrackElementFunc
__funPtr a
clip b
trackElement c
nleobj = 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 Clip
clip' <- a -> IO (Ptr Clip)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
clip
Ptr TrackElement
trackElement' <- b -> IO (Ptr TrackElement)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
trackElement
Ptr Element
nleobj' <- c -> IO (Ptr Element)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
nleobj
CInt
result <- (FunPtr C_FillTrackElementFunc -> C_FillTrackElementFunc
__dynamic_C_FillTrackElementFunc FunPtr C_FillTrackElementFunc
__funPtr) Ptr Clip
clip' Ptr TrackElement
trackElement' Ptr Element
nleobj'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
clip
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
trackElement
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
nleobj
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
foreign import ccall "wrapper"
mk_FillTrackElementFunc :: C_FillTrackElementFunc -> IO (FunPtr C_FillTrackElementFunc)
{-# DEPRECATED FillTrackElementFunc ["(Since version 1.18)","This method type is no longer used."] #-}
type FillTrackElementFunc =
GES.Clip.Clip
-> GES.TrackElement.TrackElement
-> Gst.Element.Element
-> IO Bool
noFillTrackElementFunc :: Maybe FillTrackElementFunc
noFillTrackElementFunc :: Maybe FillTrackElementFunc
noFillTrackElementFunc = Maybe FillTrackElementFunc
forall a. Maybe a
Nothing
genClosure_FillTrackElementFunc :: MonadIO m => FillTrackElementFunc -> m (GClosure C_FillTrackElementFunc)
genClosure_FillTrackElementFunc :: forall (m :: * -> *).
MonadIO m =>
FillTrackElementFunc -> m (GClosure C_FillTrackElementFunc)
genClosure_FillTrackElementFunc FillTrackElementFunc
cb = IO (GClosure C_FillTrackElementFunc)
-> m (GClosure C_FillTrackElementFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_FillTrackElementFunc)
-> m (GClosure C_FillTrackElementFunc))
-> IO (GClosure C_FillTrackElementFunc)
-> m (GClosure C_FillTrackElementFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_FillTrackElementFunc
cb' = Maybe (Ptr (FunPtr C_FillTrackElementFunc))
-> FillTrackElementFunc -> C_FillTrackElementFunc
wrap_FillTrackElementFunc Maybe (Ptr (FunPtr C_FillTrackElementFunc))
forall a. Maybe a
Nothing FillTrackElementFunc
cb
C_FillTrackElementFunc -> IO (FunPtr C_FillTrackElementFunc)
mk_FillTrackElementFunc C_FillTrackElementFunc
cb' IO (FunPtr C_FillTrackElementFunc)
-> (FunPtr C_FillTrackElementFunc
-> IO (GClosure C_FillTrackElementFunc))
-> IO (GClosure C_FillTrackElementFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_FillTrackElementFunc
-> IO (GClosure C_FillTrackElementFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_FillTrackElementFunc ::
Maybe (Ptr (FunPtr C_FillTrackElementFunc)) ->
FillTrackElementFunc ->
C_FillTrackElementFunc
wrap_FillTrackElementFunc :: Maybe (Ptr (FunPtr C_FillTrackElementFunc))
-> FillTrackElementFunc -> C_FillTrackElementFunc
wrap_FillTrackElementFunc Maybe (Ptr (FunPtr C_FillTrackElementFunc))
gi'funptrptr FillTrackElementFunc
gi'cb Ptr Clip
clip Ptr TrackElement
trackElement Ptr Element
nleobj = do
Clip
clip' <- ((ManagedPtr Clip -> Clip) -> Ptr Clip -> IO Clip
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clip -> Clip
GES.Clip.Clip) Ptr Clip
clip
TrackElement
trackElement' <- ((ManagedPtr TrackElement -> TrackElement)
-> Ptr TrackElement -> IO TrackElement
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TrackElement -> TrackElement
GES.TrackElement.TrackElement) Ptr TrackElement
trackElement
Element
nleobj' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Element -> Element
Gst.Element.Element) Ptr Element
nleobj
Bool
result <- FillTrackElementFunc
gi'cb Clip
clip' TrackElement
trackElement' Element
nleobj'
Maybe (Ptr (FunPtr C_FillTrackElementFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_FillTrackElementFunc))
gi'funptrptr
let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
type =
CGType ->
CString ->
Ptr (Ptr GError) ->
IO CString
foreign import ccall "dynamic" :: FunPtr C_ExtractableCheckId -> C_ExtractableCheckId
dynamic_ExtractableCheckId ::
(B.CallStack.HasCallStack, MonadIO m) =>
FunPtr C_ExtractableCheckId
-> GType
-> T.Text
-> m T.Text
FunPtr C_ExtractableCheckId
__funPtr GType
type_ Text
id = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
CString
id' <- Text -> IO CString
textToCString Text
id
IO Text -> IO () -> IO Text
forall a b. IO a -> IO b -> IO a
onException (do
CString
result <- (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString)
-> (Ptr (Ptr GError) -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ (FunPtr C_ExtractableCheckId -> C_ExtractableCheckId
__dynamic_C_ExtractableCheckId FunPtr C_ExtractableCheckId
__funPtr) CGType
type_' CString
id'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"extractableCheckId" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
id'
)
foreign import ccall "wrapper"
:: C_ExtractableCheckId -> IO (FunPtr C_ExtractableCheckId)
type =
GType
-> T.Text
-> IO T.Text
noExtractableCheckId :: Maybe ExtractableCheckId
= Maybe ExtractableCheckId
forall a. Maybe a
Nothing
type C_CreateTrackElementsFunc =
Ptr GES.Clip.Clip ->
CUInt ->
IO (Ptr (GList (Ptr GES.TrackElement.TrackElement)))
foreign import ccall "dynamic" __dynamic_C_CreateTrackElementsFunc :: FunPtr C_CreateTrackElementsFunc -> C_CreateTrackElementsFunc
dynamic_CreateTrackElementsFunc ::
(B.CallStack.HasCallStack, MonadIO m, GES.Clip.IsClip a) =>
FunPtr C_CreateTrackElementsFunc
-> a
-> [GES.Flags.TrackType]
-> m [GES.TrackElement.TrackElement]
dynamic_CreateTrackElementsFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsClip a) =>
FunPtr C_CreateTrackElementsFunc
-> a -> [TrackType] -> m [TrackElement]
dynamic_CreateTrackElementsFunc FunPtr C_CreateTrackElementsFunc
__funPtr a
clip [TrackType]
type_ = IO [TrackElement] -> m [TrackElement]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [TrackElement] -> m [TrackElement])
-> IO [TrackElement] -> m [TrackElement]
forall a b. (a -> b) -> a -> b
$ do
Ptr Clip
clip' <- a -> IO (Ptr Clip)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
clip
let type_' :: CUInt
type_' = [TrackType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TrackType]
type_
Ptr (GList (Ptr TrackElement))
result <- (FunPtr C_CreateTrackElementsFunc -> C_CreateTrackElementsFunc
__dynamic_C_CreateTrackElementsFunc FunPtr C_CreateTrackElementsFunc
__funPtr) Ptr Clip
clip' CUInt
type_'
[Ptr TrackElement]
result' <- Ptr (GList (Ptr TrackElement)) -> IO [Ptr TrackElement]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr TrackElement))
result
[TrackElement]
result'' <- (Ptr TrackElement -> IO TrackElement)
-> [Ptr TrackElement] -> IO [TrackElement]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr TrackElement -> TrackElement)
-> Ptr TrackElement -> IO TrackElement
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TrackElement -> TrackElement
GES.TrackElement.TrackElement) [Ptr TrackElement]
result'
Ptr (GList (Ptr TrackElement)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr TrackElement))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
clip
[TrackElement] -> IO [TrackElement]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [TrackElement]
result''
foreign import ccall "wrapper"
mk_CreateTrackElementsFunc :: C_CreateTrackElementsFunc -> IO (FunPtr C_CreateTrackElementsFunc)
type CreateTrackElementsFunc =
GES.Clip.Clip
-> [GES.Flags.TrackType]
-> IO [GES.TrackElement.TrackElement]
noCreateTrackElementsFunc :: Maybe CreateTrackElementsFunc
noCreateTrackElementsFunc :: Maybe CreateTrackElementsFunc
noCreateTrackElementsFunc = Maybe CreateTrackElementsFunc
forall a. Maybe a
Nothing
genClosure_CreateTrackElementsFunc :: MonadIO m => CreateTrackElementsFunc -> m (GClosure C_CreateTrackElementsFunc)
genClosure_CreateTrackElementsFunc :: forall (m :: * -> *).
MonadIO m =>
CreateTrackElementsFunc -> m (GClosure C_CreateTrackElementsFunc)
genClosure_CreateTrackElementsFunc CreateTrackElementsFunc
cb = IO (GClosure C_CreateTrackElementsFunc)
-> m (GClosure C_CreateTrackElementsFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CreateTrackElementsFunc)
-> m (GClosure C_CreateTrackElementsFunc))
-> IO (GClosure C_CreateTrackElementsFunc)
-> m (GClosure C_CreateTrackElementsFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_CreateTrackElementsFunc
cb' = Maybe (Ptr (FunPtr C_CreateTrackElementsFunc))
-> CreateTrackElementsFunc -> C_CreateTrackElementsFunc
wrap_CreateTrackElementsFunc Maybe (Ptr (FunPtr C_CreateTrackElementsFunc))
forall a. Maybe a
Nothing CreateTrackElementsFunc
cb
C_CreateTrackElementsFunc -> IO (FunPtr C_CreateTrackElementsFunc)
mk_CreateTrackElementsFunc C_CreateTrackElementsFunc
cb' IO (FunPtr C_CreateTrackElementsFunc)
-> (FunPtr C_CreateTrackElementsFunc
-> IO (GClosure C_CreateTrackElementsFunc))
-> IO (GClosure C_CreateTrackElementsFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CreateTrackElementsFunc
-> IO (GClosure C_CreateTrackElementsFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_CreateTrackElementsFunc ::
Maybe (Ptr (FunPtr C_CreateTrackElementsFunc)) ->
CreateTrackElementsFunc ->
C_CreateTrackElementsFunc
wrap_CreateTrackElementsFunc :: Maybe (Ptr (FunPtr C_CreateTrackElementsFunc))
-> CreateTrackElementsFunc -> C_CreateTrackElementsFunc
wrap_CreateTrackElementsFunc Maybe (Ptr (FunPtr C_CreateTrackElementsFunc))
gi'funptrptr CreateTrackElementsFunc
gi'cb Ptr Clip
clip CUInt
type_ = do
Clip
clip' <- ((ManagedPtr Clip -> Clip) -> Ptr Clip -> IO Clip
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clip -> Clip
GES.Clip.Clip) Ptr Clip
clip
let type_' :: [TrackType]
type_' = CUInt -> [TrackType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
type_
[TrackElement]
result <- CreateTrackElementsFunc
gi'cb Clip
clip' [TrackType]
type_'
Maybe (Ptr (FunPtr C_CreateTrackElementsFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CreateTrackElementsFunc))
gi'funptrptr
[Ptr TrackElement]
result' <- (TrackElement -> IO (Ptr TrackElement))
-> [TrackElement] -> IO [Ptr TrackElement]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM TrackElement -> IO (Ptr TrackElement)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [TrackElement]
result
Ptr (GList (Ptr TrackElement))
result'' <- [Ptr TrackElement] -> IO (Ptr (GList (Ptr TrackElement)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr TrackElement]
result'
Ptr (GList (Ptr TrackElement))
-> IO (Ptr (GList (Ptr TrackElement)))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GList (Ptr TrackElement))
result''
type C_CreateTrackElementFunc =
Ptr GES.Clip.Clip ->
CUInt ->
IO (Ptr GES.TrackElement.TrackElement)
foreign import ccall "dynamic" __dynamic_C_CreateTrackElementFunc :: FunPtr C_CreateTrackElementFunc -> C_CreateTrackElementFunc
dynamic_CreateTrackElementFunc ::
(B.CallStack.HasCallStack, MonadIO m, GES.Clip.IsClip a) =>
FunPtr C_CreateTrackElementFunc
-> a
-> [GES.Flags.TrackType]
-> m (Maybe GES.TrackElement.TrackElement)
dynamic_CreateTrackElementFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsClip a) =>
FunPtr C_CreateTrackElementFunc
-> a -> [TrackType] -> m (Maybe TrackElement)
dynamic_CreateTrackElementFunc FunPtr C_CreateTrackElementFunc
__funPtr a
clip [TrackType]
type_ = IO (Maybe TrackElement) -> m (Maybe TrackElement)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TrackElement) -> m (Maybe TrackElement))
-> IO (Maybe TrackElement) -> m (Maybe TrackElement)
forall a b. (a -> b) -> a -> b
$ do
Ptr Clip
clip' <- a -> IO (Ptr Clip)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
clip
let type_' :: CUInt
type_' = [TrackType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [TrackType]
type_
Ptr TrackElement
result <- (FunPtr C_CreateTrackElementFunc -> C_CreateTrackElementFunc
__dynamic_C_CreateTrackElementFunc FunPtr C_CreateTrackElementFunc
__funPtr) Ptr Clip
clip' CUInt
type_'
Maybe TrackElement
maybeResult <- Ptr TrackElement
-> (Ptr TrackElement -> IO TrackElement) -> IO (Maybe TrackElement)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TrackElement
result ((Ptr TrackElement -> IO TrackElement) -> IO (Maybe TrackElement))
-> (Ptr TrackElement -> IO TrackElement) -> IO (Maybe TrackElement)
forall a b. (a -> b) -> a -> b
$ \Ptr TrackElement
result' -> do
TrackElement
result'' <- ((ManagedPtr TrackElement -> TrackElement)
-> Ptr TrackElement -> IO TrackElement
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TrackElement -> TrackElement
GES.TrackElement.TrackElement) Ptr TrackElement
result'
TrackElement -> IO TrackElement
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return TrackElement
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
clip
Maybe TrackElement -> IO (Maybe TrackElement)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TrackElement
maybeResult
foreign import ccall "wrapper"
mk_CreateTrackElementFunc :: C_CreateTrackElementFunc -> IO (FunPtr C_CreateTrackElementFunc)
type CreateTrackElementFunc =
GES.Clip.Clip
-> [GES.Flags.TrackType]
-> IO (Maybe GES.TrackElement.TrackElement)
noCreateTrackElementFunc :: Maybe CreateTrackElementFunc
noCreateTrackElementFunc :: Maybe CreateTrackElementFunc
noCreateTrackElementFunc = Maybe CreateTrackElementFunc
forall a. Maybe a
Nothing
genClosure_CreateTrackElementFunc :: MonadIO m => CreateTrackElementFunc -> m (GClosure C_CreateTrackElementFunc)
genClosure_CreateTrackElementFunc :: forall (m :: * -> *).
MonadIO m =>
CreateTrackElementFunc -> m (GClosure C_CreateTrackElementFunc)
genClosure_CreateTrackElementFunc CreateTrackElementFunc
cb = IO (GClosure C_CreateTrackElementFunc)
-> m (GClosure C_CreateTrackElementFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CreateTrackElementFunc)
-> m (GClosure C_CreateTrackElementFunc))
-> IO (GClosure C_CreateTrackElementFunc)
-> m (GClosure C_CreateTrackElementFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_CreateTrackElementFunc
cb' = Maybe (Ptr (FunPtr C_CreateTrackElementFunc))
-> CreateTrackElementFunc -> C_CreateTrackElementFunc
wrap_CreateTrackElementFunc Maybe (Ptr (FunPtr C_CreateTrackElementFunc))
forall a. Maybe a
Nothing CreateTrackElementFunc
cb
C_CreateTrackElementFunc -> IO (FunPtr C_CreateTrackElementFunc)
mk_CreateTrackElementFunc C_CreateTrackElementFunc
cb' IO (FunPtr C_CreateTrackElementFunc)
-> (FunPtr C_CreateTrackElementFunc
-> IO (GClosure C_CreateTrackElementFunc))
-> IO (GClosure C_CreateTrackElementFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CreateTrackElementFunc
-> IO (GClosure C_CreateTrackElementFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_CreateTrackElementFunc ::
Maybe (Ptr (FunPtr C_CreateTrackElementFunc)) ->
CreateTrackElementFunc ->
C_CreateTrackElementFunc
wrap_CreateTrackElementFunc :: Maybe (Ptr (FunPtr C_CreateTrackElementFunc))
-> CreateTrackElementFunc -> C_CreateTrackElementFunc
wrap_CreateTrackElementFunc Maybe (Ptr (FunPtr C_CreateTrackElementFunc))
gi'funptrptr CreateTrackElementFunc
gi'cb Ptr Clip
clip CUInt
type_ = do
Clip
clip' <- ((ManagedPtr Clip -> Clip) -> Ptr Clip -> IO Clip
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clip -> Clip
GES.Clip.Clip) Ptr Clip
clip
let type_' :: [TrackType]
type_' = CUInt -> [TrackType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
type_
Maybe TrackElement
result <- CreateTrackElementFunc
gi'cb Clip
clip' [TrackType]
type_'
Maybe (Ptr (FunPtr C_CreateTrackElementFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_CreateTrackElementFunc))
gi'funptrptr
Ptr TrackElement
-> Maybe TrackElement
-> (TrackElement -> IO (Ptr TrackElement))
-> IO (Ptr TrackElement)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr TrackElement
forall a. Ptr a
FP.nullPtr Maybe TrackElement
result ((TrackElement -> IO (Ptr TrackElement)) -> IO (Ptr TrackElement))
-> (TrackElement -> IO (Ptr TrackElement)) -> IO (Ptr TrackElement)
forall a b. (a -> b) -> a -> b
$ \TrackElement
result' -> do
Ptr TrackElement
result'' <- TrackElement -> IO (Ptr TrackElement)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr TrackElement
result'
Ptr TrackElement -> IO (Ptr TrackElement)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TrackElement
result''
type C_BaseEffectTimeTranslationFunc =
Ptr GES.BaseEffect.BaseEffect ->
Word64 ->
Ptr (GHashTable CString (Ptr GValue)) ->
Ptr () ->
IO Word64
foreign import ccall "dynamic" __dynamic_C_BaseEffectTimeTranslationFunc :: FunPtr C_BaseEffectTimeTranslationFunc -> C_BaseEffectTimeTranslationFunc
dynamic_BaseEffectTimeTranslationFunc ::
(B.CallStack.HasCallStack, MonadIO m, GES.BaseEffect.IsBaseEffect a) =>
FunPtr C_BaseEffectTimeTranslationFunc
-> a
-> Word64
-> Map.Map T.Text GValue
-> Ptr ()
-> m Word64
dynamic_BaseEffectTimeTranslationFunc :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsBaseEffect a) =>
FunPtr C_BaseEffectTimeTranslationFunc
-> a -> CGType -> Map Text GValue -> Ptr () -> m CGType
dynamic_BaseEffectTimeTranslationFunc FunPtr C_BaseEffectTimeTranslationFunc
__funPtr a
effect CGType
time Map Text GValue
timePropertyValues Ptr ()
userData = IO CGType -> m CGType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CGType -> m CGType) -> IO CGType -> m CGType
forall a b. (a -> b) -> a -> b
$ do
Ptr BaseEffect
effect' <- a -> IO (Ptr BaseEffect)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
effect
let timePropertyValues' :: [(Text, GValue)]
timePropertyValues' = Map Text GValue -> [(Text, GValue)]
forall k a. Map k a -> [(k, a)]
Map.toList Map Text GValue
timePropertyValues
[(CString, GValue)]
timePropertyValues'' <- (Text -> IO CString) -> [(Text, GValue)] -> IO [(CString, GValue)]
forall (f :: * -> *) a c b.
Applicative f =>
(a -> f c) -> [(a, b)] -> f [(c, b)]
mapFirstA Text -> IO CString
textToCString [(Text, GValue)]
timePropertyValues'
[(CString, Ptr GValue)]
timePropertyValues''' <- (GValue -> IO (Ptr GValue))
-> [(CString, GValue)] -> IO [(CString, Ptr GValue)]
forall (f :: * -> *) b c a.
Applicative f =>
(b -> f c) -> [(a, b)] -> f [(a, c)]
mapSecondA GValue -> IO (Ptr GValue)
B.GValue.disownGValue [(CString, GValue)]
timePropertyValues''
let timePropertyValues'''' :: [(PtrWrapped CString, Ptr GValue)]
timePropertyValues'''' = (CString -> PtrWrapped CString)
-> [(CString, Ptr GValue)] -> [(PtrWrapped CString, Ptr GValue)]
forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst CString -> PtrWrapped CString
B.GHT.cstringPackPtr [(CString, Ptr GValue)]
timePropertyValues'''
let timePropertyValues''''' :: [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
timePropertyValues''''' = (Ptr GValue -> PtrWrapped (Ptr GValue))
-> [(PtrWrapped CString, Ptr GValue)]
-> [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond Ptr GValue -> PtrWrapped (Ptr GValue)
B.GHT.gvaluePackPtr [(PtrWrapped CString, Ptr GValue)]
timePropertyValues''''
Ptr (GHashTable CString (Ptr GValue))
timePropertyValues'''''' <- GHashFunc CString
-> GEqualFunc CString
-> Maybe (GDestroyNotify CString)
-> Maybe (GDestroyNotify (Ptr GValue))
-> [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
-> IO (Ptr (GHashTable CString (Ptr GValue)))
forall a b.
GHashFunc a
-> GEqualFunc a
-> Maybe (GDestroyNotify a)
-> Maybe (GDestroyNotify b)
-> [(PtrWrapped a, PtrWrapped b)]
-> IO (Ptr (GHashTable a b))
packGHashTable GHashFunc CString
gStrHash GEqualFunc CString
gStrEqual (GDestroyNotify CString -> Maybe (GDestroyNotify CString)
forall a. a -> Maybe a
Just GDestroyNotify CString
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free) (GDestroyNotify (Ptr GValue) -> Maybe (GDestroyNotify (Ptr GValue))
forall a. a -> Maybe a
Just GDestroyNotify (Ptr GValue)
B.GValue.ptr_to_gvalue_free) [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
timePropertyValues'''''
CGType
result <- (FunPtr C_BaseEffectTimeTranslationFunc
-> C_BaseEffectTimeTranslationFunc
__dynamic_C_BaseEffectTimeTranslationFunc FunPtr C_BaseEffectTimeTranslationFunc
__funPtr) Ptr BaseEffect
effect' CGType
time Ptr (GHashTable CString (Ptr GValue))
timePropertyValues'''''' Ptr ()
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
effect
Ptr (GHashTable CString (Ptr GValue)) -> IO ()
forall a b. Ptr (GHashTable a b) -> IO ()
unrefGHashTable Ptr (GHashTable CString (Ptr GValue))
timePropertyValues''''''
CGType -> IO CGType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CGType
result
foreign import ccall "wrapper"
mk_BaseEffectTimeTranslationFunc :: C_BaseEffectTimeTranslationFunc -> IO (FunPtr C_BaseEffectTimeTranslationFunc)
type BaseEffectTimeTranslationFunc =
GES.BaseEffect.BaseEffect
-> Word64
-> Map.Map T.Text GValue
-> IO Word64
noBaseEffectTimeTranslationFunc :: Maybe BaseEffectTimeTranslationFunc
noBaseEffectTimeTranslationFunc :: Maybe BaseEffectTimeTranslationFunc
noBaseEffectTimeTranslationFunc = Maybe BaseEffectTimeTranslationFunc
forall a. Maybe a
Nothing
type BaseEffectTimeTranslationFunc_WithClosures =
GES.BaseEffect.BaseEffect
-> Word64
-> Map.Map T.Text GValue
-> Ptr ()
-> IO Word64
noBaseEffectTimeTranslationFunc_WithClosures :: Maybe BaseEffectTimeTranslationFunc_WithClosures
noBaseEffectTimeTranslationFunc_WithClosures :: Maybe BaseEffectTimeTranslationFunc_WithClosures
noBaseEffectTimeTranslationFunc_WithClosures = Maybe BaseEffectTimeTranslationFunc_WithClosures
forall a. Maybe a
Nothing
drop_closures_BaseEffectTimeTranslationFunc :: BaseEffectTimeTranslationFunc -> BaseEffectTimeTranslationFunc_WithClosures
drop_closures_BaseEffectTimeTranslationFunc :: BaseEffectTimeTranslationFunc
-> BaseEffectTimeTranslationFunc_WithClosures
drop_closures_BaseEffectTimeTranslationFunc BaseEffectTimeTranslationFunc
_f BaseEffect
effect CGType
time Map Text GValue
timePropertyValues Ptr ()
_ = BaseEffectTimeTranslationFunc
_f BaseEffect
effect CGType
time Map Text GValue
timePropertyValues
genClosure_BaseEffectTimeTranslationFunc :: MonadIO m => BaseEffectTimeTranslationFunc -> m (GClosure C_BaseEffectTimeTranslationFunc)
genClosure_BaseEffectTimeTranslationFunc :: forall (m :: * -> *).
MonadIO m =>
BaseEffectTimeTranslationFunc
-> m (GClosure C_BaseEffectTimeTranslationFunc)
genClosure_BaseEffectTimeTranslationFunc BaseEffectTimeTranslationFunc
cb = IO (GClosure C_BaseEffectTimeTranslationFunc)
-> m (GClosure C_BaseEffectTimeTranslationFunc)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_BaseEffectTimeTranslationFunc)
-> m (GClosure C_BaseEffectTimeTranslationFunc))
-> IO (GClosure C_BaseEffectTimeTranslationFunc)
-> m (GClosure C_BaseEffectTimeTranslationFunc)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: BaseEffectTimeTranslationFunc_WithClosures
cb' = BaseEffectTimeTranslationFunc
-> BaseEffectTimeTranslationFunc_WithClosures
drop_closures_BaseEffectTimeTranslationFunc BaseEffectTimeTranslationFunc
cb
let cb'' :: C_BaseEffectTimeTranslationFunc
cb'' = Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc))
-> BaseEffectTimeTranslationFunc_WithClosures
-> C_BaseEffectTimeTranslationFunc
wrap_BaseEffectTimeTranslationFunc Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc))
forall a. Maybe a
Nothing BaseEffectTimeTranslationFunc_WithClosures
cb'
C_BaseEffectTimeTranslationFunc
-> IO (FunPtr C_BaseEffectTimeTranslationFunc)
mk_BaseEffectTimeTranslationFunc C_BaseEffectTimeTranslationFunc
cb'' IO (FunPtr C_BaseEffectTimeTranslationFunc)
-> (FunPtr C_BaseEffectTimeTranslationFunc
-> IO (GClosure C_BaseEffectTimeTranslationFunc))
-> IO (GClosure C_BaseEffectTimeTranslationFunc)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_BaseEffectTimeTranslationFunc
-> IO (GClosure C_BaseEffectTimeTranslationFunc)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_BaseEffectTimeTranslationFunc ::
Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc)) ->
BaseEffectTimeTranslationFunc_WithClosures ->
C_BaseEffectTimeTranslationFunc
wrap_BaseEffectTimeTranslationFunc :: Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc))
-> BaseEffectTimeTranslationFunc_WithClosures
-> C_BaseEffectTimeTranslationFunc
wrap_BaseEffectTimeTranslationFunc Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc))
gi'funptrptr BaseEffectTimeTranslationFunc_WithClosures
gi'cb Ptr BaseEffect
effect CGType
time Ptr (GHashTable CString (Ptr GValue))
timePropertyValues Ptr ()
userData = do
BaseEffect
effect' <- ((ManagedPtr BaseEffect -> BaseEffect)
-> Ptr BaseEffect -> IO BaseEffect
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr BaseEffect -> BaseEffect
GES.BaseEffect.BaseEffect) Ptr BaseEffect
effect
[(PtrWrapped CString, PtrWrapped (Ptr GValue))]
timePropertyValues' <- Ptr (GHashTable CString (Ptr GValue))
-> IO [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
forall a b.
Ptr (GHashTable a b) -> IO [(PtrWrapped a, PtrWrapped b)]
unpackGHashTable Ptr (GHashTable CString (Ptr GValue))
timePropertyValues
let timePropertyValues'' :: [(CString, PtrWrapped (Ptr GValue))]
timePropertyValues'' = (PtrWrapped CString -> CString)
-> [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
-> [(CString, PtrWrapped (Ptr GValue))]
forall a c b. (a -> c) -> [(a, b)] -> [(c, b)]
mapFirst PtrWrapped CString -> CString
B.GHT.cstringUnpackPtr [(PtrWrapped CString, PtrWrapped (Ptr GValue))]
timePropertyValues'
[(Text, PtrWrapped (Ptr GValue))]
timePropertyValues''' <- (CString -> IO Text)
-> [(CString, PtrWrapped (Ptr GValue))]
-> IO [(Text, PtrWrapped (Ptr GValue))]
forall (f :: * -> *) a c b.
Applicative f =>
(a -> f c) -> [(a, b)] -> f [(c, b)]
mapFirstA HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText [(CString, PtrWrapped (Ptr GValue))]
timePropertyValues''
let timePropertyValues'''' :: [(Text, Ptr GValue)]
timePropertyValues'''' = (PtrWrapped (Ptr GValue) -> Ptr GValue)
-> [(Text, PtrWrapped (Ptr GValue))] -> [(Text, Ptr GValue)]
forall b c a. (b -> c) -> [(a, b)] -> [(a, c)]
mapSecond PtrWrapped (Ptr GValue) -> Ptr GValue
B.GHT.gvalueUnpackPtr [(Text, PtrWrapped (Ptr GValue))]
timePropertyValues'''
[(Text, GValue)]
timePropertyValues''''' <- (Ptr GValue -> IO GValue)
-> [(Text, Ptr GValue)] -> IO [(Text, GValue)]
forall (f :: * -> *) b c a.
Applicative f =>
(b -> f c) -> [(a, b)] -> f [(a, c)]
mapSecondA Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr [(Text, Ptr GValue)]
timePropertyValues''''
let timePropertyValues'''''' :: Map Text GValue
timePropertyValues'''''' = [(Text, GValue)] -> Map Text GValue
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList [(Text, GValue)]
timePropertyValues'''''
CGType
result <- BaseEffectTimeTranslationFunc_WithClosures
gi'cb BaseEffect
effect' CGType
time Map Text GValue
timePropertyValues'''''' Ptr ()
userData
Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc)) -> IO ()
forall a. Maybe (Ptr (FunPtr a)) -> IO ()
maybeReleaseFunPtr Maybe (Ptr (FunPtr C_BaseEffectTimeTranslationFunc))
gi'funptrptr
CGType -> IO CGType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CGType
result