Man page - wl_listener(3)
Packages contas this manual
- wl_event_queue(3)
- wl_shm_sigbus_data(3)
- wl_event_loop(3)
- wl_cursor_image(3)
- wl_global(3)
- wl_socket(3)
- wl_resource_iterator_context(3)
- wl_object(3)
- wl_proxy(3)
- wl_argument(3)
- wl_listener(3)
- wl_client(3)
- wl_display(3)
- wl_message(3)
- wl_list(3)
- wl_interface(3)
- wl_event_source(3)
- wl_protocol_logger(3)
- wl_array(3)
- wl_shm_pool(3)
- wl_resource(3)
- wl_cursor_theme(3)
- wl_cursor(3)
- wl_shm_buffer(3)
- wl_protocol_logger_message(3)
- wl_signal(3)
- wl_event_queue(3)
- wl_shm_sigbus_data(3)
- wl_event_loop(3)
- wl_cursor_image(3)
- wl_global(3)
- wl_socket(3)
- wl_resource_iterator_context(3)
- wl_object(3)
- wl_proxy(3)
- wl_argument(3)
- wl_listener(3)
- wl_client(3)
- wl_display(3)
- wl_message(3)
- wl_list(3)
- wl_interface(3)
- wl_event_source(3)
- wl_protocol_logger(3)
- wl_array(3)
- wl_shm_pool(3)
- wl_resource(3)
- wl_cursor_theme(3)
- wl_cursor(3)
- wl_shm_buffer(3)
- wl_protocol_logger_message(3)
- wl_signal(3)
apt-get install libwayland-doc
apt-get install libwayland-doc
Manual
| wl_listener(3) | Wayland | wl_listener(3) |
NAME
wl_listener - A single listener for Wayland signals.
SYNOPSIS
#include <wayland-server-core.h>
Data Fields
struct wl_list link
wl_notify_func_t notify
Detailed Description
A single listener for Wayland signals.
wl_listener provides the means to listen for wl_signal notifications. Many Wayland objects use wl_listener for notification of significant events like object destruction.
Clients should create wl_listener objects manually and can register them as listeners to signals using #wl_signal_add, assuming the signal is directly accessible. For opaque structs like wl_event_loop, adding a listener should be done through provided accessor methods. A listener can only listen to one signal at a time.
struct wl_listener your_listener; your_listener.notify = your_callback_method; // Direct access wl_signal_add(&some_object->destroy_signal, &your_listener); // Accessor access wl_event_loop *loop = ...; wl_event_loop_add_destroy_listener(loop, &your_listener);
If the listener is part of a larger struct, wl_container_of can be used to retrieve a pointer to it:
void your_listener(struct wl_listener *listener, void *data)
{
struct your_data *data;
your_data = wl_container_of(listener, data, your_member_name);
}
If you need to remove a listener from a signal, use wl_list_remove().
wl_list_remove(&your_listener.link);
See also
Field Documentation
struct wl_list wl_listener::link
wl_notify_func_t wl_listener::notify
Author
Generated automatically by Doxygen for Wayland from the source code.
| Wed Feb 25 2026 13:47:04 | Version 1.24.0 |