xref: /aosp_15_r20/external/wayland/README.md (revision 84e872a0dc482bffdb63672969dd03a827d67c73)
1*84e872a0SLloyd Pique# Wayland
2*84e872a0SLloyd Pique
3*84e872a0SLloyd PiqueWayland is a project to define a protocol for a compositor to talk to
4*84e872a0SLloyd Piqueits clients as well as a library implementation of the protocol.  The
5*84e872a0SLloyd Piquecompositor can be a standalone display server running on Linux kernel
6*84e872a0SLloyd Piquemodesetting and evdev input devices, an X application, or a wayland
7*84e872a0SLloyd Piqueclient itself.  The clients can be traditional applications, X servers
8*84e872a0SLloyd Pique(rootless or fullscreen) or other display servers.
9*84e872a0SLloyd Pique
10*84e872a0SLloyd PiqueThe wayland protocol is essentially only about input handling and
11*84e872a0SLloyd Piquebuffer management.  The compositor receives input events and forwards
12*84e872a0SLloyd Piquethem to the relevant client.  The clients creates buffers and renders
13*84e872a0SLloyd Piqueinto them and notifies the compositor when it needs to redraw.  The
14*84e872a0SLloyd Piqueprotocol also handles drag and drop, selections, window management and
15*84e872a0SLloyd Piqueother interactions that must go through the compositor.  However, the
16*84e872a0SLloyd Piqueprotocol does not handle rendering, which is one of the features that
17*84e872a0SLloyd Piquemakes wayland so simple.  All clients are expected to handle rendering
18*84e872a0SLloyd Piquethemselves, typically through cairo or OpenGL.
19*84e872a0SLloyd Pique
20*84e872a0SLloyd PiqueBuilding the wayland libraries is fairly simple, aside from libffi,
21*84e872a0SLloyd Piquethey don't have many dependencies:
22*84e872a0SLloyd Pique
23*84e872a0SLloyd Pique    $ git clone https://gitlab.freedesktop.org/wayland/wayland
24*84e872a0SLloyd Pique    $ cd wayland
25*84e872a0SLloyd Pique    $ meson build/ --prefix=PREFIX
26*84e872a0SLloyd Pique    $ ninja -C build/ install
27*84e872a0SLloyd Pique
28*84e872a0SLloyd Piquewhere PREFIX is where you want to install the libraries.
29*84e872a0SLloyd Pique
30*84e872a0SLloyd PiqueSee https://wayland.freedesktop.org for documentation.
31