table of contents
- bookworm 1.21.0-1
- bookworm-backports 1.23.0-1~bpo12+1
- testing 1.23.0-1
- unstable 1.23.0-1
wl_signal(3) | Wayland | wl_signal(3) |
NAME¶
wl_signal - A source of a type of observable event.
SYNOPSIS¶
#include <wayland-server-core.h>
Public Member Functions¶
void wl_signal_emit_mutable (struct wl_signal
*signal, void *data)
Static Public Member Functions¶
static void wl_signal_init (struct wl_signal
*signal)
static void wl_signal_add (struct wl_signal *signal, struct
wl_listener *listener)
static struct wl_listener * wl_signal_get (struct
wl_signal *signal, wl_notify_func_t notify)
static void wl_signal_emit (struct wl_signal *signal, void
*data)
Data Fields¶
struct wl_list listener_list
Detailed Description¶
A source of a type of observable event.
Signals are recognized points where significant events can be observed. Compositors as well as the server can provide signals. Observers are wl_listener's that are added through wl_signal_add. Signals are emitted using wl_signal_emit, which will invoke all listeners until that listener is removed by wl_list_remove() (or whenever the signal is destroyed).
See also
Member Function Documentation¶
static void wl_signal_add (struct wl_signal * signal, struct wl_listener * listener) [inline], [static]¶
Add the specified listener to this signal.
Parameters
listener The listener to add
static void wl_signal_emit (struct wl_signal * signal, void * data) [inline], [static]¶
Emits this signal, notifying all registered listeners.
Parameters
data The data that will be emitted with the signal
void wl_signal_emit_mutable (struct wl_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.
Parameters
data The data that will be emitted with the signal
Since
static struct wl_listener * wl_signal_get (struct wl_signal * signal, wl_notify_func_t notify) [inline], [static]¶
Gets the listener struct for the specified callback.
Parameters
notify The listener that is the target of this search
Returns
static void wl_signal_init (struct wl_signal * signal) [inline], [static]¶
Initialize a new wl_signal for use.
Parameters
Field Documentation¶
struct wl_list wl_signal::listener_list¶
Author¶
Generated automatically by Doxygen for Wayland from the source code.
Mon Jul 22 2024 08:50:19 | Version 1.23.0 |