Skip to main content

egui_pop_platform/
lib.rs

1//! Platform services for egui-pop applications, each an opt-in plugin
2//! (a Cargo feature of this crate, on by default, and a plugin the
3//! application adds):
4//!
5//! <div class="warning">Experimental: may change in any release
6//! (docs/stability.md).</div>
7//!
8//! - [`instance`]: a single instance; a second launch hands its
9//!   arguments and links to the running one (`instance.second_launch`,
10//!   `deeplink.open`).
11//! - [`notify`]: desktop notifications with actions routed to commands,
12//!   falling back to toasts (`notify.show`, `notify.action`).
13//! - [`tray`]: a tray icon whose menu is a declared egui-pop menu
14//!   (`tray.activate`).
15//! - [`keys`]: global shortcuts, the key bindings of the system scope
16//!   registered with the desktop (`keys.system`).
17//! - [`logs`]: logs to a rotating file in the platform's log directory,
18//!   with a level setting.
19//! - [`crash`]: crash reports written by a panic hook and offered on the
20//!   next start (`crash.report`); nothing is sent.
21//! - [`focus`]: the window manager's focus mode read in-process (the
22//!   Settings portal, `kwinrc`, the registry), followed while running.
23//! - [`open`]: the links service's system opener: local files and
24//!   folders opened with the system's default application, and Reveal
25//!   (the file manager with the file selected), through the portals in
26//!   Flatpak.
27//! - [`text_scale`]: the system's text scaling read in-process (the
28//!   Settings portal, KDE's font DPI, the registry), the default of the
29//!   text size setting.
30//! - [`wheel_lines`]: the system's lines a wheel's notch (the registry on
31//!   Windows), the default of the wheel speed setting.
32//! - [`clipboard`]: the system clipboard over arboard (files, images,
33//!   HTML, text, the primary selection), the clipboard's system backend.
34//! - [`thumbnails`] (off by default): the system's thumbnails as a
35//!   preview provider of the file picker (the freedesktop cache and
36//!   thumbnailers; not yet on Windows and macOS).
37//!
38//! Each service names its moments as steps (ADR 0011): a plugin may
39//! observe, veto or redirect, replace or extend them; the application's
40//! kernel stays in charge through the host (ADR 0010). What each needs
41//! from the package (a desktop file, a manifest, a bundle) is in
42//! `docs/packaging.md`.
43//!
44//! - [`dirs`]: where the application keeps its state and logs;
45//! - [`window`]: the main window brought to the front;
46//! - [`strings`]: the text the services show themselves.
47
48#[cfg(all(feature = "clipboard", not(target_arch = "wasm32")))]
49pub mod clipboard;
50#[cfg(feature = "crash")]
51pub mod crash;
52pub mod dirs;
53#[cfg(feature = "focus")]
54pub mod focus;
55#[cfg(feature = "instance")]
56pub mod instance;
57#[cfg(feature = "keys")]
58pub mod keys;
59#[cfg(feature = "logs")]
60pub mod logs;
61#[cfg(feature = "notify")]
62pub mod notify;
63#[cfg(feature = "open")]
64pub mod open;
65pub mod strings;
66#[cfg(feature = "text-scale")]
67pub mod text_scale;
68#[cfg(feature = "thumbnails")]
69pub mod thumbnails;
70#[cfg(feature = "tray")]
71pub mod tray;
72#[cfg(feature = "wheel-lines")]
73pub mod wheel_lines;
74pub mod window;