Class
IdeSignalGroup
Description
final class Ide.SignalGroup : GObject.Object {
/* No available fields */
}
IdeSignalGroup
manages to simplify 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 IdeSignalGroup:target
and connect
all the signals you need. When the GtkTextView:buffer
property changes
all of the signals will be transitioned correctly.
Instance methods
ide_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.
ide_signal_group_connect
Connects callback
to the signal detailed_signal
on the target instance of self
.
ide_signal_group_connect_after
Connects callback
to the signal detailed_signal
on the target instance of self
.
ide_signal_group_connect_data
Connects callback
to the signal detailed_signal
on the target instance of self
.
ide_signal_group_connect_object
Connects callback
to the signal detailed_signal
on the target object of self
.
ide_signal_group_connect_swapped
Connects callback
to the signal detailed_signal
on the target instance of self
.
ide_signal_group_set_target
Sets the target instance used when connecting signals. Any signal
that has been registered with ide_signal_group_connect_object()
or
similar functions will be connected to this object.
ide_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.
Signals
Ide.SignalGroup::bind
This signal is emitted when the target instance of self
is set to a new GObject
.
Ide.SignalGroup::unbind
This signal is emitted when the target instance of self
is set to a new GObject
.
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.