SignalGroup
Object Hierarchy:
Description:
[
CCode ( type_id =
"dzl_signal_group_get_type ()" ) ]
public class SignalGroup :
Object
SignalGroup manages to simplify the process of connecting many signals to a
Object 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 TextView and
TextBuffer. Often times, you'll need to connect to many signals on
TextBuffer from a
TextView subclass. This allows you to create a signal group during instance construction, simply bind the
buffer property to
target and connect all the signals you need. When the
buffer property changes all of the signals will be transitioned
correctly.
Content:
Properties:
Creation methods:
Methods:
- public void block ()
Blocks all signal handlers managed by this
so they will not be called during any signal emissions.
- public void connect_data (string detailed_signal, owned Callback c_handler, ConnectFlags flags)
Connects callback to the signal detailed_signal
on the target instance of this.
- public void connect_swapped (string detailed_signal, Callback c_handler)
Connects callback to the signal detailed_signal
on the target instance of this.
- public unowned Object? get_target ()
Gets the target instance used when connecting signals.
- public void set_target (Object? target)
Sets the target instance used when connecting signals.
- public void unblock ()
Unblocks all signal handlers managed by
this so they will be called again during any signal emissions unless it is blocked again.
Signals:
- public signal void bind (Object instance)
This signal is emitted when the target instance of self
is set to a new Object.
- public signal void unbind ()
This signal is emitted when the target instance of self
is set to a new Object.
Inherited Members:
All known members inherited from class GLib.Object