## dzl-signal-group

dzl-signal-group

## Functions

DzlSignalGroup * | dzl_signal_group_new ()
void | dzl_signal_group_set_target ()
gpointer | dzl_signal_group_get_target ()
void | dzl_signal_group_block ()
void | dzl_signal_group_unblock ()
void | dzl_signal_group_connect_object ()
void | dzl_signal_group_connect_data ()
void | dzl_signal_group_connect ()
void | dzl_signal_group_connect_after ()
void | dzl_signal_group_connect_swapped ()

## Properties

GObject * | target | Read / Write
GType * | target-type | Read / Write / Construct Only

## Signals

void | bind | Run Last
void | unbind | Run Last

## Types and Values

#define | DZL_TYPE_SIGNAL_GROUP
| DzlSignalGroup

## Object Hierarchy

        GObject
        ╰── DzlSignalGroup

## Description

## Functions

### dzl_signal_group_new ()

    DzlSignalGroup *
    dzl_signal_group_new (GType target_type);

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

#### Parameters

target_type | the GType of the target instance. |

#### Returns

a new DzlSignalGroup

### dzl_signal_group_set_target ()

    void
    dzl_signal_group_set_target (DzlSignalGroup *self,
                                 gpointer target);

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

If the target instance was previously set, signals will be disconnected from that object prior to connecting to `target` .

#### Parameters

self | the DzlSignalGroup. |
target | The target instance used when connecting signals. | [nullable][type GObject]

### dzl_signal_group_get_target ()

    gpointer
    dzl_signal_group_get_target (DzlSignalGroup *self);

Gets the target instance used when connecting signals.

#### Parameters

self | the DzlSignalGroup |

#### Returns

The target instance.

[nullable][transfer none][type GObject]

### dzl_signal_group_block ()

    void
    dzl_signal_group_block (DzlSignalGroup *self);

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.

This blocked state will be kept across changes of the target instance.

See: `g_signal_handler_block()`.

#### Parameters

self | the DzlSignalGroup |

### dzl_signal_group_unblock ()

    void
    dzl_signal_group_unblock (DzlSignalGroup *self);

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.

See: `g_signal_handler_unblock()`.

#### Parameters

self | the DzlSignalGroup |

### dzl_signal_group_connect_object ()

    void
    dzl_signal_group_connect_object (DzlSignalGroup *self,
                                     const gchar *detailed_signal,
                                     GCallback c_handler,
                                     gpointer object,
                                     GConnectFlags flags);

Connects `callback` to the signal `detailed_signal` on the target object of `self` .

Ensures that the `object` stays alive during the call to `callback` by temporarily adding a reference count. When the `object` is destroyed the signal handler will automatically be removed.

See: `g_signal_connect_object()`.

[skip]

#### Parameters

self | a DzlSignalGroup |
detailed_signal | a string of the form "signal-name::detail" |
c_handler | the GCallback to connect. | [scope notified]
object | the GObject to pass as data to `callback` calls |

### dzl_signal_group_connect_data ()

    void
    dzl_signal_group_connect_data (DzlSignalGroup *self,
                                   const gchar *detailed_signal,
                                   GCallback c_handler,
                                   gpointer data,
                                   GClosureNotify notify,
                                   GConnectFlags flags);

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

See: `g_signal_connect_data()`.

#### Parameters

self | a DzlSignalGroup |
detailed_signal | a string of the form "signal-name::detail" |
c_handler | the GCallback to connect. | [scope notified][closure data][destroy notify]
data | the data to pass to `callback` calls |
notify | function to be called when disposing of `self` |
flags | the flags used to create the signal connection |

### dzl_signal_group_connect ()

    void
    dzl_signal_group_connect (DzlSignalGroup *self,
                              const gchar *detailed_signal,
                              GCallback c_handler,
                              gpointer data);

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

See: `g_signal_connect()`.

[skip]

#### Parameters

self | a DzlSignalGroup |
detailed_signal | a string of the form "signal-name::detail" |
c_handler | the GCallback to connect. | [scope notified]
data | the data to pass to `callback` calls |

### dzl_signal_group_connect_after ()

    void
    dzl_signal_group_connect_after (DzlSignalGroup *self,
                                    const gchar *detailed_signal,
                                    GCallback c_handler,
                                    gpointer data);

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

The `callback` will be called after the default handler of the signal.

See: `g_signal_connect_after()`.

[skip]

#### Parameters

self | a DzlSignalGroup |
detailed_signal | a string of the form "signal-name::detail" |
c_handler | the GCallback to connect. | [scope notified]
data | the data to pass to `callback` calls |

### dzl_signal_group_connect_swapped ()

    void
    dzl_signal_group_connect_swapped (DzlSignalGroup *self,
                                      const gchar *detailed_signal,
                                      GCallback c_handler,
                                      gpointer data);

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

The instance on which the signal is emitted and `data` will be swapped when calling `callback` .

See: `g_signal_connect_swapped()`.

#### Parameters

self | a DzlSignalGroup |
detailed_signal | a string of the form "signal-name::detail" |
c_handler | the GCallback to connect. | [scope async]
data | the data to pass to `callback` calls |

## Types and Values

### DZL_TYPE_SIGNAL_GROUP

    #define DZL_TYPE_SIGNAL_GROUP (dzl_signal_group_get_type())

### DzlSignalGroup

    typedef struct _DzlSignalGroup DzlSignalGroup;

## Property Details

### The `“target”` property

      “target”                   GObject *

The target instance used when connecting signals.

Owner: DzlSignalGroup

Flags: Read / Write

### The `“target-type”` property

      “target-type”              GType *

The GType of the target property.

Owner: DzlSignalGroup

Flags: Read / Write / Construct Only

Allowed values: GObject

## Signal Details

### The `“bind”` signal

    void
    user_function (DzlSignalGroup *self,
                   GObject        *instance,
                   gpointer        user_data)

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

This signal will only be emitted if the target of `self` is non-`NULL`.

#### Parameters

self | the DzlSignalGroup |
instance | a GObject |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“unbind”` signal

    void
    user_function (DzlSignalGroup *self,
                   gpointer        user_data)

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

This signal will only be emitted if the previous target of `self` is non-`NULL`.

#### Parameters

self | a DzlSignalGroup |
user_data | user data set when the signal handler was connected. |

Flags: Run Last