Package: gobject

Function gobject:object-bind-property-full

Lambda List

gobject:object-bind-property-full (source source-prop target target-prop flags transform-to transform-from)

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
transform-to -- a g:binding-transform-func callback function from the source to the target, or nil to use the default
transform-form -- a g:binding-transform-func callback function from the target to the source, or nil to use the default

Return Value

The g:binding object representing the binding between source and target.

Details

Complete version of the g:object-bind-property function. Creates a binding between source-prop on source and target-prop on target, allowing you to set the transformation functions to be used by the binding.

If flags contains the :birectional value then the binding will be mutual: if target-prop on target changes then the source-prop on source will be updated as well. The transform-from function is only used in case of bidirectional bindings, otherwise it will be ignored.

The binding will automatically be removed when either the source or the target instances are finalized. This will release the reference that is being held on the g:binding object. If you want to hold on to the g:binding object, you will need to hold a reference to it. To remove the binding, call the g:binding-unbind function.

A g:object instance can have multiple bindings.
 

See also

2024-12-7