#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gst.Objects.GhostPad
(
GhostPad(..) ,
IsGhostPad ,
toGhostPad ,
noGhostPad ,
ghostPadActivateModeDefault ,
#if ENABLE_OVERLOADING
GhostPadConstructMethodInfo ,
#endif
ghostPadConstruct ,
#if ENABLE_OVERLOADING
GhostPadGetTargetMethodInfo ,
#endif
ghostPadGetTarget ,
ghostPadInternalActivateModeDefault ,
ghostPadNew ,
ghostPadNewFromTemplate ,
ghostPadNewNoTarget ,
ghostPadNewNoTargetFromTemplate ,
#if ENABLE_OVERLOADING
GhostPadSetTargetMethodInfo ,
#endif
ghostPadSetTarget ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gst.Enums as Gst.Enums
import {-# SOURCE #-} qualified GI.Gst.Objects.Object as Gst.Object
import {-# SOURCE #-} qualified GI.Gst.Objects.Pad as Gst.Pad
import {-# SOURCE #-} qualified GI.Gst.Objects.PadTemplate as Gst.PadTemplate
import {-# SOURCE #-} qualified GI.Gst.Objects.ProxyPad as Gst.ProxyPad
newtype GhostPad = GhostPad (ManagedPtr GhostPad)
foreign import ccall "gst_ghost_pad_get_type"
c_gst_ghost_pad_get_type :: IO GType
instance GObject GhostPad where
gobjectType = c_gst_ghost_pad_get_type
class (GObject o, O.IsDescendantOf GhostPad o) => IsGhostPad o
instance (GObject o, O.IsDescendantOf GhostPad o) => IsGhostPad o
instance O.HasParentTypes GhostPad
type instance O.ParentTypes GhostPad = '[Gst.ProxyPad.ProxyPad, Gst.Pad.Pad, Gst.Object.Object, GObject.Object.Object]
toGhostPad :: (MonadIO m, IsGhostPad o) => o -> m GhostPad
toGhostPad = liftIO . unsafeCastTo GhostPad
noGhostPad :: Maybe GhostPad
noGhostPad = Nothing
#if ENABLE_OVERLOADING
type family ResolveGhostPadMethod (t :: Symbol) (o :: *) :: * where
ResolveGhostPadMethod "activateMode" o = Gst.Pad.PadActivateModeMethodInfo
ResolveGhostPadMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolveGhostPadMethod "addProbe" o = Gst.Pad.PadAddProbeMethodInfo
ResolveGhostPadMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveGhostPadMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveGhostPadMethod "canLink" o = Gst.Pad.PadCanLinkMethodInfo
ResolveGhostPadMethod "chain" o = Gst.Pad.PadChainMethodInfo
ResolveGhostPadMethod "chainList" o = Gst.Pad.PadChainListMethodInfo
ResolveGhostPadMethod "checkReconfigure" o = Gst.Pad.PadCheckReconfigureMethodInfo
ResolveGhostPadMethod "construct" o = GhostPadConstructMethodInfo
ResolveGhostPadMethod "createStreamId" o = Gst.Pad.PadCreateStreamIdMethodInfo
ResolveGhostPadMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolveGhostPadMethod "eventDefault" o = Gst.Pad.PadEventDefaultMethodInfo
ResolveGhostPadMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveGhostPadMethod "forward" o = Gst.Pad.PadForwardMethodInfo
ResolveGhostPadMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveGhostPadMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveGhostPadMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolveGhostPadMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolveGhostPadMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolveGhostPadMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolveGhostPadMethod "hasCurrentCaps" o = Gst.Pad.PadHasCurrentCapsMethodInfo
ResolveGhostPadMethod "isActive" o = Gst.Pad.PadIsActiveMethodInfo
ResolveGhostPadMethod "isBlocked" o = Gst.Pad.PadIsBlockedMethodInfo
ResolveGhostPadMethod "isBlocking" o = Gst.Pad.PadIsBlockingMethodInfo
ResolveGhostPadMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveGhostPadMethod "isLinked" o = Gst.Pad.PadIsLinkedMethodInfo
ResolveGhostPadMethod "iterateInternalLinks" o = Gst.Pad.PadIterateInternalLinksMethodInfo
ResolveGhostPadMethod "link" o = Gst.Pad.PadLinkMethodInfo
ResolveGhostPadMethod "linkFull" o = Gst.Pad.PadLinkFullMethodInfo
ResolveGhostPadMethod "linkMaybeGhosting" o = Gst.Pad.PadLinkMaybeGhostingMethodInfo
ResolveGhostPadMethod "linkMaybeGhostingFull" o = Gst.Pad.PadLinkMaybeGhostingFullMethodInfo
ResolveGhostPadMethod "markReconfigure" o = Gst.Pad.PadMarkReconfigureMethodInfo
ResolveGhostPadMethod "needsReconfigure" o = Gst.Pad.PadNeedsReconfigureMethodInfo
ResolveGhostPadMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveGhostPadMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveGhostPadMethod "pauseTask" o = Gst.Pad.PadPauseTaskMethodInfo
ResolveGhostPadMethod "peerQuery" o = Gst.Pad.PadPeerQueryMethodInfo
ResolveGhostPadMethod "peerQueryAcceptCaps" o = Gst.Pad.PadPeerQueryAcceptCapsMethodInfo
ResolveGhostPadMethod "peerQueryCaps" o = Gst.Pad.PadPeerQueryCapsMethodInfo
ResolveGhostPadMethod "peerQueryConvert" o = Gst.Pad.PadPeerQueryConvertMethodInfo
ResolveGhostPadMethod "peerQueryDuration" o = Gst.Pad.PadPeerQueryDurationMethodInfo
ResolveGhostPadMethod "peerQueryPosition" o = Gst.Pad.PadPeerQueryPositionMethodInfo
ResolveGhostPadMethod "proxyQueryAcceptCaps" o = Gst.Pad.PadProxyQueryAcceptCapsMethodInfo
ResolveGhostPadMethod "proxyQueryCaps" o = Gst.Pad.PadProxyQueryCapsMethodInfo
ResolveGhostPadMethod "pullRange" o = Gst.Pad.PadPullRangeMethodInfo
ResolveGhostPadMethod "push" o = Gst.Pad.PadPushMethodInfo
ResolveGhostPadMethod "pushEvent" o = Gst.Pad.PadPushEventMethodInfo
ResolveGhostPadMethod "pushList" o = Gst.Pad.PadPushListMethodInfo
ResolveGhostPadMethod "query" o = Gst.Pad.PadQueryMethodInfo
ResolveGhostPadMethod "queryAcceptCaps" o = Gst.Pad.PadQueryAcceptCapsMethodInfo
ResolveGhostPadMethod "queryCaps" o = Gst.Pad.PadQueryCapsMethodInfo
ResolveGhostPadMethod "queryConvert" o = Gst.Pad.PadQueryConvertMethodInfo
ResolveGhostPadMethod "queryDefault" o = Gst.Pad.PadQueryDefaultMethodInfo
ResolveGhostPadMethod "queryDuration" o = Gst.Pad.PadQueryDurationMethodInfo
ResolveGhostPadMethod "queryPosition" o = Gst.Pad.PadQueryPositionMethodInfo
ResolveGhostPadMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolveGhostPadMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveGhostPadMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolveGhostPadMethod "removeProbe" o = Gst.Pad.PadRemoveProbeMethodInfo
ResolveGhostPadMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveGhostPadMethod "sendEvent" o = Gst.Pad.PadSendEventMethodInfo
ResolveGhostPadMethod "startTask" o = Gst.Pad.PadStartTaskMethodInfo
ResolveGhostPadMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveGhostPadMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveGhostPadMethod "stickyEventsForeach" o = Gst.Pad.PadStickyEventsForeachMethodInfo
ResolveGhostPadMethod "stopTask" o = Gst.Pad.PadStopTaskMethodInfo
ResolveGhostPadMethod "storeStickyEvent" o = Gst.Pad.PadStoreStickyEventMethodInfo
ResolveGhostPadMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolveGhostPadMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolveGhostPadMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveGhostPadMethod "unlink" o = Gst.Pad.PadUnlinkMethodInfo
ResolveGhostPadMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolveGhostPadMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolveGhostPadMethod "useFixedCaps" o = Gst.Pad.PadUseFixedCapsMethodInfo
ResolveGhostPadMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveGhostPadMethod "getAllowedCaps" o = Gst.Pad.PadGetAllowedCapsMethodInfo
ResolveGhostPadMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolveGhostPadMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolveGhostPadMethod "getCurrentCaps" o = Gst.Pad.PadGetCurrentCapsMethodInfo
ResolveGhostPadMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveGhostPadMethod "getDirection" o = Gst.Pad.PadGetDirectionMethodInfo
ResolveGhostPadMethod "getElementPrivate" o = Gst.Pad.PadGetElementPrivateMethodInfo
ResolveGhostPadMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolveGhostPadMethod "getInternal" o = Gst.ProxyPad.ProxyPadGetInternalMethodInfo
ResolveGhostPadMethod "getLastFlowReturn" o = Gst.Pad.PadGetLastFlowReturnMethodInfo
ResolveGhostPadMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolveGhostPadMethod "getOffset" o = Gst.Pad.PadGetOffsetMethodInfo
ResolveGhostPadMethod "getPadTemplate" o = Gst.Pad.PadGetPadTemplateMethodInfo
ResolveGhostPadMethod "getPadTemplateCaps" o = Gst.Pad.PadGetPadTemplateCapsMethodInfo
ResolveGhostPadMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolveGhostPadMethod "getParentElement" o = Gst.Pad.PadGetParentElementMethodInfo
ResolveGhostPadMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolveGhostPadMethod "getPeer" o = Gst.Pad.PadGetPeerMethodInfo
ResolveGhostPadMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveGhostPadMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveGhostPadMethod "getRange" o = Gst.Pad.PadGetRangeMethodInfo
ResolveGhostPadMethod "getStickyEvent" o = Gst.Pad.PadGetStickyEventMethodInfo
ResolveGhostPadMethod "getStream" o = Gst.Pad.PadGetStreamMethodInfo
ResolveGhostPadMethod "getStreamId" o = Gst.Pad.PadGetStreamIdMethodInfo
ResolveGhostPadMethod "getTarget" o = GhostPadGetTargetMethodInfo
ResolveGhostPadMethod "getTaskState" o = Gst.Pad.PadGetTaskStateMethodInfo
ResolveGhostPadMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolveGhostPadMethod "setActivateFunctionFull" o = Gst.Pad.PadSetActivateFunctionFullMethodInfo
ResolveGhostPadMethod "setActivatemodeFunctionFull" o = Gst.Pad.PadSetActivatemodeFunctionFullMethodInfo
ResolveGhostPadMethod "setActive" o = Gst.Pad.PadSetActiveMethodInfo
ResolveGhostPadMethod "setChainFunctionFull" o = Gst.Pad.PadSetChainFunctionFullMethodInfo
ResolveGhostPadMethod "setChainListFunctionFull" o = Gst.Pad.PadSetChainListFunctionFullMethodInfo
ResolveGhostPadMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolveGhostPadMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolveGhostPadMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolveGhostPadMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveGhostPadMethod "setElementPrivate" o = Gst.Pad.PadSetElementPrivateMethodInfo
ResolveGhostPadMethod "setEventFullFunctionFull" o = Gst.Pad.PadSetEventFullFunctionFullMethodInfo
ResolveGhostPadMethod "setEventFunctionFull" o = Gst.Pad.PadSetEventFunctionFullMethodInfo
ResolveGhostPadMethod "setGetrangeFunctionFull" o = Gst.Pad.PadSetGetrangeFunctionFullMethodInfo
ResolveGhostPadMethod "setIterateInternalLinksFunctionFull" o = Gst.Pad.PadSetIterateInternalLinksFunctionFullMethodInfo
ResolveGhostPadMethod "setLinkFunctionFull" o = Gst.Pad.PadSetLinkFunctionFullMethodInfo
ResolveGhostPadMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolveGhostPadMethod "setOffset" o = Gst.Pad.PadSetOffsetMethodInfo
ResolveGhostPadMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolveGhostPadMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveGhostPadMethod "setQueryFunctionFull" o = Gst.Pad.PadSetQueryFunctionFullMethodInfo
ResolveGhostPadMethod "setTarget" o = GhostPadSetTargetMethodInfo
ResolveGhostPadMethod "setUnlinkFunctionFull" o = Gst.Pad.PadSetUnlinkFunctionFullMethodInfo
ResolveGhostPadMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveGhostPadMethod t GhostPad, O.MethodInfo info GhostPad p) => OL.IsLabel t (GhostPad -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList GhostPad
type instance O.AttributeList GhostPad = GhostPadAttributeList
type GhostPadAttributeList = ('[ '("caps", Gst.Pad.PadCapsPropertyInfo), '("direction", Gst.Pad.PadDirectionPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("offset", Gst.Pad.PadOffsetPropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("template", Gst.Pad.PadTemplatePropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList GhostPad = GhostPadSignalList
type GhostPadSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("linked", Gst.Pad.PadLinkedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("unlinked", Gst.Pad.PadUnlinkedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_ghost_pad_new" gst_ghost_pad_new ::
CString ->
Ptr Gst.Pad.Pad ->
IO (Ptr GhostPad)
ghostPadNew ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a) =>
Maybe (T.Text)
-> a
-> m (Maybe GhostPad)
ghostPadNew name target = liftIO $ do
maybeName <- case name of
Nothing -> return nullPtr
Just jName -> do
jName' <- textToCString jName
return jName'
target' <- unsafeManagedPtrCastPtr target
result <- gst_ghost_pad_new maybeName target'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject GhostPad) result'
return result''
touchManagedPtr target
freeMem maybeName
return maybeResult
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_ghost_pad_new_from_template" gst_ghost_pad_new_from_template ::
CString ->
Ptr Gst.Pad.Pad ->
Ptr Gst.PadTemplate.PadTemplate ->
IO (Ptr GhostPad)
ghostPadNewFromTemplate ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a, Gst.PadTemplate.IsPadTemplate b) =>
Maybe (T.Text)
-> a
-> b
-> m (Maybe GhostPad)
ghostPadNewFromTemplate name target templ = liftIO $ do
maybeName <- case name of
Nothing -> return nullPtr
Just jName -> do
jName' <- textToCString jName
return jName'
target' <- unsafeManagedPtrCastPtr target
templ' <- unsafeManagedPtrCastPtr templ
result <- gst_ghost_pad_new_from_template maybeName target' templ'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject GhostPad) result'
return result''
touchManagedPtr target
touchManagedPtr templ
freeMem maybeName
return maybeResult
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_ghost_pad_new_no_target" gst_ghost_pad_new_no_target ::
CString ->
CUInt ->
IO (Ptr GhostPad)
ghostPadNewNoTarget ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> Gst.Enums.PadDirection
-> m (Maybe GhostPad)
ghostPadNewNoTarget name dir = liftIO $ do
maybeName <- case name of
Nothing -> return nullPtr
Just jName -> do
jName' <- textToCString jName
return jName'
let dir' = (fromIntegral . fromEnum) dir
result <- gst_ghost_pad_new_no_target maybeName dir'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject GhostPad) result'
return result''
freeMem maybeName
return maybeResult
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_ghost_pad_new_no_target_from_template" gst_ghost_pad_new_no_target_from_template ::
CString ->
Ptr Gst.PadTemplate.PadTemplate ->
IO (Ptr GhostPad)
ghostPadNewNoTargetFromTemplate ::
(B.CallStack.HasCallStack, MonadIO m, Gst.PadTemplate.IsPadTemplate a) =>
Maybe (T.Text)
-> a
-> m (Maybe GhostPad)
ghostPadNewNoTargetFromTemplate name templ = liftIO $ do
maybeName <- case name of
Nothing -> return nullPtr
Just jName -> do
jName' <- textToCString jName
return jName'
templ' <- unsafeManagedPtrCastPtr templ
result <- gst_ghost_pad_new_no_target_from_template maybeName templ'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject GhostPad) result'
return result''
touchManagedPtr templ
freeMem maybeName
return maybeResult
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_ghost_pad_construct" gst_ghost_pad_construct ::
Ptr GhostPad ->
IO CInt
ghostPadConstruct ::
(B.CallStack.HasCallStack, MonadIO m, IsGhostPad a) =>
a
-> m Bool
ghostPadConstruct gpad = liftIO $ do
gpad' <- unsafeManagedPtrCastPtr gpad
result <- gst_ghost_pad_construct gpad'
let result' = (/= 0) result
touchManagedPtr gpad
return result'
#if ENABLE_OVERLOADING
data GhostPadConstructMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsGhostPad a) => O.MethodInfo GhostPadConstructMethodInfo a signature where
overloadedMethod _ = ghostPadConstruct
#endif
foreign import ccall "gst_ghost_pad_get_target" gst_ghost_pad_get_target ::
Ptr GhostPad ->
IO (Ptr Gst.Pad.Pad)
ghostPadGetTarget ::
(B.CallStack.HasCallStack, MonadIO m, IsGhostPad a) =>
a
-> m (Maybe Gst.Pad.Pad)
ghostPadGetTarget gpad = liftIO $ do
gpad' <- unsafeManagedPtrCastPtr gpad
result <- gst_ghost_pad_get_target gpad'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapObject Gst.Pad.Pad) result'
return result''
touchManagedPtr gpad
return maybeResult
#if ENABLE_OVERLOADING
data GhostPadGetTargetMethodInfo
instance (signature ~ (m (Maybe Gst.Pad.Pad)), MonadIO m, IsGhostPad a) => O.MethodInfo GhostPadGetTargetMethodInfo a signature where
overloadedMethod _ = ghostPadGetTarget
#endif
foreign import ccall "gst_ghost_pad_set_target" gst_ghost_pad_set_target ::
Ptr GhostPad ->
Ptr Gst.Pad.Pad ->
IO CInt
ghostPadSetTarget ::
(B.CallStack.HasCallStack, MonadIO m, IsGhostPad a, Gst.Pad.IsPad b) =>
a
-> Maybe (b)
-> m Bool
ghostPadSetTarget gpad newtarget = liftIO $ do
gpad' <- unsafeManagedPtrCastPtr gpad
maybeNewtarget <- case newtarget of
Nothing -> return nullPtr
Just jNewtarget -> do
jNewtarget' <- unsafeManagedPtrCastPtr jNewtarget
return jNewtarget'
result <- gst_ghost_pad_set_target gpad' maybeNewtarget
let result' = (/= 0) result
touchManagedPtr gpad
whenJust newtarget touchManagedPtr
return result'
#if ENABLE_OVERLOADING
data GhostPadSetTargetMethodInfo
instance (signature ~ (Maybe (b) -> m Bool), MonadIO m, IsGhostPad a, Gst.Pad.IsPad b) => O.MethodInfo GhostPadSetTargetMethodInfo a signature where
overloadedMethod _ = ghostPadSetTarget
#endif
foreign import ccall "gst_ghost_pad_activate_mode_default" gst_ghost_pad_activate_mode_default ::
Ptr Gst.Pad.Pad ->
Ptr Gst.Object.Object ->
CUInt ->
CInt ->
IO CInt
ghostPadActivateModeDefault ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a, Gst.Object.IsObject b) =>
a
-> Maybe (b)
-> Gst.Enums.PadMode
-> Bool
-> m Bool
ghostPadActivateModeDefault pad parent mode active = liftIO $ do
pad' <- unsafeManagedPtrCastPtr pad
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
jParent' <- unsafeManagedPtrCastPtr jParent
return jParent'
let mode' = (fromIntegral . fromEnum) mode
let active' = (fromIntegral . fromEnum) active
result <- gst_ghost_pad_activate_mode_default pad' maybeParent mode' active'
let result' = (/= 0) result
touchManagedPtr pad
whenJust parent touchManagedPtr
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_ghost_pad_internal_activate_mode_default" gst_ghost_pad_internal_activate_mode_default ::
Ptr Gst.Pad.Pad ->
Ptr Gst.Object.Object ->
CUInt ->
CInt ->
IO CInt
ghostPadInternalActivateModeDefault ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Pad.IsPad a, Gst.Object.IsObject b) =>
a
-> Maybe (b)
-> Gst.Enums.PadMode
-> Bool
-> m Bool
ghostPadInternalActivateModeDefault pad parent mode active = liftIO $ do
pad' <- unsafeManagedPtrCastPtr pad
maybeParent <- case parent of
Nothing -> return nullPtr
Just jParent -> do
jParent' <- unsafeManagedPtrCastPtr jParent
return jParent'
let mode' = (fromIntegral . fromEnum) mode
let active' = (fromIntegral . fromEnum) active
result <- gst_ghost_pad_internal_activate_mode_default pad' maybeParent mode' active'
let result' = (/= 0) result
touchManagedPtr pad
whenJust parent touchManagedPtr
return result'
#if ENABLE_OVERLOADING
#endif