wl_listener man page on Alpinelinux

Man page or keyword search:  
man Server   18016 pages
apropos Keyword Search (all sections)
Output format
Alpinelinux logo
[printable version]

wl_listener(3)			    Wayland			wl_listener(3)

NAME
       wl_listener -

       A single listener for Wayland signals.

SYNOPSIS
       #include <wayland-server.h>

   Public Attributes
       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 = NULL;

	       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:
	   wl_signal

Author
       Generated automatically by Doxygen for Wayland from the source code.

Version 1.4.0			Sat May 17 2014			wl_listener(3)
[top]

List of man pages available for Alpinelinux

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net