Top | ![]() |
![]() |
![]() |
![]() |
void | bt_child_proxy_get () |
GObject * | bt_child_proxy_get_child_by_index () |
GObject * | bt_child_proxy_get_child_by_name () |
guint | bt_child_proxy_get_children_count () |
void | bt_child_proxy_get_property () |
void | bt_child_proxy_get_valist () |
gboolean | bt_child_proxy_lookup () |
void | bt_child_proxy_set () |
void | bt_child_proxy_set_property () |
void | bt_child_proxy_set_valist () |
This interface abstracts handling of property sets for elements with children. Imagine elements such as mixers or polyphonic generators. They all have multiple GstPad or some kind of voice objects. Another use case are container elements like GstBin. 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 bt_child_proxy_get()
and bt_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" are objects that implement the interface or are properties that return a GObject. The later is a convenient way to set or get properties a few hops down the hierarchy in one go (without being able to forget the unrefs of the intermediate objects).
void bt_child_proxy_get (gpointer object
,const gchar *first_property_name
,...
);
Gets properties of the parent object and its children.
GObject * bt_child_proxy_get_child_by_index (BtChildProxy *parent
,guint index
);
Fetches a child by its number.
GObject * bt_child_proxy_get_child_by_name (BtChildProxy *parent
,const gchar *name
);
Looks up a child element by the given name.
guint
bt_child_proxy_get_children_count (BtChildProxy *parent
);
Gets the number of child objects this parent contains.
void bt_child_proxy_get_property (GObject *object
,const gchar *name
,GValue *value
);
Gets a single property using the BtChildProxy mechanism.
You are responsible for for freeing it by calling g_value_unset()
object |
object to query |
|
name |
name of the property |
|
value |
a GValue that should take the result. |
void bt_child_proxy_get_valist (GObject *object
,const gchar *first_property_name
,va_list var_args
);
Gets properties of the parent object and its children.
gboolean bt_child_proxy_lookup (GObject *object
,const gchar *name
,GObject **target
,GParamSpec **pspec
);
Looks up which object and GParamSpec would be effected by the given name
.
object |
object to lookup the property in |
|
name |
name of the property to look up |
|
target |
pointer to a GObject that takes the real object to set property on |
|
pspec |
pointer to take the GParamSpec describing the property |
void bt_child_proxy_set (gpointer object
,const gchar *first_property_name
,...
);
Sets properties of the parent object and its children.
void bt_child_proxy_set_property (GObject *object
,const gchar *name
,const GValue *value
);
Sets a single property using the BtChildProxy mechanism.
object |
the parent object |
|
name |
name of the property to set |
|
value |
new GValue for the property |
struct BtChildProxyInterface { /* virtual methods */ GObject *(*get_child_by_name)(BtChildProxy *parent,const gchar *name); GObject *(*get_child_by_index) (BtChildProxy *parent,guint index); guint (*get_children_count) (BtChildProxy *parent); };
BtChildProxy interface.