Expand description
ferroui-wayland
The windowing platform of FerroUI for Wayland compositors: windows over
xdg_toplevel, popups, input, screens, cursors, the clipboard and drag
and drop over wl_data_device, input methods over zwp_text_input_v3,
the parent handle of a portal dialog over xdg-foreign, and render surfaces over shared memory
buffers and over EGL. docs/porting/wayland-platform.md has the
design and the stages.
A worker thread owns the connection to the compositor and renders; the UI
thread sends it commands and receives events as posted calls. The protocol
runs over libwayland-client, which is opened at run time together with
libwayland-egl, libEGL and libxkbcommon, so the crate builds without
them and an application that carries it starts on a system that has none.
The part that talks to a compositor exists on Linux only, as in the reference. What is plain logic (the key tables, the states of a configure, the geometry of a window, the frames of pointer events) exists on every system, which is where its tests run during development.
Re-exports§
pub use ferro_wayland_exception::FerroWaylandException;pub use ferro_wayland_exception::FerroWaylandFlushException;pub use ferro_wayland_exception::FerroWaylandNetworkException;pub use ferro_wayland_exception::FerroWaylandPollException;pub use ferro_wayland_exception::FerroWaylandProtocolErrorException;pub use ferro_wayland_exception::FerroWaylandReadException;pub use ferro_wayland_platform_extensions::FerroWaylandPlatformExtensions;pub use wayland_platform_options::WaylandPlatformOptions;
Modules§
- clipboard
- The UI half of the clipboard and of drag and drop (the directory
Clipboardof the reference): the clipboard of the platform, the data of an offer of another client, the data this application offers, and the drag source. - ferro_
wayland_ exception - The errors of the Wayland backend (the port of the exception classes of the reference, which form a hierarchy: a poll, a network and a protocol error are Wayland errors; a flush and a read error are network errors).
- ferro_
wayland_ platform_ extensions - Selecting the Wayland backend for an application (the port of the extensions of the application builder of the reference).
- i_
wayland_ xdg_ top_ level_ export - UI-thread façade over a worker-thread
zxdg_exported_v2handle (the port ofIWaylandXdgTopLevelExport.cs). Restricts the UI side to the only two operations it should care about: awaiting the compositor-issued handle string and disposing the export. The underlying worker object is intentionally not exposed. - popup_
impl - A popup of the backend on the UI thread (the port of
PopupImpl.cs). - screens
- The screens of the Wayland backend (the directory
Screensof the reference): snapshots of the outputs the worker tracks, and the screens the UI thread makes of them. - server
- The worker side of the backend (the directory
Serverof the reference): what runs on the thread that owns the connection to the compositor, and the handles the UI thread reaches it through. - text_
input_ options_ converter - Maps the
TextInputOptionsof the framework onto thezwp_text_input_v3(content_hint, content_purpose)pair (the port ofTextInputOptionsConverter.cs). - wayland_
conversion_ extensions - Conversions between the types of the framework and those of the Wayland
protocol (the port of
WaylandConversionExtensions.cs). - wayland_
cursor_ factory - The cursors of the platform (the port of
WaylandCursorFactory.cs). - wayland_
glib_ dispatcher - The dispatcher of the UI thread over the main loop of GLib (the port of
WaylandGlibDispatcher.cs). - wayland_
platform - The start of the backend (the port of
WaylandPlatform.cs). - wayland_
platform_ options - The options of the Wayland backend (the port of
WaylandPlatformOptions.cs). - wayland_
surface_ create_ result - What creating a surface of the worker gives the UI thread (the port of
WaylandSurfaceCreateResult.cs). - wayland_
text_ utils - Helpers for converting between UTF-8 byte offsets (used by Wayland
text-input protocols) and UTF-16 code unit indices, which is what the
text of the framework is indexed by (the port of
WaylandTextUtils.cs). - wayland_
top_ level_ factory - The windowing platform of the backend (the port of
WaylandTopLevelFactory.cs). - window_
impl - A window of the backend on the UI thread (the port of
WindowImpl.cs): the state the framework asks for, and the requests to the top-level of the worker. - window_
impl_ base - What the windows of the backend share on the UI thread (the port of
WindowImplBase.cs). - xkb_
common_ keymap - A keymap of the compositor and its state (the port of
XkbCommonKeymap.cs). - xkb_
compose_ state - The progress of a compose sequence (the port of
XkbComposeState.cs). - xkb_
compose_ table - The compose sequences of a locale (the port of
XkbComposeTable.cs). - xkb_
context - A context of
libxkbcommon(the port ofXkbContext.cs). - xkb_
key_ transform - The key tables of the Wayland platform and the resolution of a key over a keymap (the port of
XkbKeyTransform.cs).