aboutsummaryrefslogtreecommitdiffstats
path: root/src/wayland-client.h
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2012-10-15 17:53:23 +0300
committerKristian Høgsberg <krh@bitplanet.net>2012-10-15 13:07:42 -0400
commit3f94d984f7aa210d2c769285ea3ecd99de7c3086 (patch)
tree37e95b33ad6eda0d42ce50045105bfedd0d0a35a /src/wayland-client.h
parentdoc: Add some doxygen documentation to wayland-client entry points (diff)
downloadwayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.tar
wayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.tar.gz
wayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.tar.bz2
wayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.tar.lz
wayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.tar.xz
wayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.tar.zst
wayland-3f94d984f7aa210d2c769285ea3ecd99de7c3086.zip
doc: Improve libwayland-client doxygen documentation
Document wl_proxy, wl_display and wl_event_queue classes and add a description to all public entry points. Also fix some typos.
Diffstat (limited to 'src/wayland-client.h')
-rw-r--r--src/wayland-client.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/wayland-client.h b/src/wayland-client.h
index 6bbe74b..cb21d70 100644
--- a/src/wayland-client.h
+++ b/src/wayland-client.h
@@ -32,14 +32,62 @@ extern "C" {
/** \class wl_proxy
*
+ * \brief Represents a protocol object on the client side.
+ *
+ * A wl_proxy acts as a client side proxy to an object existing in the
+ * compositor. The proxy is responsible for converting requests made by the
+ * clients with \ref wl_proxy_marshal() into Wayland's wire format. Events
+ * coming from the compositor are also handled by the proxy, which will in
+ * turn call the handler set with \ref wl_proxy_add_listener().
+ *
+ * \note With the exception of function \ref wl_proxy_set_queue(), functions
+ * accessing a \ref wl_proxy are not normally used by client code. Clients
+ * should normally use the higher level interface generated by the scanner to
+ * interact with compositor objects.
+ *
*/
struct wl_proxy;
/** \class wl_display
+ *
+ * \brief Represents a connection to the compositor and acts as a proxy to
+ * the wl_display singleton object.
+ *
+ * A \ref wl_display object represents a client connection to a Wayland
+ * compositor. It is created with either \ref wl_display_connect() or
+ * \ref wl_display_connect_to_fd(). A connection is terminated using
+ * \ref wl_display_disconnect().
+ *
+ * A \ref wl_display is also used as the \ref wl_proxy for the \ref wl_display
+ * singleton object on the compositor side.
+ *
+ * A \ref wl_display object handles all the data sent from and to the
+ * compositor. When a \ref wl_proxy marshals a request, it will write its wire
+ * representation to the display's write buffer. The data is sent to the
+ * compositor when the client calls \ref wl_display_flush().
+ *
+ * Event handling is done in a thread-safe manner using event queues. The
+ * display has a \em main event queue where initially all the events are
+ * queued. The listeners for the events queued in it are called when the
+ * client calls \ref wl_display_dispatch().
+ *
+ * The client can create additional event queues with \ref
+ * wl_display_create_queue() and assign different \ref wl_proxy objects to it.
+ * The events for a proxy are always queued only on its assign queue, that can
+ * be dispatched by a different thread with \ref wl_display_dispatch_queue().
+ *
+ * All the \ref wl_display's functions are thread-safe.
+ *
*/
struct wl_display;
/** \class wl_event_queue
+ *
+ * \brief A queue for \ref wl_proxy object events.
+ *
+ * Event queues allows the events on a display to be handled in a thread-safe
+ * manner. See \ref wl_display for details.
+ *
*/
struct wl_event_queue;