Skip to main content

Crate ferroui_wayland

Crate ferroui_wayland 

Source
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 Clipboard of 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_v2 handle (the port of IWaylandXdgTopLevelExport.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 Screens of 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 Server of 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 TextInputOptions of the framework onto the zwp_text_input_v3 (content_hint, content_purpose) pair (the port of TextInputOptionsConverter.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 of XkbContext.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).