mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-04 07:15:53 -04:00
doc: Added \code tags around sample code in doxygen comments
Also removed \comment and used C++ comments. There does not appear to be any other way to put comments into code samples. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
This commit is contained in:
parent
dd534a1fde
commit
40aa80a408
3 changed files with 32 additions and 31 deletions
|
|
@ -144,18 +144,18 @@ wl_client_post_no_memory(struct wl_client *client);
|
|||
* listener should be done through provided accessor methods. A listener can
|
||||
* only listen to one signal at a time.
|
||||
*
|
||||
* ~~~
|
||||
* \code
|
||||
* struct wl_listener your_listener;
|
||||
*
|
||||
* your_listener.notify = your_callback_method;
|
||||
*
|
||||
* \comment{Direct access}
|
||||
* // Direct access
|
||||
* wl_signal_add(&some_object->destroy_signal, &your_listener);
|
||||
*
|
||||
* \comment{Accessor access}
|
||||
* // Accessor access
|
||||
* wl_event_loop *loop = ...;
|
||||
* wl_event_loop_add_destroy_listener(loop, &your_listener);
|
||||
* ~~~
|
||||
* \endcode
|
||||
*
|
||||
* If the listener is part of a larger struct, #wl_container_of can be used
|
||||
* to retrieve a pointer to it:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue