Skip to main content

ferroui_wayland/
lib.rs

1//! ferroui-wayland
2//!
3//! The windowing platform of FerroUI for Wayland compositors: windows over
4//! `xdg_toplevel`, popups, input, screens, cursors, the clipboard and drag
5//! and drop over `wl_data_device`, input methods over `zwp_text_input_v3`,
6//! the parent handle of a portal dialog over `xdg-foreign`, and render surfaces over shared memory
7//! buffers and over EGL. `docs/porting/wayland-platform.md` has the
8//! design and the stages.
9//!
10//! A worker thread owns the connection to the compositor and renders; the UI
11//! thread sends it commands and receives events as posted calls. The protocol
12//! runs over `libwayland-client`, which is opened at run time together with
13//! `libwayland-egl`, `libEGL` and `libxkbcommon`, so the crate builds without
14//! them and an application that carries it starts on a system that has none.
15//!
16//! The part that talks to a compositor exists on Linux only, as in the
17//! reference. What is plain logic (the key tables, the states of a configure,
18//! the geometry of a window, the frames of pointer events) exists on every
19//! system, which is where its tests run during development.
20
21pub mod clipboard;
22pub mod screens;
23pub mod server;
24pub mod ferro_wayland_exception;
25pub mod text_input_options_converter;
26pub mod wayland_platform_options;
27pub mod wayland_text_utils;
28pub mod xkb_key_transform;
29
30#[cfg(target_os = "linux")]
31pub mod i_wayland_xdg_top_level_export;
32#[cfg(target_os = "linux")]
33pub mod popup_impl;
34#[cfg(target_os = "linux")]
35mod popup_impl_sink;
36#[cfg(target_os = "linux")]
37pub mod wayland_conversion_extensions;
38#[cfg(target_os = "linux")]
39pub mod wayland_cursor_factory;
40#[cfg(target_os = "linux")]
41pub mod wayland_glib_dispatcher;
42#[cfg(target_os = "linux")]
43pub mod wayland_platform;
44pub mod ferro_wayland_platform_extensions;
45#[cfg(target_os = "linux")]
46pub mod wayland_surface_create_result;
47#[cfg(target_os = "linux")]
48pub mod wayland_top_level_factory;
49#[cfg(target_os = "linux")]
50pub mod window_impl;
51#[cfg(target_os = "linux")]
52pub mod window_impl_base;
53#[cfg(target_os = "linux")]
54mod window_impl_base_drag_drop;
55#[cfg(target_os = "linux")]
56mod window_impl_base_keyboard;
57#[cfg(target_os = "linux")]
58mod window_impl_base_pointer;
59#[cfg(target_os = "linux")]
60mod window_impl_sink;
61#[cfg(target_os = "linux")]
62mod window_impl_text_input;
63#[cfg(target_os = "linux")]
64pub mod xkb_common_keymap;
65#[cfg(target_os = "linux")]
66pub mod xkb_compose_state;
67#[cfg(target_os = "linux")]
68pub mod xkb_compose_table;
69#[cfg(target_os = "linux")]
70pub mod xkb_context;
71
72pub use ferro_wayland_exception::{
73    FerroWaylandException, FerroWaylandFlushException, FerroWaylandNetworkException, FerroWaylandPollException,
74    FerroWaylandProtocolErrorException, FerroWaylandReadException,
75};
76pub use ferro_wayland_platform_extensions::FerroWaylandPlatformExtensions;
77pub use wayland_platform_options::WaylandPlatformOptions;