staticvoidwl_signal_add(structwl_signal*signal,structwl_listener*listener)[inline],[static]
Add the specified listener to this signal.
Parameterssignal The signal that will emit events to the listener
listener The listener to add
staticvoidwl_signal_emit(structwl_signal*signal,void*data)[inline],[static]
Emits this signal, notifying all registered listeners.
Parameterssignal The signal object that will emit the signal
data The data that will be emitted with the signal
voidwl_signal_emit_mutable(structwl_signal*signal,void*data)
Emits this signal, notifying all registered listeners.
A safer version of wl_signal_emit() which can gracefully handle additions and deletions of any signal
listener from within listener notification callbacks.
Listeners deleted during a signal emission and which have not already been notified at the time of
deletion are not notified by that emission.
Listeners added (or readded) during signal emission are ignored by that emission.
Note that repurposing a listener without explicitly removing it and readding it is not supported and can
lead to unexpected behavior.
Parameterssignal The signal object that will emit the signal
data The data that will be emitted with the signal
Since
1.20.90
staticstructwl_listener*wl_signal_get(structwl_signal*signal,wl_notify_func_tnotify)[inline],[static]
Gets the listener struct for the specified callback.
Parameterssignal The signal that contains the specified listener
notify The listener that is the target of this search
Returns
the list item that corresponds to the specified listener, or NULL if none was found
staticvoidwl_signal_init(structwl_signal*signal)[inline],[static]
Initialize a new wl_signal for use.
Parameterssignal The signal that will be initialized