{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Objects.PluginFeature
(
PluginFeature(..) ,
IsPluginFeature ,
toPluginFeature ,
#if defined(ENABLE_OVERLOADING)
ResolvePluginFeatureMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
PluginFeatureCheckVersionMethodInfo ,
#endif
pluginFeatureCheckVersion ,
#if defined(ENABLE_OVERLOADING)
PluginFeatureGetPluginMethodInfo ,
#endif
pluginFeatureGetPlugin ,
#if defined(ENABLE_OVERLOADING)
PluginFeatureGetPluginNameMethodInfo ,
#endif
pluginFeatureGetPluginName ,
#if defined(ENABLE_OVERLOADING)
PluginFeatureGetRankMethodInfo ,
#endif
pluginFeatureGetRank ,
pluginFeatureListCopy ,
pluginFeatureListDebug ,
pluginFeatureListFree ,
#if defined(ENABLE_OVERLOADING)
PluginFeatureLoadMethodInfo ,
#endif
pluginFeatureLoad ,
pluginFeatureRankCompareFunc ,
#if defined(ENABLE_OVERLOADING)
PluginFeatureSetRankMethodInfo ,
#endif
pluginFeatureSetRank ,
) 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.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.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.Objects.Object as Gst.Object
import {-# SOURCE #-} qualified GI.Gst.Objects.Plugin as Gst.Plugin
newtype PluginFeature = PluginFeature (SP.ManagedPtr PluginFeature)
deriving (PluginFeature -> PluginFeature -> Bool
(PluginFeature -> PluginFeature -> Bool)
-> (PluginFeature -> PluginFeature -> Bool) -> Eq PluginFeature
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginFeature -> PluginFeature -> Bool
$c/= :: PluginFeature -> PluginFeature -> Bool
== :: PluginFeature -> PluginFeature -> Bool
$c== :: PluginFeature -> PluginFeature -> Bool
Eq)
instance SP.ManagedPtrNewtype PluginFeature where
toManagedPtr :: PluginFeature -> ManagedPtr PluginFeature
toManagedPtr (PluginFeature ManagedPtr PluginFeature
p) = ManagedPtr PluginFeature
p
foreign import ccall "gst_plugin_feature_get_type"
c_gst_plugin_feature_get_type :: IO B.Types.GType
instance B.Types.TypedObject PluginFeature where
glibType :: IO GType
glibType = IO GType
c_gst_plugin_feature_get_type
instance B.Types.GObject PluginFeature
instance B.GValue.IsGValue PluginFeature where
toGValue :: PluginFeature -> IO GValue
toGValue PluginFeature
o = do
GType
gtype <- IO GType
c_gst_plugin_feature_get_type
PluginFeature -> (Ptr PluginFeature -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PluginFeature
o (GType
-> (GValue -> Ptr PluginFeature -> IO ())
-> Ptr PluginFeature
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr PluginFeature -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO PluginFeature
fromGValue GValue
gv = do
Ptr PluginFeature
ptr <- GValue -> IO (Ptr PluginFeature)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr PluginFeature)
(ManagedPtr PluginFeature -> PluginFeature)
-> Ptr PluginFeature -> IO PluginFeature
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr PluginFeature -> PluginFeature
PluginFeature Ptr PluginFeature
ptr
class (SP.GObject o, O.IsDescendantOf PluginFeature o) => IsPluginFeature o
instance (SP.GObject o, O.IsDescendantOf PluginFeature o) => IsPluginFeature o
instance O.HasParentTypes PluginFeature
type instance O.ParentTypes PluginFeature = '[Gst.Object.Object, GObject.Object.Object]
toPluginFeature :: (MonadIO m, IsPluginFeature o) => o -> m PluginFeature
toPluginFeature :: o -> m PluginFeature
toPluginFeature = IO PluginFeature -> m PluginFeature
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PluginFeature -> m PluginFeature)
-> (o -> IO PluginFeature) -> o -> m PluginFeature
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PluginFeature -> PluginFeature)
-> o -> IO PluginFeature
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr PluginFeature -> PluginFeature
PluginFeature
#if defined(ENABLE_OVERLOADING)
type family ResolvePluginFeatureMethod (t :: Symbol) (o :: *) :: * where
ResolvePluginFeatureMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
ResolvePluginFeatureMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolvePluginFeatureMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolvePluginFeatureMethod "checkVersion" o = PluginFeatureCheckVersionMethodInfo
ResolvePluginFeatureMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
ResolvePluginFeatureMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolvePluginFeatureMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolvePluginFeatureMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolvePluginFeatureMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
ResolvePluginFeatureMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
ResolvePluginFeatureMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
ResolvePluginFeatureMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
ResolvePluginFeatureMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolvePluginFeatureMethod "load" o = PluginFeatureLoadMethodInfo
ResolvePluginFeatureMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolvePluginFeatureMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolvePluginFeatureMethod "ref" o = Gst.Object.ObjectRefMethodInfo
ResolvePluginFeatureMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolvePluginFeatureMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
ResolvePluginFeatureMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolvePluginFeatureMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolvePluginFeatureMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolvePluginFeatureMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
ResolvePluginFeatureMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
ResolvePluginFeatureMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolvePluginFeatureMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
ResolvePluginFeatureMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
ResolvePluginFeatureMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolvePluginFeatureMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
ResolvePluginFeatureMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
ResolvePluginFeatureMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolvePluginFeatureMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
ResolvePluginFeatureMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
ResolvePluginFeatureMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
ResolvePluginFeatureMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
ResolvePluginFeatureMethod "getPlugin" o = PluginFeatureGetPluginMethodInfo
ResolvePluginFeatureMethod "getPluginName" o = PluginFeatureGetPluginNameMethodInfo
ResolvePluginFeatureMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolvePluginFeatureMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolvePluginFeatureMethod "getRank" o = PluginFeatureGetRankMethodInfo
ResolvePluginFeatureMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
ResolvePluginFeatureMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
ResolvePluginFeatureMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
ResolvePluginFeatureMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
ResolvePluginFeatureMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolvePluginFeatureMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolvePluginFeatureMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
ResolvePluginFeatureMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
ResolvePluginFeatureMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolvePluginFeatureMethod "setRank" o = PluginFeatureSetRankMethodInfo
ResolvePluginFeatureMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolvePluginFeatureMethod t PluginFeature, O.MethodInfo info PluginFeature p) => OL.IsLabel t (PluginFeature -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PluginFeature
type instance O.AttributeList PluginFeature = PluginFeatureAttributeList
type PluginFeatureAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PluginFeature = PluginFeatureSignalList
type PluginFeatureSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_plugin_feature_check_version" gst_plugin_feature_check_version ::
Ptr PluginFeature ->
Word32 ->
Word32 ->
Word32 ->
IO CInt
pluginFeatureCheckVersion ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
a
-> Word32
-> Word32
-> Word32
-> m Bool
pluginFeatureCheckVersion :: a -> Word32 -> Word32 -> Word32 -> m Bool
pluginFeatureCheckVersion a
feature Word32
minMajor Word32
minMinor Word32
minMicro = 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 PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
CInt
result <- Ptr PluginFeature -> Word32 -> Word32 -> Word32 -> IO CInt
gst_plugin_feature_check_version Ptr PluginFeature
feature' Word32
minMajor Word32
minMinor Word32
minMicro
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
feature
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data PluginFeatureCheckVersionMethodInfo
instance (signature ~ (Word32 -> Word32 -> Word32 -> m Bool), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureCheckVersionMethodInfo a signature where
overloadedMethod = pluginFeatureCheckVersion
#endif
foreign import ccall "gst_plugin_feature_get_plugin" gst_plugin_feature_get_plugin ::
Ptr PluginFeature ->
IO (Ptr Gst.Plugin.Plugin)
pluginFeatureGetPlugin ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
a
-> m (Maybe Gst.Plugin.Plugin)
pluginFeatureGetPlugin :: a -> m (Maybe Plugin)
pluginFeatureGetPlugin a
feature = IO (Maybe Plugin) -> m (Maybe Plugin)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Plugin) -> m (Maybe Plugin))
-> IO (Maybe Plugin) -> m (Maybe Plugin)
forall a b. (a -> b) -> a -> b
$ do
Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
Ptr Plugin
result <- Ptr PluginFeature -> IO (Ptr Plugin)
gst_plugin_feature_get_plugin Ptr PluginFeature
feature'
Maybe Plugin
maybeResult <- Ptr Plugin -> (Ptr Plugin -> IO Plugin) -> IO (Maybe Plugin)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Plugin
result ((Ptr Plugin -> IO Plugin) -> IO (Maybe Plugin))
-> (Ptr Plugin -> IO Plugin) -> IO (Maybe Plugin)
forall a b. (a -> b) -> a -> b
$ \Ptr Plugin
result' -> do
Plugin
result'' <- ((ManagedPtr Plugin -> Plugin) -> Ptr Plugin -> IO Plugin
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Plugin -> Plugin
Gst.Plugin.Plugin) Ptr Plugin
result'
Plugin -> IO Plugin
forall (m :: * -> *) a. Monad m => a -> m a
return Plugin
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
Maybe Plugin -> IO (Maybe Plugin)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Plugin
maybeResult
#if defined(ENABLE_OVERLOADING)
data PluginFeatureGetPluginMethodInfo
instance (signature ~ (m (Maybe Gst.Plugin.Plugin)), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureGetPluginMethodInfo a signature where
overloadedMethod = pluginFeatureGetPlugin
#endif
foreign import ccall "gst_plugin_feature_get_plugin_name" gst_plugin_feature_get_plugin_name ::
Ptr PluginFeature ->
IO CString
pluginFeatureGetPluginName ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
a
-> m (Maybe T.Text)
pluginFeatureGetPluginName :: a -> m (Maybe Text)
pluginFeatureGetPluginName a
feature = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
CString
result <- Ptr PluginFeature -> IO CString
gst_plugin_feature_get_plugin_name Ptr PluginFeature
feature'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data PluginFeatureGetPluginNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureGetPluginNameMethodInfo a signature where
overloadedMethod = pluginFeatureGetPluginName
#endif
foreign import ccall "gst_plugin_feature_get_rank" gst_plugin_feature_get_rank ::
Ptr PluginFeature ->
IO Word32
pluginFeatureGetRank ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
a
-> m Word32
pluginFeatureGetRank :: a -> m Word32
pluginFeatureGetRank a
feature = 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
$ do
Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
Word32
result <- Ptr PluginFeature -> IO Word32
gst_plugin_feature_get_rank Ptr PluginFeature
feature'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data PluginFeatureGetRankMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureGetRankMethodInfo a signature where
overloadedMethod = pluginFeatureGetRank
#endif
foreign import ccall "gst_plugin_feature_load" gst_plugin_feature_load ::
Ptr PluginFeature ->
IO (Ptr PluginFeature)
pluginFeatureLoad ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
a
-> m (Maybe PluginFeature)
pluginFeatureLoad :: a -> m (Maybe PluginFeature)
pluginFeatureLoad a
feature = IO (Maybe PluginFeature) -> m (Maybe PluginFeature)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe PluginFeature) -> m (Maybe PluginFeature))
-> IO (Maybe PluginFeature) -> m (Maybe PluginFeature)
forall a b. (a -> b) -> a -> b
$ do
Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
Ptr PluginFeature
result <- Ptr PluginFeature -> IO (Ptr PluginFeature)
gst_plugin_feature_load Ptr PluginFeature
feature'
Maybe PluginFeature
maybeResult <- Ptr PluginFeature
-> (Ptr PluginFeature -> IO PluginFeature)
-> IO (Maybe PluginFeature)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr PluginFeature
result ((Ptr PluginFeature -> IO PluginFeature)
-> IO (Maybe PluginFeature))
-> (Ptr PluginFeature -> IO PluginFeature)
-> IO (Maybe PluginFeature)
forall a b. (a -> b) -> a -> b
$ \Ptr PluginFeature
result' -> do
PluginFeature
result'' <- ((ManagedPtr PluginFeature -> PluginFeature)
-> Ptr PluginFeature -> IO PluginFeature
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PluginFeature -> PluginFeature
PluginFeature) Ptr PluginFeature
result'
PluginFeature -> IO PluginFeature
forall (m :: * -> *) a. Monad m => a -> m a
return PluginFeature
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
Maybe PluginFeature -> IO (Maybe PluginFeature)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PluginFeature
maybeResult
#if defined(ENABLE_OVERLOADING)
data PluginFeatureLoadMethodInfo
instance (signature ~ (m (Maybe PluginFeature)), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureLoadMethodInfo a signature where
overloadedMethod = pluginFeatureLoad
#endif
foreign import ccall "gst_plugin_feature_set_rank" gst_plugin_feature_set_rank ::
Ptr PluginFeature ->
Word32 ->
IO ()
pluginFeatureSetRank ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
a
-> Word32
-> m ()
pluginFeatureSetRank :: a -> Word32 -> m ()
pluginFeatureSetRank a
feature Word32
rank = 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 PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
Ptr PluginFeature -> Word32 -> IO ()
gst_plugin_feature_set_rank Ptr PluginFeature
feature' Word32
rank
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data PluginFeatureSetRankMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureSetRankMethodInfo a signature where
overloadedMethod = pluginFeatureSetRank
#endif
foreign import ccall "gst_plugin_feature_list_copy" gst_plugin_feature_list_copy ::
Ptr (GList (Ptr PluginFeature)) ->
IO (Ptr (GList (Ptr PluginFeature)))
pluginFeatureListCopy ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
[a]
-> m [PluginFeature]
pluginFeatureListCopy :: [a] -> m [PluginFeature]
pluginFeatureListCopy [a]
list = IO [PluginFeature] -> m [PluginFeature]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [PluginFeature] -> m [PluginFeature])
-> IO [PluginFeature] -> m [PluginFeature]
forall a b. (a -> b) -> a -> b
$ do
[Ptr PluginFeature]
list' <- (a -> IO (Ptr PluginFeature)) -> [a] -> IO [Ptr PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [a]
list
Ptr (GList (Ptr PluginFeature))
list'' <- [Ptr PluginFeature] -> IO (Ptr (GList (Ptr PluginFeature)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr PluginFeature]
list'
Ptr (GList (Ptr PluginFeature))
result <- Ptr (GList (Ptr PluginFeature))
-> IO (Ptr (GList (Ptr PluginFeature)))
gst_plugin_feature_list_copy Ptr (GList (Ptr PluginFeature))
list''
[Ptr PluginFeature]
result' <- Ptr (GList (Ptr PluginFeature)) -> IO [Ptr PluginFeature]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr PluginFeature))
result
[PluginFeature]
result'' <- (Ptr PluginFeature -> IO PluginFeature)
-> [Ptr PluginFeature] -> IO [PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr PluginFeature -> PluginFeature)
-> Ptr PluginFeature -> IO PluginFeature
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PluginFeature -> PluginFeature
PluginFeature) [Ptr PluginFeature]
result'
Ptr (GList (Ptr PluginFeature)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr PluginFeature))
result
(a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
list
Ptr (GList (Ptr PluginFeature)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr PluginFeature))
list''
[PluginFeature] -> IO [PluginFeature]
forall (m :: * -> *) a. Monad m => a -> m a
return [PluginFeature]
result''
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_plugin_feature_list_debug" gst_plugin_feature_list_debug ::
Ptr (GList (Ptr PluginFeature)) ->
IO ()
pluginFeatureListDebug ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
[a]
-> m ()
pluginFeatureListDebug :: [a] -> m ()
pluginFeatureListDebug [a]
list = 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 PluginFeature]
list' <- (a -> IO (Ptr PluginFeature)) -> [a] -> IO [Ptr PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [a]
list
Ptr (GList (Ptr PluginFeature))
list'' <- [Ptr PluginFeature] -> IO (Ptr (GList (Ptr PluginFeature)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr PluginFeature]
list'
Ptr (GList (Ptr PluginFeature)) -> IO ()
gst_plugin_feature_list_debug Ptr (GList (Ptr PluginFeature))
list''
(a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
list
Ptr (GList (Ptr PluginFeature)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr PluginFeature))
list''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_plugin_feature_list_free" gst_plugin_feature_list_free ::
Ptr (GList (Ptr PluginFeature)) ->
IO ()
pluginFeatureListFree ::
(B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
[a]
-> m ()
pluginFeatureListFree :: [a] -> m ()
pluginFeatureListFree [a]
list = 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 PluginFeature]
list' <- (a -> IO (Ptr PluginFeature)) -> [a] -> IO [Ptr PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject [a]
list
Ptr (GList (Ptr PluginFeature))
list'' <- [Ptr PluginFeature] -> IO (Ptr (GList (Ptr PluginFeature)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr PluginFeature]
list'
Ptr (GList (Ptr PluginFeature)) -> IO ()
gst_plugin_feature_list_free Ptr (GList (Ptr PluginFeature))
list''
(a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
list
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_plugin_feature_rank_compare_func" gst_plugin_feature_rank_compare_func ::
Ptr () ->
Ptr () ->
IO Int32
pluginFeatureRankCompareFunc ::
(B.CallStack.HasCallStack, MonadIO m) =>
Ptr ()
-> Ptr ()
-> m Int32
pluginFeatureRankCompareFunc :: Ptr () -> Ptr () -> m Int32
pluginFeatureRankCompareFunc Ptr ()
p1 Ptr ()
p2 = 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
$ do
Int32
result <- Ptr () -> Ptr () -> IO Int32
gst_plugin_feature_rank_compare_func Ptr ()
p1 Ptr ()
p2
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
#endif