Package: gobject

Function g-object-bind-property

Lambda List

g-object-bind-property (source source-prop target target-prop flags)

Arguments

source -- a g-object source instance
source-prop -- a string with the property on source to bind
target -- a g-object target instance
target-prop -- a string with the property on target to bind
flags -- a g-binding-flags value to pass to the binding

Return Value

The g-binding instance representing the binding between the two g-object instances.

Details

Creates a binding between source-prop on source and target-prop on target. Whenever the source-prop is changed the target-prop is updated using the same value. For instance:
(g-object-bind-property action "active" widget "sensitive" :default)  
will result in the sensitive property of the widget to be updated with the same value of the active property of the action.

If the flags argument contains the :bidirectional value then the binding will be mutual. If the target-prop property on target changes then the source-prop property on source will be updated as well.

The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call the g_object_unref() function on the returned g-binding instance.

A g-object instance can have multiple bindings.
 

See also

*2021-12-15