Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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::property-name
. The whole naming
scheme is recursive. Thus child1::child2::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 ChildProxyChildAddedCallback = Object -> Text -> IO ()
- afterChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ((?self :: a) => ChildProxyChildAddedCallback) -> m SignalHandlerId
- onChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ((?self :: a) => ChildProxyChildAddedCallback) -> m SignalHandlerId
- type ChildProxyChildRemovedCallback = Object -> Text -> IO ()
- afterChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ((?self :: a) => ChildProxyChildRemovedCallback) -> m SignalHandlerId
- onChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ((?self :: a) => ChildProxyChildRemovedCallback) -> m SignalHandlerId
Exported types
newtype ChildProxy Source #
Memory-managed wrapper type.
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 | |
TypedObject ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy | |
HasParentTypes ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy | |
IsGValue (Maybe ChildProxy) Source # | Convert |
Defined in GI.Gst.Interfaces.ChildProxy gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe ChildProxy -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe ChildProxy) # | |
type ParentTypes ChildProxy Source # | |
Defined in GI.Gst.Interfaces.ChildProxy |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, childAdded, childRemoved, forceFloating, freezeNotify, getv, isFloating, lookup, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getChildByIndex, getChildByName, getChildrenCount, getData, getProperty, getQdata.
Setters
childAdded
:: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () |
Emits the childAdded signal.
childRemoved
childProxyChildRemoved Source #
:: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () |
Emits the childRemoved signal.
getChildByIndex
childProxyGetChildByIndex Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Word32 |
|
-> m (Maybe Object) | Returns: the child object or |
Fetches a child by its number.
getChildByName
childProxyGetChildByName Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Text |
|
-> m (Maybe Object) | Returns: the child object or |
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 |
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
.
setProperty
childProxySetProperty Source #
:: (HasCallStack, MonadIO m, IsChildProxy a) | |
=> a |
|
-> Text |
|
-> GValue |
|
-> m () |
Sets a single property using the GstChildProxy mechanism.
Signals
childAdded
type ChildProxyChildAddedCallback Source #
Will be emitted after the object
was added to the childProxy
.
afterChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onChildProxyChildAdded :: (IsChildProxy a, MonadIO m) => a -> ((?self :: 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
childRemoved
type ChildProxyChildRemovedCallback Source #
Will be emitted after the object
was removed from the childProxy
.
afterChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onChildProxyChildRemoved :: (IsChildProxy a, MonadIO m) => a -> ((?self :: 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