This crate implements Wayland functionality.
The piece of code running all the business is
Engine. It sets up everything and handles
requests from clients as well as the rests of application. Upon client connection
skylane::Client, structure registering handlers (representing Wayland objects) and dispatching client requests to them and
wayland_frontend::Proxy, structure used for sharing information between handlers, a state of client.
Proxy is shared between handlers as
Two interfaces were introduced:
Facade, for requests from clients (downward?) which is implemented by
Gateway, for requests from application (upward?) which is implemented by
Engine(dispatching request to correct
Proxy(making actual request to client).
Engine holds many
Clients holding many (cell) references to
Proxy, but at some
Engine must be informed that client created surface. For this purpose
Engine and all
Proxys hold (cell) reference to single
Details of threading are left for application.
wayland_frontend may be configured to receive
in one thread and send in other or do everything in one thread. What is however sure accepting
new client can not be done in
DisplayEventHandler and handling requests can not be done in
ClientEventHandler as it may require mutating
dharma::Dispatcher, so handling is decoupled
from processing using
This create contains constants for
This module contains code responsible for gluing all other parts of crate together.
This macro executes passed expression and in case of error logs warning about failing to send
data. It is intended to use when posting