GObject.SignalGroup
Description: Reference for GObject.SignalGroup

### Class

# GObjectSignalGroup

since: 2.72

#### Description [src]

    final class GObject.SignalGroup : GObject.Object
    {
      /* No available fields */
    }

`GSignalGroup` manages a collection of signals on a `GObject`.

`GSignalGroup` simplifies the process of connecting many signals to a `GObject` as a group. As such there is no API to disconnect a signal from the group.

In particular, this allows you to:

- Change the target instance, which automatically causes disconnection of the signals from the old instance and connecting to the new instance.
- Block and unblock signals as a group
- Ensuring that blocked state transfers across target instances.

One place you might want to use such a structure is with `GtkTextView` and `GtkTextBuffer`. Often times, you’ll need to connect to many signals on `GtkTextBuffer` from a `GtkTextView` subclass. This allows you to create a signal group during instance construction, simply bind the `GtkTextView:buffer` property to `GSignalGroup:target` and connect all the signals you need. When the `GtkTextView:buffer` property changes all of the signals will be transitioned correctly.

Available since: 2.72

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### g_signal_group_new

Creates a new `GSignalGroup` for target instances of `target_type`.

since: 2.72

#### Instance methods

###### g_signal_group_block

Blocks all signal handlers managed by `self` so they will not be called during any signal emissions. Must be unblocked exactly the same number of times it has been blocked to become active again.

since: 2.72

###### g_signal_group_connect

Connects `c_handler` to the signal `detailed_signal` on the target instance of `self`.

since: 2.72

###### g_signal_group_connect_after

Connects `c_handler` to the signal `detailed_signal` on the target instance of `self`.

since: 2.72

###### g_signal_group_connect_closure

Connects `closure` to the signal `detailed_signal` on `GSignalGroup:target`.

since: 2.74

###### g_signal_group_connect_data

Connects `c_handler` to the signal `detailed_signal` on the target instance of `self`.

since: 2.72

###### g_signal_group_connect_object

Connects `c_handler` to the signal `detailed_signal` on `GSignalGroup:target`.

since: 2.72

###### g_signal_group_connect_swapped

Connects `c_handler` to the signal `detailed_signal` on the target instance of `self`.

since: 2.72

###### g_signal_group_dup_target

Gets the target instance used when connecting signals.

since: 2.72

###### g_signal_group_set_target

Sets the target instance used when connecting signals. Any signal that has been registered with `g_signal_group_connect_object()` or similar functions will be connected to this object.

since: 2.72

###### g_signal_group_unblock

Unblocks all signal handlers managed by `self` so they will be called again during any signal emissions unless it is blocked again. Must be unblocked exactly the same number of times it has been blocked to become active again.

since: 2.72

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### GObject.SignalGroup:target

The target instance used when connecting signals.

since: 2.72

###### GObject.SignalGroup:target-type

The `GType` of the target property.

since: 2.72

#### Signals

###### GObject.SignalGroup::bind

This signal is emitted when `GSignalGroup:target` is set to a new value other than `NULL`. It is similar to `GObject::notify` on `target` except it will not emit when `GSignalGroup:target` is `NULL` and also allows for receiving the `GObject` without a data-race.

since: 2.72

###### GObject.SignalGroup::unbind

This signal is emitted when the target instance of `self` is set to a new `GObject`.

since: 2.72

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.