Class BindingGroup

All Implemented Interfaces:
PointerInterface

public class BindingGroup extends Object
The #GBindingGroup can be used to bind multiple properties
from an object collectively.

Use the various methods to bind properties from a single source
object to multiple destination objects. Properties can be bound
bidirectionally and are connected when the source object is set
with g_binding_group_set_source().

https://docs.gtk.org/gobject/class.BindingGroup.html

  • Constructor Details

    • BindingGroup

      public BindingGroup(PointerContainer pointer)
    • BindingGroup

      public BindingGroup()
      Creates a new #GBindingGroup.
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • bind

      public void bind(@Nonnull Str source_property, @Nonnull Pointer target, @Nonnull Str target_property, int flags)
      Creates a binding between @source_property on the source object
      and @target_property on @target. Whenever the @source_property
      is changed the @target_property is updated using the same value.
      The binding flag %G_BINDING_SYNC_CREATE is automatically specified.

      See g_object_bind_property() for more information.
      Parameters:
      source_property - the property on the source to bind
      target - the target #GObject
      target_property - the property on @target to bind
      flags - the flags used to create the #GBinding
    • bind

      public void bind(String source_property, @Nonnull Pointer target, String target_property, int flags)
      Creates a binding between @source_property on the source object
      and @target_property on @target. Whenever the @source_property
      is changed the @target_property is updated using the same value.
      The binding flag %G_BINDING_SYNC_CREATE is automatically specified.

      See g_object_bind_property() for more information.
      Parameters:
      source_property - the property on the source to bind
      target - the target #GObject
      target_property - the property on @target to bind
      flags - the flags used to create the #GBinding
    • bindFull

      public void bindFull(@Nonnull Str source_property, @Nonnull Pointer target, @Nonnull Str target_property, int flags, BindingGroup.OnBindingTransformFunc transform_to, BindingGroup.OnBindingTransformFunc transform_from, @Nullable Pointer user_data, BindingGroup.OnDestroyNotify user_data_destroy)
      Creates a binding between @source_property on the source object and
      @target_property on @target, allowing you to set the transformation
      functions to be used by the binding. The binding flag
      %G_BINDING_SYNC_CREATE is automatically specified.

      See g_object_bind_property_full() for more information.
      Parameters:
      source_property - the property on the source to bind
      target - the target #GObject
      target_property - the property on @target to bind
      flags - the flags used to create the #GBinding
      transform_to - the transformation function from the source object to the @target, or %NULL to use the default
      transform_from - the transformation function from the @target to the source object, or %NULL to use the default
      user_data - custom data to be passed to the transformation functions, or %NULL
      user_data_destroy - function to be called when disposing the binding, to free the resources used by the transformation functions
    • bindFull

      public void bindFull(String source_property, @Nonnull Pointer target, String target_property, int flags, BindingGroup.OnBindingTransformFunc transform_to, BindingGroup.OnBindingTransformFunc transform_from, @Nullable Pointer user_data, BindingGroup.OnDestroyNotify user_data_destroy)
      Creates a binding between @source_property on the source object and
      @target_property on @target, allowing you to set the transformation
      functions to be used by the binding. The binding flag
      %G_BINDING_SYNC_CREATE is automatically specified.

      See g_object_bind_property_full() for more information.
      Parameters:
      source_property - the property on the source to bind
      target - the target #GObject
      target_property - the property on @target to bind
      flags - the flags used to create the #GBinding
      transform_to - the transformation function from the source object to the @target, or %NULL to use the default
      transform_from - the transformation function from the @target to the source object, or %NULL to use the default
      user_data - custom data to be passed to the transformation functions, or %NULL
      user_data_destroy - function to be called when disposing the binding, to free the resources used by the transformation functions
    • bindWithClosures

      public void bindWithClosures(@Nonnull Str source_property, @Nonnull Pointer target, @Nonnull Str target_property, int flags, @Nullable Closure transform_to, @Nullable Closure transform_from)
      Creates a binding between @source_property on the source object and
      @target_property on @target, allowing you to set the transformation
      functions to be used by the binding. The binding flag
      %G_BINDING_SYNC_CREATE is automatically specified.

      This function is the language bindings friendly version of
      g_binding_group_bind_property_full(), using #GClosures
      instead of function pointers.

      See g_object_bind_property_with_closures() for more information.
      Parameters:
      source_property - the property on the source to bind
      target - the target #GObject
      target_property - the property on @target to bind
      flags - the flags used to create the #GBinding
      transform_to - a #GClosure wrapping the transformation function from the source object to the @target, or %NULL to use the default
      transform_from - a #GClosure wrapping the transformation function from the @target to the source object, or %NULL to use the default
    • bindWithClosures

      public void bindWithClosures(String source_property, @Nonnull Pointer target, String target_property, int flags, @Nullable Closure transform_to, @Nullable Closure transform_from)
      Creates a binding between @source_property on the source object and
      @target_property on @target, allowing you to set the transformation
      functions to be used by the binding. The binding flag
      %G_BINDING_SYNC_CREATE is automatically specified.

      This function is the language bindings friendly version of
      g_binding_group_bind_property_full(), using #GClosures
      instead of function pointers.

      See g_object_bind_property_with_closures() for more information.
      Parameters:
      source_property - the property on the source to bind
      target - the target #GObject
      target_property - the property on @target to bind
      flags - the flags used to create the #GBinding
      transform_to - a #GClosure wrapping the transformation function from the source object to the @target, or %NULL to use the default
      transform_from - a #GClosure wrapping the transformation function from the @target to the source object, or %NULL to use the default
    • dupSource

      public Pointer dupSource()
      Gets the source object used for binding properties.
      Returns:
      a #GObject or %NULL.
    • setSource

      public void setSource(@Nullable Pointer source)
      Sets @source as the source object used for creating property
      bindings. If there is already a source object all bindings from it
      will be removed.

      Note that all properties that have been bound must exist on @source.
      Parameters:
      source - the source #GObject, or %NULL to clear it
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()