Trait gstreamer::prelude::ChildProxyExt
source · pub trait ChildProxyExt:
IsA<ChildProxy>
+ Sealed
+ 'static {
// Provided methods
fn child_added(&self, child: &impl IsA<Object>, name: &str) { ... }
fn child_removed(&self, child: &impl IsA<Object>, name: &str) { ... }
fn child_by_index(&self, index: u32) -> Option<Object> { ... }
fn child_by_name(&self, name: &str) -> Option<Object> { ... }
fn child_by_name_recurse(&self, name: &str) -> Option<Object> { ... }
fn children_count(&self) -> u32 { ... }
fn connect_child_added<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_child_removed<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn child_added(&self, child: &impl IsA<Object>, name: &str)
fn child_added(&self, child: &impl IsA<Object>, name: &str)
sourcefn child_removed(&self, child: &impl IsA<Object>, name: &str)
fn child_removed(&self, child: &impl IsA<Object>, name: &str)
sourcefn child_by_index(&self, index: u32) -> Option<Object>
fn child_by_index(&self, index: u32) -> Option<Object>
sourcefn child_by_name(&self, name: &str) -> Option<Object>
fn child_by_name(&self, name: &str) -> Option<Object>
Looks up a child element by the given name.
This virtual method has a default implementation that uses Object
together with GstObjectExt::name()
. If the interface is to be used with
GObjects
, this methods needs to be overridden.
§name
the child’s name
§Returns
the child object or None
if
not found.
sourcefn child_by_name_recurse(&self, name: &str) -> Option<Object>
fn child_by_name_recurse(&self, name: &str) -> Option<Object>
Looks up a child element by the given full-path name.
Similar to child_by_name()
, this method
searches and returns a child given a name. The difference is that
this method allows a hierarchical path in the form of
child1::child2::child3. In the later example this method would
return a reference to child3, if found. The name should be made of
element names only and should not contain any property names.
§name
the full-path child’s name
§Returns
the child object or None
if
not found.
sourcefn children_count(&self) -> u32
fn children_count(&self) -> u32
sourcefn connect_child_added<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_child_added<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Will be emitted after the object
was added to the child_proxy
.
§object
the glib::Object
that was added
§name
the name of the new child
sourcefn connect_child_removed<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_child_removed<F: Fn(&Self, &Object, &str) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Will be emitted after the object
was removed from the child_proxy
.
§object
the glib::Object
that was removed
§name
the name of the old child