gobject.signal_group
Module for [SignalGroup] class
Types 3
gobject.signal_group.SignalGroup manages a collection of signals on a gobject.object.ObjectWrap.
gobject.signal_group.SignalGroup simplifies the process of connecting many signals to a gobject.object.ObjectWrap 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 gtk.text_view.TextView and gtk.text_buffer.TextBuffer. Often times, you'll need to connect to many signals on gtk.text_buffer.TextBuffer from a gtk.text_view.TextView 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.
SignalGroupGidBuilder builder() static nothrowGet builder for [gobject.signal_group.SignalGroup] Returns: New builder objectgobject.object.ObjectWrap target() @property nothrowGet `target` property. Returns: The target instance used when connecting signals.void target(gobject.object.ObjectWrap propval) @property nothrowSet `target` property. Params: propval = The target instance used when connecting signals.gobject.types.GType targetType() @property nothrowGet `targetType` property. Returns: The #GType of the target property.void block() nothrowBlocks 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.void connectClosure(string detailedSignal, gobject.closure.Closure closure, bool after) nothrowConnects closure to the signal detailed_signal on #GSignalGroup:target.gobject.object.ObjectWrap dupTarget() nothrowGets the target instance used when connecting signals. Returns: The target instancevoid setTarget(gobject.object.ObjectWrap target = null) nothrowSets the target instance used when connecting signals. Any signal that has been registered with [gobject.signal_group.SignalGroup.connectObject] or similar functions will be connected to this object.void unblock() nothrowUnblocks 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 bloc...gulong connectBind(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gobject.object.ObjectWrap)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gobject.signal_group.SignalGroup)))
&& Parameters!T.length < 3) nothrowConnect to `Bind` signal.gulong connectUnbind(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gobject.signal_group.SignalGroup)))
&& Parameters!T.length < 2) nothrowConnect to `Unbind` signal.this(gobject.types.GType targetType)Creates a new #GSignalGroup for target instances of target_type.Fluent builder implementation template for gobject.signal_group.SignalGroup
T target(gobject.object.ObjectWrap propval) nothrowSet `target` property. Params: propval = The target instance used when connecting signals. Returns: Builder instance for fluent chainingT targetType(gobject.types.GType propval) nothrowSet `targetType` property. Params: propval = The #GType of the target property. Returns: Builder instance for fluent chainingFluent builder for gobject.signal_group.SignalGroup