## GBindingGroup GBindingGroup — Binding multiple properties as a group |

## Functions

GBindingGroup * | g_binding_group_new ()
gpointer | g_binding_group_dup_source ()
void | g_binding_group_set_source ()
void | g_binding_group_bind ()
void | g_binding_group_bind_full ()
void | g_binding_group_bind_with_closures ()

## Properties

GObject * | source | Read / Write

## Types and Values

| GBindingGroup

## Object Hierarchy

        GObject
        ╰── GBindingGroup

## Includes

    #include <glib-object.h>

## Description

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()`.

## Functions

### g_binding_group_new ()

    GBindingGroup *
    g_binding_group_new (void);

Creates a new GBindingGroup.

#### Returns

a new GBindingGroup.

[transfer full]

Since: 2.72

### g_binding_group_dup_source ()

    gpointer
    g_binding_group_dup_source (GBindingGroup *self);

Gets the source object used for binding properties.

#### Parameters

self | the GBindingGroup |

#### Returns

a GObject or `NULL`.

[transfer none][nullable][type GObject]

Since: 2.72

### g_binding_group_set_source ()

    void
    g_binding_group_set_source (GBindingGroup *self,
                                gpointer 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

self | the GBindingGroup |
source | the source GObject, or `NULL` to clear it. | [type GObject][nullable][transfer none]

Since: 2.72

### g_binding_group_bind ()

    void
    g_binding_group_bind (GBindingGroup *self,
                          const gchar *source_property,
                          gpointer target,
                          const gchar *target_property,
                          GBindingFlags 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

self | the GBindingGroup |
source_property | the property on the source to bind |
target | the target GObject. | [type GObject][transfer none][not nullable]
target_property | the property on `target` to bind |
flags | the flags used to create the GBinding |

Since: 2.72

### g_binding_group_bind_full ()

    void
    g_binding_group_bind_full (GBindingGroup *self,
                               const gchar *source_property,
                               gpointer target,
                               const gchar *target_property,
                               GBindingFlags flags,
                               GBindingTransformFunc transform_to,
                               GBindingTransformFunc transform_from,
                               gpointer user_data,
                               GDestroyNotify 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

self | the GBindingGroup |
source_property | the property on the source to bind |
target | the target GObject. | [type GObject][transfer none][not nullable]
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. | [scope notified][nullable]
transform_from | the transformation function from the `target` to the source object, or `NULL` to use the default. | [scope notified][nullable]
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 |

Since: 2.72

### g_binding_group_bind_with_closures ()

    void
    g_binding_group_bind_with_closures (GBindingGroup *self,
                                        const gchar *source_property,
                                        gpointer target,
                                        const gchar *target_property,
                                        GBindingFlags flags,
                                        GClosure *transform_to,
                                        GClosure *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.

[rename-to g_binding_group_bind_full]

#### Parameters

self | the GBindingGroup |
source_property | the property on the source to bind |
target | the target GObject. | [type GObject][transfer none][not nullable]
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. | [nullable][transfer none]
transform_from | a GClosure wrapping the transformation function from the `target` to the source object, or `NULL` to use the default. | [nullable][transfer none]

Since: 2.72

## Types and Values

### GBindingGroup

    typedef struct _GBindingGroup GBindingGroup;

GBindingGroup is an opaque structure whose members cannot be accessed directly.

Since: 2.72

## Property Details

### The `“source”` property

      “source”                   GObject *

The source object used for binding properties.

[nullable]

Owner: GBindingGroup

Flags: Read / Write

Since: 2.72