gi-gst-1.0.23: GStreamer bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
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[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

Exported types

newtype ChildProxy Source #

Memory-managed wrapper type.

Constructors

ChildProxy (ManagedPtr ChildProxy) 

Instances

Instances details
Eq ChildProxy Source # 
Instance details

Defined in GI.Gst.Interfaces.ChildProxy

Methods

(==) :: ChildProxy -> ChildProxy -> Bool

(/=) :: ChildProxy -> ChildProxy -> Bool

GObject ChildProxy Source # 
Instance details

Defined in GI.Gst.Interfaces.ChildProxy

ManagedPtrNewtype ChildProxy Source # 
Instance details

Defined in GI.Gst.Interfaces.ChildProxy

Methods

toManagedPtr :: ChildProxy -> ManagedPtr ChildProxy

TypedObject ChildProxy Source # 
Instance details

Defined in GI.Gst.Interfaces.ChildProxy

Methods

glibType :: IO GType

IsGValue ChildProxy Source #

Convert ChildProxy to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gst.Interfaces.ChildProxy

Methods

toGValue :: ChildProxy -> IO GValue

fromGValue :: GValue -> IO ChildProxy

HasParentTypes ChildProxy Source # 
Instance details

Defined in GI.Gst.Interfaces.ChildProxy

type ParentTypes ChildProxy Source # 
Instance details

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

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

Overloaded 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 "child-added" 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 "child-removed" 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). Unref after usage.

MT safe.

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. Unref after usage.

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 #

Arguments

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

parent: the parent object

-> m Word32

Returns: the number of child objects

MT safe.

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 GObjects target is the same as object.

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

MT safe.

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 C_ChildProxyChildAddedCallback = Ptr () -> Ptr Object -> CString -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

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 -> 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

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

childRemoved

type C_ChildProxyChildRemovedCallback = Ptr () -> Ptr Object -> CString -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

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 -> 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

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