wayland_frontend
only.Expand description
Protocol-related utilities
This module contains several handlers to manage the Wayland protocol and the clients.
§General structure
Most utilities provided in this module work in the same way:
- A module specific
*State
struct will take the wayland display as argument and insert one or more globals into it through its constructor. - The module-
State
will have to be stored inside your global compositor state. (The same type you parametrizedwayland_server::Display
over.) - You need to implement a module-specific
*Handler
-trait for your compositor state. This implementation will be called when wayland events require custom handling. - Call the matching
delegate_*!
macro from smithay on your state to implement some requiredwayland_server
traits. - If you want to remove a previously inserted global, just drop the
*State
.
§Provided helpers
§Core functionality
The most fundamental module is the compositor
module, which provides the necessary
logic to handle the fundamental component by which clients build their windows: surfaces.
Following this, the shell
module contains the logic allowing clients to use their
surface to build concrete windows with the usual interactions. Different kind of shells
exist, but in general you will want to support at least the xdg
variant,
which is the standard used by most applications.
Then, the seat
module contains logic related to input handling. These helpers are used
to forward input (such as pointer action or keystrokes) to clients, and manage the input
focus of clients. Tightly coupled with it is the selection
module, which handles
cross-client interactions such as accessing the clipboard, or drag’n’drop actions.
The shm
module provides the necessary logic for client to provide buffers defining the
contents of their windows using shared memory. This is the main mechanism used by clients
that are not hardware accelerated. As a complement, the dmabuf
module provides support
hardware-accelerated clients; it is tightly linked to the
backend::allocator
module.
The output
module helps forwarding to clients information about the display monitors that
are available. This notably plays a key role in HiDPI handling, and more generally notifying
clients about whether they are currently visible or not (allowing them to stop drawing if they
are not, for example).
Modules§
- alpha_
modifier - Implementation of
wp_alpha_modifier
protocol - buffer
- Buffer management traits.
- commit_
timing - Utilities for handling the
wp-commit-timing
protocol - compositor
- Utilities for handling surfaces, subsurfaces and regions
- content_
type - Implementation of wp_content_type protocol
- cursor_
shape - Utilities for compositor side cursor theming support
- dmabuf
- Linux DMABUF protocol
- drm_
lease backend_drm
- DRM Lease protocol
- drm_
syncobj backend_drm
- DRM syncobj protocol
- fifo
- Utilities for handling the
wp-fifo
protocol - foreign_
toplevel_ list - Foreign toplevel list
- fractional_
scale - Utilities for handling the
wp_fractional_scale
protocol - idle_
inhibit - Utilities for handling the
zwp_idle_inhibit
protocol - idle_
notify - This interface allows clients to monitor user idle status.
- input_
method - Utilities for input method support
- keyboard_
shortcuts_ inhibit - Protocol for inhibiting the compositor keyboard shortcuts
- output
- WlOutput advertising capabilities
- pointer_
constraints - Protocol for confining the pointer.
- pointer_
gestures - Utilities for pointer gestures support
- presentation
- Utilities for handling the
wp_presentation
protocol - relative_
pointer - Utilities for relative pointer support
- seat
- Seat global utilities
- security_
context - Utilities for handling the security context protocol
- selection
- Handler utilities for the various selection protocols.
- session_
lock - Utilities for handling the
ext-session-lock
protocol - shell
- Handler utilities for the various shell protocols
- shm
- SHM handling helpers
- single_
pixel_ buffer - Utilities for handling the
wp_single_pixel_buffer
protocol - socket
- Wayland listening socket.
- tablet_
manager - Utilities for graphics tablet support
- text_
input - Utilities for text input support
- viewporter
- Utilities for handling the
wp_viewporter
protocol - virtual_
keyboard - Utilities for virtual keyboard support
- xdg_
activation - Utilities for handling activation requests with the
xdg_activation
protocol - xdg_
foreign - Implementation
xdg_foreign
protocol - xdg_
system_ bell - XDG System Bell
- xdg_
toplevel_ icon - XDG Toplevel Icon
- xdg_
toplevel_ tag - XDG Toplevel Tag
- xwayland_
keyboard_ grab xwayland
- Utilities for handling the xwayland keyboard grab protocol
- xwayland_
shell xwayland
- Helpers for handling the xwayland shell protocol