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:
Bill Spitzak 2014-11-11 18:42:59 -08:00 committed by Pekka Paalanen
parent dd534a1fde
commit 40aa80a408
3 changed files with 32 additions and 31 deletions

View file

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