Struct glib::object::BindingBuilder
source · pub struct BindingBuilder<'a, 'f, 't> { /* private fields */ }
Expand description
Builder for object property bindings.
Implementations§
source§impl<'a, 'f, 't> BindingBuilder<'a, 'f, 't>
impl<'a, 'f, 't> BindingBuilder<'a, 'f, 't>
sourcepub fn transform_from_with_values<F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static>(
self,
func: F
) -> Self
pub fn transform_from_with_values<F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static>( self, func: F ) -> Self
Transform changed property values from the target object to the source object with the given closure.
This function operates on glib::Value
s.
See Self::transform_from
for a version which operates on concrete argument and return types.
sourcepub fn transform_from<S: FromValue<'f>, T: ToValue, F: Fn(&'f Binding, S) -> Option<T> + Send + Sync + 'static>(
self,
func: F
) -> Self
pub fn transform_from<S: FromValue<'f>, T: ToValue, F: Fn(&'f Binding, S) -> Option<T> + Send + Sync + 'static>( self, func: F ) -> Self
Transform changed property values from the target object to the source object with the given closure.
This function operates on concrete argument and return types.
See Self::transform_from_with_values
for a version which operates on glib::Value
s.
sourcepub fn transform_to_with_values<F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static>(
self,
func: F
) -> Self
pub fn transform_to_with_values<F: Fn(&Binding, &Value) -> Option<Value> + Send + Sync + 'static>( self, func: F ) -> Self
Transform changed property values from the source object to the target object with the given closure.
This function operates on glib::Value
s.
See Self::transform_to
for a version which operates on concrete argument and return types.
sourcepub fn transform_to<S: FromValue<'t>, T: ToValue, F: Fn(&'t Binding, S) -> Option<T> + Send + Sync + 'static>(
self,
func: F
) -> Self
pub fn transform_to<S: FromValue<'t>, T: ToValue, F: Fn(&'t Binding, S) -> Option<T> + Send + Sync + 'static>( self, func: F ) -> Self
Transform changed property values from the source object to the target object with the given closure.
This function operates on concrete argument and return types.
See Self::transform_to_with_values
for a version which operates on glib::Value
s.
sourcepub fn flags(self, flags: BindingFlags) -> Self
pub fn flags(self, flags: BindingFlags) -> Self
Bind the properties with the given flags.
sourcepub fn bidirectional(self) -> Self
pub fn bidirectional(self) -> Self
Set the binding flags to BIDIRECTIONAL
.
sourcepub fn sync_create(self) -> Self
pub fn sync_create(self) -> Self
Set the binding flags to SYNC_CREATE
.
sourcepub fn invert_boolean(self) -> Self
pub fn invert_boolean(self) -> Self
Set the binding flags to INVERT_BOOLEAN
.