Server API ========== Server Introduction ------------------- The open-source reference implementation of Wayland protocol is split in two C libraries, :ref:`Client API` and libwayland-server. Their main responsibility is to handle the Inter-process communication (*IPC*) with each other, therefore guaranteeing the protocol objects marshaling and messages synchronization. The server library is designed to work much like libwayland-client, although it is considerably complicated due to the server needing to support multiple versions of the protocol. It is best to learn libwayland-client first. Each open socket to a client is represented by a :type:`wl_client`. The equvalent of the :type:`wl_proxy` that libwayland-client uses to represent an object is :type:`wl_resource` for client-created objects, and :type:`wl_global` for objects created by the server. Often a server is also a client for another Wayland server, and thus must link with both libwayland-client and libwayland-server. This produces some type name conflicts (such as the :type:`client_wl_display` and :type:`server_wl_display`, but the duplicate-but-not-the-same types are opaque, and accessed only inside the correct library where it came from). Naturally that means that the program writer needs to always know if a pointer to a wl_display is for the server or client side and use the corresponding functions. .. c:autodoc:: src/wayland-server.h src/wayland-server-core.h src/wayland-server.c :compat: javadoc-liberal