gi-gst-1.0.25: GStreamer bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gst.Interfaces.ChildProxy

Description

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

Exported types

newtype ChildProxy Source #

Memory-managed wrapper type.

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

Instances details
(GObject o, IsDescendantOf ChildProxy o) => IsChildProxy o Source # 
Instance details

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

childAdded

childProxyChildAdded Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) 
=> a

parent: the parent object

-> b

child: the newly added child

-> Text

name: the name of the new child

-> m () 

Emits the childAdded signal.

childRemoved

childProxyChildRemoved Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a, IsObject b) 
=> a

parent: the parent object

-> b

child: the removed child

-> Text

name: the name of the old child

-> m () 

Emits the childRemoved signal.

getChildByIndex

childProxyGetChildByIndex Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a) 
=> a

parent: the parent object to get the child from

-> Word32

index: the child's position in the child list

-> m (Maybe Object)

Returns: the child object or Nothing if not found (index too high).

Fetches a child by its number.

getChildByName

childProxyGetChildByName Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a) 
=> a

parent: the parent object to get the child from

-> Text

name: the child's name

-> m (Maybe Object)

Returns: the child object or Nothing if not found.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a) 
=> a

parent: the parent object

-> m Word32

Returns: the number of child objects

Gets the number of child objects this parent contains.

getProperty

childProxyGetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a) 
=> a

object: object to query

-> Text

name: name of the property

-> m GValue 

Gets a single property using the GstChildProxy mechanism. You are responsible for freeing it by calling valueUnset

lookup

childProxyLookup Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a) 
=> a

object: child proxy object to lookup the property in

-> Text

name: name of the property to look up

-> m (Bool, Object, GParamSpec)

Returns: True if target and pspec could be found. False otherwise. In that case the values for pspec and target are not modified. Unref target after usage. For plain Object target is the same as object.

Looks up which object and ParamSpec would be effected by the given name.

setProperty

childProxySetProperty Source #

Arguments

:: (HasCallStack, MonadIO m, IsChildProxy a) 
=> a

object: the parent object

-> Text

name: name of the property to set

-> GValue

value: new Value for the property

-> m () 

Sets a single property using the GstChildProxy mechanism.

Signals

childAdded

type ChildProxyChildAddedCallback Source #

Arguments

 = Object

object: the Object that was added

-> Text

name: the name of the new child

-> IO () 

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 #

Arguments

 = Object

object: the Object that was removed

-> Text

name: the name of the old child

-> IO () 

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