SignalGroup
#GSignalGroup 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 #GSignalGroup:target and connect all the signals you need. When the #GtkTextView:buffer property changes all of the signals will be transitioned correctly.
Skipped during bindings generation
parameter
notify
: ClosureNotifymethod
target
: Property has no gettermethod
target-type
: Property has no getter nor setter
Since
2.72
Constructors
Functions
Creates a binding between @source_property on @source and @target_property on @target.
Creates a binding between @source_property on @source and @target_property on @target, allowing you to set the transformation functions to be used by the binding.
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.
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.
Connects @c_handler to the signal @detailed_signal on the target instance of @self.
This signal is emitted when the target instance of @self is set to a new #GObject.
This function is intended for #GObject implementations to re-enforce a floating-ref object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
Increases the freeze count on @object. If the freeze count is non-zero, the emission of "notify" signals on @object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.
Gets a property of an object.
Checks whether @object has a floating-ref reference.
Emits a "notify" signal for the property specified by @pspec on @object.
Releases all references to other objects. This can be used to break reference cycles.
Sets a property on an object.
Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on @object and when it reaches zero, queued "notify" signals are emitted.
This function essentially limits the life time of the @closure to the life time of the object. That is, when the object is finalized, the @closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the @closure, to ensure that an extra reference count is held on @object during invocation of the