Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
This interface abstracts handling of property sets for elements with
children. Imagine elements such as mixers or polyphonic generators. They all
have multiple Pad
or some kind of voice objects. Another use case are
container elements like Bin
.
The element implementing the interface acts as a parent for those child
objects.
By implementing this interface the child properties can be accessed from the
parent element by using gst_child_proxy_get()
and gst_child_proxy_set()
.
Property names are written as "child-name[propertyName](#g:signal:propertyName)". The whole naming
scheme is recursive. Thus "child1[child2](g:signal:property)" is valid too, if
"child1" and "child2" implement the ChildProxy
interface.
Synopsis
- newtype ChildProxy = ChildProxy (ManagedPtr ChildProxy)
- class (GObject o, IsDescendantOf ChildProxy o) => IsChildProxy o
- toChildProxy :: (MonadIO m, IsChildProxy o) => o -> m ChildProxy
- childProxyChildAdded :: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) => a -> b -> Text -> m ()
- childProxyChildRemoved :: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) => a -> b -> Text -> m ()
- childProxyGetChildByIndex :: (HasCallStack, MonadIO m, IsChildProxy a) => a -> Word32 -> m (Maybe Object)
- childProxyGetChildByName :: (HasCallStack, MonadIO m, IsChildProxy a) => a -> Text -> m (Maybe Object)
- childProxyGetChildrenCount :: (HasCallStack, MonadIO m, IsChildProxy a) => a -> m Word32
- childProxyGetProperty :: (HasCallStack, MonadIO m, IsChildProxy a) => a -> Text -> m GValue
- childProxyLookup :: (HasCallStack, MonadIO m, IsChildProxy a) => a -> Text -> m (Bool, Object, GParamSpec)
- childProxySetProperty :: (HasCallStack, MonadIO m, IsChildProxy a) => a -> Text -> GValue -> m ()
- type C_ChildProxyChildAddedCallback = Ptr () -> Ptr Object -> CString -> Ptr () -> IO ()
- type ChildProxyChildAddedCallback = Object -> Text -> IO ()
- afterChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildAddedCallback -> m SignalHandlerId
- genClosure_ChildProxyChildAdded :: MonadIO m => ChildProxyChildAddedCallback -> m (GClosure C_ChildProxyChildAddedCallback)
- mk_ChildProxyChildAddedCallback :: C_ChildProxyChildAddedCallback -> IO (FunPtr C_ChildProxyChildAddedCallback)
- noChildProxyChildAddedCallback :: Maybe ChildProxyChildAddedCallback
- onChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildAddedCallback -> m SignalHandlerId
- wrap_ChildProxyChildAddedCallback :: ChildProxyChildAddedCallback -> C_ChildProxyChildAddedCallback
- type C_ChildProxyChildRemovedCallback = Ptr () -> Ptr Object -> CString -> Ptr () -> IO ()
- type ChildProxyChildRemovedCallback = Object -> Text -> IO ()
- afterChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildRemovedCallback -> m SignalHandlerId
- genClosure_ChildProxyChildRemoved :: MonadIO m => ChildProxyChildRemovedCallback -> m (GClosure C_ChildProxyChildRemovedCallback)
- mk_ChildProxyChildRemovedCallback :: C_ChildProxyChildRemovedCallback -> IO (FunPtr C_ChildProxyChildRemovedCallback)
- noChildProxyChildRemovedCallback :: Maybe ChildProxyChildRemovedCallback
- onChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildRemovedCallback -> m SignalHandlerId
- wrap_ChildProxyChildRemovedCallback :: ChildProxyChildRemovedCallback -> C_ChildProxyChildRemovedCallback
Exported types
newtype ChildProxy Source #
Memory-managed wrapper type.
ChildProxy (ManagedPtr ChildProxy) |
Instances
Eq ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy (==) :: ChildProxy -> ChildProxy -> Bool (/=) :: ChildProxy -> ChildProxy -> Bool | |
GObject ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy | |
ManagedPtrNewtype ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy toManagedPtr :: ChildProxy -> ManagedPtr ChildProxy | |
TypedObject ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy glibType :: IO GType | |
IsGValue ChildProxy Source # | Convert |
Defined in GI.Gst.Interfaces.ChildProxy toGValue :: ChildProxy -> IO GValue fromGValue :: GValue -> IO ChildProxy | |
HasParentTypes ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy | |
type ParentTypes ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy type ParentTypes ChildProxy = '[Object] |
class (GObject o, IsDescendantOf ChildProxy o) => IsChildProxy o Source #
Type class for types which can be safely cast to ChildProxy
, for instance with toChildProxy
.
Instances
(GObject o, IsDescendantOf ChildProxy o) => IsChildProxy o Source # | |
Defined in GI.Gst.Interfaces.ChildProxy |
toChildProxy :: (MonadIO m, IsChildProxy o) => o -> m ChildProxy Source #
Cast to ChildProxy
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
childAdded
:: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () |
Emits the "child-added" signal.
childRemoved
childProxyChildRemoved Source #
:: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () |
Emits the "child-removed" signal.
getChildByIndex
childProxyGetChildByIndex Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Word32 |
|
-> m (Maybe Object) | Returns: the child object or MT safe. |
Fetches a child by its number.
getChildByName
childProxyGetChildByName Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Text |
|
-> m (Maybe Object) | Returns: the child object or MT safe. |
Looks up a child element by the given name.
This virtual method has a default implementation that uses Object
together with objectGetName
. If the interface is to be used with
GObjects
, this methods needs to be overridden.
getChildrenCount
childProxyGetChildrenCount Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> m Word32 | Returns: the number of child objects MT safe. |
Gets the number of child objects this parent contains.
getProperty
childProxyGetProperty Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Text |
|
-> m GValue |
Gets a single property using the GstChildProxy mechanism.
You are responsible for freeing it by calling valueUnset
lookup
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Text |
|
-> m (Bool, Object, GParamSpec) | Returns: |
Looks up which object and ParamSpec
would be effected by the given name
.
MT safe.
setProperty
childProxySetProperty Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Text |
|
-> GValue |
|
-> m () |
Sets a single property using the GstChildProxy mechanism.
Signals
childAdded
type C_ChildProxyChildAddedCallback = Ptr () -> Ptr Object -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ChildProxyChildAddedCallback Source #
= Object |
|
-> Text |
|
-> IO () |
Will be emitted after the object
was added to the childProxy
.
afterChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the childAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
childProxy #childAdded callback
genClosure_ChildProxyChildAdded :: MonadIO m => ChildProxyChildAddedCallback -> m (GClosure C_ChildProxyChildAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_ChildProxyChildAddedCallback :: C_ChildProxyChildAddedCallback -> IO (FunPtr C_ChildProxyChildAddedCallback) Source #
Generate a function pointer callable from C code, from a C_ChildProxyChildAddedCallback
.
noChildProxyChildAddedCallback :: Maybe ChildProxyChildAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ChildProxyChildAddedCallback
onChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the childAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
childProxy #childAdded callback
wrap_ChildProxyChildAddedCallback :: ChildProxyChildAddedCallback -> C_ChildProxyChildAddedCallback Source #
Wrap a ChildProxyChildAddedCallback
into a C_ChildProxyChildAddedCallback
.
childRemoved
type C_ChildProxyChildRemovedCallback = Ptr () -> Ptr Object -> CString -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type ChildProxyChildRemovedCallback Source #
= Object |
|
-> Text |
|
-> IO () |
Will be emitted after the object
was removed from the childProxy
.
afterChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the childRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
childProxy #childRemoved callback
genClosure_ChildProxyChildRemoved :: MonadIO m => ChildProxyChildRemovedCallback -> m (GClosure C_ChildProxyChildRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_ChildProxyChildRemovedCallback :: C_ChildProxyChildRemovedCallback -> IO (FunPtr C_ChildProxyChildRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_ChildProxyChildRemovedCallback
.
noChildProxyChildRemovedCallback :: Maybe ChildProxyChildRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
ChildProxyChildRemovedCallback
onChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ChildProxyChildRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the childRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
childProxy #childRemoved callback