SignalGroup
Added in version 2.72.
Superclasses: Object
- Constructors:
SignalGroup(**properties)
new(target_type:GType) -> GObject.SignalGroup
Constructors
- class SignalGroup
- classmethod new(target_type: type) SignalGroup
Creates a new
SignalGroup
for target instances oftarget_type
.Added in version 2.72.
- Parameters:
target_type – the
Type
of the target instance.
Methods
- class SignalGroup
- block() None
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.
Added in version 2.72.
- connect_closure(detailed_signal: str, closure: Callable[[...], Any], after: bool) None
Connects
closure
to the signaldetailed_signal
onSignalGroup
:target.You cannot connect a signal handler after
SignalGroup
:target has been set.Added in version 2.74.
- Parameters:
detailed_signal – a string of the form
signal-name
with optional::signal-detail
closure – the closure to connect.
after – whether the handler should be called before or after the default handler of the signal.
- connect_data(detailed_signal: str, c_handler: Callable[[...], None], flags: ConnectFlags, *data: Any) None
Connects
c_handler
to the signaldetailed_signal
on the target instance ofself
.You cannot connect a signal handler after
SignalGroup
:target has been set.Added in version 2.72.
- Parameters:
detailed_signal – a string of the form “signal-name::detail”
c_handler – the
Callback
to connectflags – the flags used to create the signal connection
data – the data to pass to
c_handler
calls
- connect_swapped(detailed_signal: str, c_handler: Callable[[...], None], *data: Any) None
Connects
c_handler
to the signaldetailed_signal
on the target instance ofself
.The instance on which the signal is emitted and
data
will be swapped when callingc_handler
.You cannot connect a signal handler after
SignalGroup
:target has been set.Added in version 2.72.
- Parameters:
detailed_signal – a string of the form “signal-name::detail”
c_handler – the
Callback
to connectdata – the data to pass to
c_handler
calls
- dup_target() Object | None
Gets the target instance used when connecting signals.
Added in version 2.72.
- set_target(target: Object | None = None) None
Sets the target instance used when connecting signals. Any signal that has been registered with
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
.Added in version 2.72.
- Parameters:
target – The target instance used when connecting signals.
Properties
Signals
- class SignalGroup.signals
- bind(instance: Object) None
This signal is emitted when
SignalGroup
:target is set to a new value other thanNone
. It is similar toObject
::notify ontarget
except it will not emit whenSignalGroup
:target isNone
and also allows for receiving theObject
without a data-race.Added in version 2.72.
- Parameters:
instance – a
Object
containing the new value forSignalGroup
:target