Connects a callback to a signal for an object. Pass the returned ID to
disconnect() to remove the handler.
If callback returns true, emission will stop and no other handlers will be
invoked.
Warning: Unlike GObject signals,
thiswithin a signal callback will always refer to the global object (ie.globalThis).
A signal name
A callback function
A handler ID
Disconnects a handler for a signal.
The ID of the handler to be disconnected
Disconnects all signal handlers for an object.
Emits a signal for an object. Emission stops if a signal handler returns true.
Unlike GObject signals, it is not necessary to declare signals or define their
signature. Simply call emit() with whatever signal name you wish, with
whatever arguments you wish.
A signal name
Any number of arguments, of any type
Checks if a handler ID is connected.
The ID of the handler to be disconnected
true if connected, or false if not
You can use the
Signals.addSignalMethodsmethod to apply theSignalsconvenience methods to anObject. Generally, this is called on an object prototype, but may also be called on an object instance. You can use this Interface for this object or prototype to make the methods in typescript knownExample